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:49.091853Z
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 id, uint256 amount) external nonReentrant {
require(balanceOf(msg.sender, id) >= amount, 'Insufficient balance');
uint256 denomination = denominationValues[id];
uint256 totalValue = denomination * 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":"id","internalType":"uint256"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"denominationToId","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"denominationValues","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"feePercentage","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isApprovedForAll","inputs":[{"type":"address","name":"account","internalType":"address"},{"type":"address","name":"operator","internalType":"address"}]},{"type":"function","stateMutability":"payable","outputs":[],"name":"mint","inputs":[{"type":"uint256","name":"denominationValue","internalType":"uint256"},{"type":"uint256","name":"amount","internalType":"uint256"},{"type":"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
0x608060405260646007553480156200001657600080fd5b50604051806020016040528060008152506200003881620001d560201b60201c565b50620000596200004d620001ea60201b60201c565b620001f260201b60201c565b600160048190555060058060006001815260200190815260200160002081905550600a6005600060028152602001908152602001600020819055506014600560006003815260200190815260200160002081905550603260056000600481526020019081526020016000208190555060646005600060058152602001908152602001600020819055506103e86005600060068152602001908152602001600020819055506127106005600060078152602001908152602001600020819055506001600660006005815260200190815260200160002081905550600260066000600a81526020019081526020016000208190555060036006600060148152602001908152602001600020819055506004600660006032815260200190815260200160002081905550600560066000606481526020019081526020016000208190555060068060006103e881526020019081526020016000208190555060076006600061271081526020019081526020016000208190555062000619565b8060029081620001e6919062000532565b5050565b600033905090565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200033a57607f821691505b60208210810362000350576200034f620002f2565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302620003ba7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200037b565b620003c686836200037b565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620004136200040d6200040784620003de565b620003e8565b620003de565b9050919050565b6000819050919050565b6200042f83620003f2565b620004476200043e826200041a565b84845462000388565b825550505050565b600090565b6200045e6200044f565b6200046b81848462000424565b505050565b5b8181101562000493576200048760008262000454565b60018101905062000471565b5050565b601f821115620004e257620004ac8162000356565b620004b7846200036b565b81016020851015620004c7578190505b620004df620004d6856200036b565b83018262000470565b50505b505050565b600082821c905092915050565b60006200050760001984600802620004e7565b1980831691505092915050565b6000620005228383620004f4565b9150826002028217905092915050565b6200053d82620002b8565b67ffffffffffffffff811115620005595762000558620002c3565b5b62000565825462000321565b6200057282828562000497565b600060209050601f831160018114620005aa576000841562000595578287015190505b620005a1858262000514565b86555062000611565b601f198416620005ba8662000356565b60005b82811015620005e457848901518255600182019150602085019450602081019050620005bd565b8683101562000604578489015162000600601f891682620004f4565b8355505b6001600288020188555050505b505050505050565b61429680620006296000396000f3fe6080604052600436106101c55760003560e01c8063942c4d25116100f7578063ce1aad2311610095578063ee2f3a0511610064578063ee2f3a0514610654578063f242432a1461067f578063f2fde38b146106a8578063f85fc0ab146106d1576101cc565b8063ce1aad23146105a5578063dd47f7e2146105d0578063e7d3fe6b146105fb578063e985e9c514610617576101cc565b8063ad57f9f1116100d1578063ad57f9f1146104fd578063ae06c1b714610528578063b390c0ab14610551578063cbf5a55e1461057a576101cc565b8063942c4d251461047e578063a001ecdd146104a9578063a22cb465146104d4576101cc565b8063487a23951161016457806364c831951161013e57806364c83195146103d4578063715018a614610411578063851cad90146104285780638da5cb5b14610453576101cc565b8063487a2395146103305780634e1273f41461036e57806355f804b3146103ab576101cc565b806313114a9d116101a057806313114a9d146102885780632eb2c2d6146102b3578063449dd521146102dc578063476343ee14610319576101cc565b8062fdd58e146101d157806301ffc9a71461020e5780630e89341c1461024b576101cc565b366101cc57005b600080fd5b3480156101dd57600080fd5b506101f860048036038101906101f39190612588565b6106fc565b60405161020591906125d7565b60405180910390f35b34801561021a57600080fd5b506102356004803603810190610230919061264a565b6107c4565b6040516102429190612692565b60405180910390f35b34801561025757600080fd5b50610272600480360381019061026d91906126ad565b6108a6565b60405161027f919061276a565b60405180910390f35b34801561029457600080fd5b5061029d610930565b6040516102aa91906125d7565b60405180910390f35b3480156102bf57600080fd5b506102da60048036038101906102d59190612989565b610936565b005b3480156102e857600080fd5b5061030360048036038101906102fe91906126ad565b6109d7565b60405161031091906125d7565b60405180910390f35b34801561032557600080fd5b5061032e6109ef565b005b34801561033c57600080fd5b5061035760048036038101906103529190612a58565b610a57565b604051610365929190612a98565b60405180910390f35b34801561037a57600080fd5b5061039560048036038101906103909190612b84565b610b07565b6040516103a29190612cba565b60405180910390f35b3480156103b757600080fd5b506103d260048036038101906103cd9190612d7d565b610c20565b005b3480156103e057600080fd5b506103fb60048036038101906103f691906126ad565b610c3b565b60405161040891906125d7565b60405180910390f35b34801561041d57600080fd5b50610426610c53565b005b34801561043457600080fd5b5061043d610c67565b60405161044a91906125d7565b60405180910390f35b34801561045f57600080fd5b50610468610c6c565b6040516104759190612dd5565b60405180910390f35b34801561048a57600080fd5b50610493610c96565b6040516104a091906125d7565b60405180910390f35b3480156104b557600080fd5b506104be610c9b565b6040516104cb91906125d7565b60405180910390f35b3480156104e057600080fd5b506104fb60048036038101906104f69190612e1c565b610ca1565b005b34801561050957600080fd5b50610512610cb7565b60405161051f91906125d7565b60405180910390f35b34801561053457600080fd5b5061054f600480360381019061054a91906126ad565b610cbc565b005b34801561055d57600080fd5b5061057860048036038101906105739190612a58565b610d12565b005b34801561058657600080fd5b5061058f610e01565b60405161059c91906125d7565b60405180910390f35b3480156105b157600080fd5b506105ba610e07565b6040516105c791906125d7565b60405180910390f35b3480156105dc57600080fd5b506105e5610e0c565b6040516105f291906125d7565b60405180910390f35b61061560048036038101906106109190612e5c565b610e11565b005b34801561062357600080fd5b5061063e60048036038101906106399190612eaf565b610f75565b60405161064b9190612692565b60405180910390f35b34801561066057600080fd5b50610669611009565b60405161067691906125d7565b60405180910390f35b34801561068b57600080fd5b506106a660048036038101906106a19190612eef565b61100e565b005b3480156106b457600080fd5b506106cf60048036038101906106ca9190612f86565b6110af565b005b3480156106dd57600080fd5b506106e6611132565b6040516106f391906125d7565b60405180910390f35b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361076c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161076390613025565b60405180910390fd5b60008083815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60007fd9b67a26000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061088f57507f0e89341c000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061089f575061089e82611137565b5b9050919050565b606060006005600084815260200190815260200160002054116108fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108f590613091565b60405180910390fd5b6009610909836111a1565b60405160200161091a929190613231565b6040516020818303038152906040529050919050565b60085481565b61093e61126f565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16148061098457506109838561097e61126f565b610f75565b5b6109c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109ba906132d2565b60405180910390fd5b6109d08585858585611277565b5050505050565b60056020528060005260406000206000915090505481565b6109f7611598565b600060085490506000600881905550610a0e610c6c565b73ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610a53573d6000803e3d6000fd5b5050565b60008060006006600086815260200190815260200160002054905080600003610ab5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aac9061333e565b60405180910390fd5b6000670de0b6b3a76400008587610acc919061338d565b610ad6919061338d565b9050600061271060075483610aeb919061338d565b610af591906133fe565b90508181945094505050509250929050565b60608151835114610b4d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b44906134a1565b60405180910390fd5b6000835167ffffffffffffffff811115610b6a57610b69612791565b5b604051908082528060200260200182016040528015610b985781602001602082028036833780820191505090505b50905060005b8451811015610c1557610be5858281518110610bbd57610bbc6134c1565b5b6020026020010151858381518110610bd857610bd76134c1565b5b60200260200101516106fc565b828281518110610bf857610bf76134c1565b5b60200260200101818152505080610c0e906134f0565b9050610b9e565b508091505092915050565b610c28611598565b8060099081610c3791906136cf565b5050565b60066020528060005260406000206000915090505481565b610c5b611598565b610c656000611616565b565b600681565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600181565b60075481565b610cb3610cac61126f565b83836116dc565b5050565b600481565b610cc4611598565b6064811115610d08576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cff906137ed565b60405180910390fd5b8060078190555050565b610d1a611848565b80610d2533846106fc565b1015610d66576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d5d90613859565b60405180910390fd5b6000600560008481526020019081526020016000205490506000670de0b6b3a76400008383610d95919061338d565b610d9f919061338d565b9050610dac338585611897565b3373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610df2573d6000803e3d6000fd5b505050610dfd611add565b5050565b61271081565b600781565b600381565b60006006600085815260200190815260200160002054905080600003610e6c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e639061333e565b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff1603610edb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ed2906138c5565b60405180910390fd5b600080610ee88686610a57565b915091508082610ef891906138e5565b3414610f39576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f3090613965565b60405180910390fd5b8060086000828254610f4b91906138e5565b92505081905550610f6d84848760405180602001604052806000815250611ae7565b505050505050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600281565b61101661126f565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16148061105c575061105b8561105661126f565b610f75565b5b61109b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611092906132d2565b60405180910390fd5b6110a88585858585611c97565b5050505050565b6110b7611598565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611126576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161111d906139f7565b60405180910390fd5b61112f81611616565b50565b600581565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b6060600060016111b084611f32565b01905060008167ffffffffffffffff8111156111cf576111ce612791565b5b6040519080825280601f01601f1916602001820160405280156112015781602001600182028036833780820191505090505b509050600082602001820190505b600115611264578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8581611258576112576133cf565b5b0494506000850361120f575b819350505050919050565b600033905090565b81518351146112bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112b290613a89565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff160361132a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161132190613b1b565b60405180910390fd5b600061133461126f565b9050611344818787878787612085565b60005b84518110156114f5576000858281518110611365576113646134c1565b5b602002602001015190506000858381518110611384576113836134c1565b5b60200260200101519050600080600084815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611425576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161141c90613bad565b60405180910390fd5b81810360008085815260200190815260200160002060008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508160008085815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546114da91906138e5565b92505081905550505050806114ee906134f0565b9050611347565b508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161156c929190613bcd565b60405180910390a461158281878787878761208d565b611590818787878787612095565b505050505050565b6115a061126f565b73ffffffffffffffffffffffffffffffffffffffff166115be610c6c565b73ffffffffffffffffffffffffffffffffffffffff1614611614576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161160b90613c50565b60405180910390fd5b565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361174a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161174190613ce2565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161183b9190612692565b60405180910390a3505050565b60026004540361188d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161188490613d4e565b60405180910390fd5b6002600481905550565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611906576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118fd90613de0565b60405180910390fd5b600061191061126f565b9050600061191d8461226c565b9050600061192a8461226c565b905061194a83876000858560405180602001604052806000815250612085565b600080600087815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050848110156119e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119d890613e72565b60405180910390fd5b84810360008088815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628989604051611aae929190612a98565b60405180910390a4611ad48488600086866040518060200160405280600081525061208d565b50505050505050565b6001600481905550565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603611b56576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b4d90613f04565b60405180910390fd5b6000611b6061126f565b90506000611b6d8561226c565b90506000611b7a8561226c565b9050611b8b83600089858589612085565b8460008088815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611bea91906138e5565b925050819055508673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628989604051611c68929190612a98565b60405180910390a4611c7f8360008985858961208d565b611c8e836000898989896122e6565b50505050505050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603611d06576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cfd90613b1b565b60405180910390fd5b6000611d1061126f565b90506000611d1d8561226c565b90506000611d2a8561226c565b9050611d3a838989858589612085565b600080600088815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905085811015611dd1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dc890613bad565b60405180910390fd5b85810360008089815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508560008089815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611e8691906138e5565b925050819055508773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628a8a604051611f03929190612a98565b60405180910390a4611f19848a8a86868a61208d565b611f27848a8a8a8a8a6122e6565b505050505050505050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310611f90577a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008381611f8657611f856133cf565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310611fcd576d04ee2d6d415b85acef81000000008381611fc357611fc26133cf565b5b0492506020810190505b662386f26fc100008310611ffc57662386f26fc100008381611ff257611ff16133cf565b5b0492506010810190505b6305f5e1008310612025576305f5e100838161201b5761201a6133cf565b5b0492506008810190505b612710831061204a5761271083816120405761203f6133cf565b5b0492506004810190505b6064831061206d5760648381612063576120626133cf565b5b0492506002810190505b600a831061207c576001810190505b80915050919050565b505050505050565b505050505050565b6120b48473ffffffffffffffffffffffffffffffffffffffff166124bd565b15612264578373ffffffffffffffffffffffffffffffffffffffff1663bc197c8187878686866040518663ffffffff1660e01b81526004016120fa959493929190613f79565b6020604051808303816000875af192505050801561213657506040513d601f19601f820116820180604052508101906121339190613ff6565b60015b6121db57612142614030565b806308c379a00361219e5750612156614052565b8061216157506121a0565b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612195919061276a565b60405180910390fd5b505b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121d290614154565b60405180910390fd5b63bc197c8160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614612262576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612259906141e6565b60405180910390fd5b505b505050505050565b60606000600167ffffffffffffffff81111561228b5761228a612791565b5b6040519080825280602002602001820160405280156122b95781602001602082028036833780820191505090505b50905082816000815181106122d1576122d06134c1565b5b60200260200101818152505080915050919050565b6123058473ffffffffffffffffffffffffffffffffffffffff166124bd565b156124b5578373ffffffffffffffffffffffffffffffffffffffff1663f23a6e6187878686866040518663ffffffff1660e01b815260040161234b959493929190614206565b6020604051808303816000875af192505050801561238757506040513d601f19601f820116820180604052508101906123849190613ff6565b60015b61242c57612393614030565b806308c379a0036123ef57506123a7614052565b806123b257506123f1565b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123e6919061276a565b60405180910390fd5b505b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161242390614154565b60405180910390fd5b63f23a6e6160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916146124b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124aa906141e6565b60405180910390fd5b505b505050505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061251f826124f4565b9050919050565b61252f81612514565b811461253a57600080fd5b50565b60008135905061254c81612526565b92915050565b6000819050919050565b61256581612552565b811461257057600080fd5b50565b6000813590506125828161255c565b92915050565b6000806040838503121561259f5761259e6124ea565b5b60006125ad8582860161253d565b92505060206125be85828601612573565b9150509250929050565b6125d181612552565b82525050565b60006020820190506125ec60008301846125c8565b92915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612627816125f2565b811461263257600080fd5b50565b6000813590506126448161261e565b92915050565b6000602082840312156126605761265f6124ea565b5b600061266e84828501612635565b91505092915050565b60008115159050919050565b61268c81612677565b82525050565b60006020820190506126a76000830184612683565b92915050565b6000602082840312156126c3576126c26124ea565b5b60006126d184828501612573565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156127145780820151818401526020810190506126f9565b60008484015250505050565b6000601f19601f8301169050919050565b600061273c826126da565b61274681856126e5565b93506127568185602086016126f6565b61275f81612720565b840191505092915050565b600060208201905081810360008301526127848184612731565b905092915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6127c982612720565b810181811067ffffffffffffffff821117156127e8576127e7612791565b5b80604052505050565b60006127fb6124e0565b905061280782826127c0565b919050565b600067ffffffffffffffff82111561282757612826612791565b5b602082029050602081019050919050565b600080fd5b600061285061284b8461280c565b6127f1565b9050808382526020820190506020840283018581111561287357612872612838565b5b835b8181101561289c57806128888882612573565b845260208401935050602081019050612875565b5050509392505050565b600082601f8301126128bb576128ba61278c565b5b81356128cb84826020860161283d565b91505092915050565b600080fd5b600067ffffffffffffffff8211156128f4576128f3612791565b5b6128fd82612720565b9050602081019050919050565b82818337600083830152505050565b600061292c612927846128d9565b6127f1565b905082815260208101848484011115612948576129476128d4565b5b61295384828561290a565b509392505050565b600082601f8301126129705761296f61278c565b5b8135612980848260208601612919565b91505092915050565b600080600080600060a086880312156129a5576129a46124ea565b5b60006129b38882890161253d565b95505060206129c48882890161253d565b945050604086013567ffffffffffffffff8111156129e5576129e46124ef565b5b6129f1888289016128a6565b935050606086013567ffffffffffffffff811115612a1257612a116124ef565b5b612a1e888289016128a6565b925050608086013567ffffffffffffffff811115612a3f57612a3e6124ef565b5b612a4b8882890161295b565b9150509295509295909350565b60008060408385031215612a6f57612a6e6124ea565b5b6000612a7d85828601612573565b9250506020612a8e85828601612573565b9150509250929050565b6000604082019050612aad60008301856125c8565b612aba60208301846125c8565b9392505050565b600067ffffffffffffffff821115612adc57612adb612791565b5b602082029050602081019050919050565b6000612b00612afb84612ac1565b6127f1565b90508083825260208201905060208402830185811115612b2357612b22612838565b5b835b81811015612b4c5780612b38888261253d565b845260208401935050602081019050612b25565b5050509392505050565b600082601f830112612b6b57612b6a61278c565b5b8135612b7b848260208601612aed565b91505092915050565b60008060408385031215612b9b57612b9a6124ea565b5b600083013567ffffffffffffffff811115612bb957612bb86124ef565b5b612bc585828601612b56565b925050602083013567ffffffffffffffff811115612be657612be56124ef565b5b612bf2858286016128a6565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b612c3181612552565b82525050565b6000612c438383612c28565b60208301905092915050565b6000602082019050919050565b6000612c6782612bfc565b612c718185612c07565b9350612c7c83612c18565b8060005b83811015612cad578151612c948882612c37565b9750612c9f83612c4f565b925050600181019050612c80565b5085935050505092915050565b60006020820190508181036000830152612cd48184612c5c565b905092915050565b600067ffffffffffffffff821115612cf757612cf6612791565b5b612d0082612720565b9050602081019050919050565b6000612d20612d1b84612cdc565b6127f1565b905082815260208101848484011115612d3c57612d3b6128d4565b5b612d4784828561290a565b509392505050565b600082601f830112612d6457612d6361278c565b5b8135612d74848260208601612d0d565b91505092915050565b600060208284031215612d9357612d926124ea565b5b600082013567ffffffffffffffff811115612db157612db06124ef565b5b612dbd84828501612d4f565b91505092915050565b612dcf81612514565b82525050565b6000602082019050612dea6000830184612dc6565b92915050565b612df981612677565b8114612e0457600080fd5b50565b600081359050612e1681612df0565b92915050565b60008060408385031215612e3357612e326124ea565b5b6000612e418582860161253d565b9250506020612e5285828601612e07565b9150509250929050565b600080600060608486031215612e7557612e746124ea565b5b6000612e8386828701612573565b9350506020612e9486828701612573565b9250506040612ea58682870161253d565b9150509250925092565b60008060408385031215612ec657612ec56124ea565b5b6000612ed48582860161253d565b9250506020612ee58582860161253d565b9150509250929050565b600080600080600060a08688031215612f0b57612f0a6124ea565b5b6000612f198882890161253d565b9550506020612f2a8882890161253d565b9450506040612f3b88828901612573565b9350506060612f4c88828901612573565b925050608086013567ffffffffffffffff811115612f6d57612f6c6124ef565b5b612f798882890161295b565b9150509295509295909350565b600060208284031215612f9c57612f9b6124ea565b5b6000612faa8482850161253d565b91505092915050565b7f455243313135353a2061646472657373207a65726f206973206e6f742061207660008201527f616c6964206f776e657200000000000000000000000000000000000000000000602082015250565b600061300f602a836126e5565b915061301a82612fb3565b604082019050919050565b6000602082019050818103600083015261303e81613002565b9050919050565b7f5552492072657175657374656420666f7220696e76616c696420746f6b656e00600082015250565b600061307b601f836126e5565b915061308682613045565b602082019050919050565b600060208201905081810360008301526130aa8161306e565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806130f857607f821691505b60208210810361310b5761310a6130b1565b5b50919050565b600081905092915050565b60008190508160005260206000209050919050565b6000815461313e816130e0565b6131488186613111565b945060018216600081146131635760018114613178576131ab565b60ff19831686528115158202860193506131ab565b6131818561311c565b60005b838110156131a357815481890152600182019150602081019050613184565b838801955050505b50505092915050565b60006131bf826126da565b6131c98185613111565b93506131d98185602086016126f6565b80840191505092915050565b7f2e6a736f6e000000000000000000000000000000000000000000000000000000600082015250565b600061321b600583613111565b9150613226826131e5565b600582019050919050565b600061323d8285613131565b915061324982846131b4565b91506132548261320e565b91508190509392505050565b7f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60008201527f6572206f7220617070726f766564000000000000000000000000000000000000602082015250565b60006132bc602e836126e5565b91506132c782613260565b604082019050919050565b600060208201905081810360008301526132eb816132af565b9050919050565b7f496e76616c69642064656e6f6d696e6174696f6e000000000000000000000000600082015250565b60006133286014836126e5565b9150613333826132f2565b602082019050919050565b600060208201905081810360008301526133578161331b565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061339882612552565b91506133a383612552565b92508282026133b181612552565b915082820484148315176133c8576133c761335e565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061340982612552565b915061341483612552565b925082613424576134236133cf565b5b828204905092915050565b7f455243313135353a206163636f756e747320616e6420696473206c656e67746860008201527f206d69736d617463680000000000000000000000000000000000000000000000602082015250565b600061348b6029836126e5565b91506134968261342f565b604082019050919050565b600060208201905081810360008301526134ba8161347e565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006134fb82612552565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361352d5761352c61335e565b5b600182019050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026135857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82613548565b61358f8683613548565b95508019841693508086168417925050509392505050565b6000819050919050565b60006135cc6135c76135c284612552565b6135a7565b612552565b9050919050565b6000819050919050565b6135e6836135b1565b6135fa6135f2826135d3565b848454613555565b825550505050565b600090565b61360f613602565b61361a8184846135dd565b505050565b5b8181101561363e57613633600082613607565b600181019050613620565b5050565b601f821115613683576136548161311c565b61365d84613538565b8101602085101561366c578190505b61368061367885613538565b83018261361f565b50505b505050565b600082821c905092915050565b60006136a660001984600802613688565b1980831691505092915050565b60006136bf8383613695565b9150826002028217905092915050565b6136d8826126da565b67ffffffffffffffff8111156136f1576136f0612791565b5b6136fb82546130e0565b613706828285613642565b600060209050601f8311600181146137395760008415613727578287015190505b61373185826136b3565b865550613799565b601f1984166137478661311c565b60005b8281101561376f5784890151825560018201915060208501945060208101905061374a565b8683101561378c5784890151613788601f891682613695565b8355505b6001600288020188555050505b505050505050565b7f4665652070657263656e7461676520746f6f2068696768000000000000000000600082015250565b60006137d76017836126e5565b91506137e2826137a1565b602082019050919050565b60006020820190508181036000830152613806816137ca565b9050919050565b7f496e73756666696369656e742062616c616e6365000000000000000000000000600082015250565b60006138436014836126e5565b915061384e8261380d565b602082019050919050565b6000602082019050818103600083015261387281613836565b9050919050565b7f52656365697665722063616e6e6f74206265206e756c6c000000000000000000600082015250565b60006138af6017836126e5565b91506138ba82613879565b602082019050919050565b600060208201905081810360008301526138de816138a2565b9050919050565b60006138f082612552565b91506138fb83612552565b92508282019050808211156139135761391261335e565b5b92915050565b7f496e636f72726563742046544e20616d6f756e742073656e7400000000000000600082015250565b600061394f6019836126e5565b915061395a82613919565b602082019050919050565b6000602082019050818103600083015261397e81613942565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006139e16026836126e5565b91506139ec82613985565b604082019050919050565b60006020820190508181036000830152613a10816139d4565b9050919050565b7f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060008201527f6d69736d61746368000000000000000000000000000000000000000000000000602082015250565b6000613a736028836126e5565b9150613a7e82613a17565b604082019050919050565b60006020820190508181036000830152613aa281613a66565b9050919050565b7f455243313135353a207472616e7366657220746f20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000613b056025836126e5565b9150613b1082613aa9565b604082019050919050565b60006020820190508181036000830152613b3481613af8565b9050919050565b7f455243313135353a20696e73756666696369656e742062616c616e636520666f60008201527f72207472616e7366657200000000000000000000000000000000000000000000602082015250565b6000613b97602a836126e5565b9150613ba282613b3b565b604082019050919050565b60006020820190508181036000830152613bc681613b8a565b9050919050565b60006040820190508181036000830152613be78185612c5c565b90508181036020830152613bfb8184612c5c565b90509392505050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000613c3a6020836126e5565b9150613c4582613c04565b602082019050919050565b60006020820190508181036000830152613c6981613c2d565b9050919050565b7f455243313135353a2073657474696e6720617070726f76616c2073746174757360008201527f20666f722073656c660000000000000000000000000000000000000000000000602082015250565b6000613ccc6029836126e5565b9150613cd782613c70565b604082019050919050565b60006020820190508181036000830152613cfb81613cbf565b9050919050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b6000613d38601f836126e5565b9150613d4382613d02565b602082019050919050565b60006020820190508181036000830152613d6781613d2b565b9050919050565b7f455243313135353a206275726e2066726f6d20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000613dca6023836126e5565b9150613dd582613d6e565b604082019050919050565b60006020820190508181036000830152613df981613dbd565b9050919050565b7f455243313135353a206275726e20616d6f756e7420657863656564732062616c60008201527f616e636500000000000000000000000000000000000000000000000000000000602082015250565b6000613e5c6024836126e5565b9150613e6782613e00565b604082019050919050565b60006020820190508181036000830152613e8b81613e4f565b9050919050565b7f455243313135353a206d696e7420746f20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b6000613eee6021836126e5565b9150613ef982613e92565b604082019050919050565b60006020820190508181036000830152613f1d81613ee1565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000613f4b82613f24565b613f558185613f2f565b9350613f658185602086016126f6565b613f6e81612720565b840191505092915050565b600060a082019050613f8e6000830188612dc6565b613f9b6020830187612dc6565b8181036040830152613fad8186612c5c565b90508181036060830152613fc18185612c5c565b90508181036080830152613fd58184613f40565b90509695505050505050565b600081519050613ff08161261e565b92915050565b60006020828403121561400c5761400b6124ea565b5b600061401a84828501613fe1565b91505092915050565b60008160e01c9050919050565b600060033d111561404f5760046000803e61404c600051614023565b90505b90565b600060443d106140df576140646124e0565b60043d036004823e80513d602482011167ffffffffffffffff8211171561408c5750506140df565b808201805167ffffffffffffffff8111156140aa57505050506140df565b80602083010160043d0385018111156140c75750505050506140df565b6140d6826020018501866127c0565b82955050505050505b90565b7f455243313135353a207472616e7366657220746f206e6f6e2d4552433131353560008201527f526563656976657220696d706c656d656e746572000000000000000000000000602082015250565b600061413e6034836126e5565b9150614149826140e2565b604082019050919050565b6000602082019050818103600083015261416d81614131565b9050919050565b7f455243313135353a204552433131353552656365697665722072656a6563746560008201527f6420746f6b656e73000000000000000000000000000000000000000000000000602082015250565b60006141d06028836126e5565b91506141db82614174565b604082019050919050565b600060208201905081810360008301526141ff816141c3565b9050919050565b600060a08201905061421b6000830188612dc6565b6142286020830187612dc6565b61423560408301866125c8565b61424260608301856125c8565b81810360808301526142548184613f40565b9050969550505050505056fea2646970667358221220c7df06ff2ea544a2f6a870cb74071bfbd01ea341c8e9c4ede255bd2f4bceb9a364736f6c63430008130033
Deployed ByteCode
0x6080604052600436106101c55760003560e01c8063942c4d25116100f7578063ce1aad2311610095578063ee2f3a0511610064578063ee2f3a0514610654578063f242432a1461067f578063f2fde38b146106a8578063f85fc0ab146106d1576101cc565b8063ce1aad23146105a5578063dd47f7e2146105d0578063e7d3fe6b146105fb578063e985e9c514610617576101cc565b8063ad57f9f1116100d1578063ad57f9f1146104fd578063ae06c1b714610528578063b390c0ab14610551578063cbf5a55e1461057a576101cc565b8063942c4d251461047e578063a001ecdd146104a9578063a22cb465146104d4576101cc565b8063487a23951161016457806364c831951161013e57806364c83195146103d4578063715018a614610411578063851cad90146104285780638da5cb5b14610453576101cc565b8063487a2395146103305780634e1273f41461036e57806355f804b3146103ab576101cc565b806313114a9d116101a057806313114a9d146102885780632eb2c2d6146102b3578063449dd521146102dc578063476343ee14610319576101cc565b8062fdd58e146101d157806301ffc9a71461020e5780630e89341c1461024b576101cc565b366101cc57005b600080fd5b3480156101dd57600080fd5b506101f860048036038101906101f39190612588565b6106fc565b60405161020591906125d7565b60405180910390f35b34801561021a57600080fd5b506102356004803603810190610230919061264a565b6107c4565b6040516102429190612692565b60405180910390f35b34801561025757600080fd5b50610272600480360381019061026d91906126ad565b6108a6565b60405161027f919061276a565b60405180910390f35b34801561029457600080fd5b5061029d610930565b6040516102aa91906125d7565b60405180910390f35b3480156102bf57600080fd5b506102da60048036038101906102d59190612989565b610936565b005b3480156102e857600080fd5b5061030360048036038101906102fe91906126ad565b6109d7565b60405161031091906125d7565b60405180910390f35b34801561032557600080fd5b5061032e6109ef565b005b34801561033c57600080fd5b5061035760048036038101906103529190612a58565b610a57565b604051610365929190612a98565b60405180910390f35b34801561037a57600080fd5b5061039560048036038101906103909190612b84565b610b07565b6040516103a29190612cba565b60405180910390f35b3480156103b757600080fd5b506103d260048036038101906103cd9190612d7d565b610c20565b005b3480156103e057600080fd5b506103fb60048036038101906103f691906126ad565b610c3b565b60405161040891906125d7565b60405180910390f35b34801561041d57600080fd5b50610426610c53565b005b34801561043457600080fd5b5061043d610c67565b60405161044a91906125d7565b60405180910390f35b34801561045f57600080fd5b50610468610c6c565b6040516104759190612dd5565b60405180910390f35b34801561048a57600080fd5b50610493610c96565b6040516104a091906125d7565b60405180910390f35b3480156104b557600080fd5b506104be610c9b565b6040516104cb91906125d7565b60405180910390f35b3480156104e057600080fd5b506104fb60048036038101906104f69190612e1c565b610ca1565b005b34801561050957600080fd5b50610512610cb7565b60405161051f91906125d7565b60405180910390f35b34801561053457600080fd5b5061054f600480360381019061054a91906126ad565b610cbc565b005b34801561055d57600080fd5b5061057860048036038101906105739190612a58565b610d12565b005b34801561058657600080fd5b5061058f610e01565b60405161059c91906125d7565b60405180910390f35b3480156105b157600080fd5b506105ba610e07565b6040516105c791906125d7565b60405180910390f35b3480156105dc57600080fd5b506105e5610e0c565b6040516105f291906125d7565b60405180910390f35b61061560048036038101906106109190612e5c565b610e11565b005b34801561062357600080fd5b5061063e60048036038101906106399190612eaf565b610f75565b60405161064b9190612692565b60405180910390f35b34801561066057600080fd5b50610669611009565b60405161067691906125d7565b60405180910390f35b34801561068b57600080fd5b506106a660048036038101906106a19190612eef565b61100e565b005b3480156106b457600080fd5b506106cf60048036038101906106ca9190612f86565b6110af565b005b3480156106dd57600080fd5b506106e6611132565b6040516106f391906125d7565b60405180910390f35b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361076c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161076390613025565b60405180910390fd5b60008083815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60007fd9b67a26000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061088f57507f0e89341c000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061089f575061089e82611137565b5b9050919050565b606060006005600084815260200190815260200160002054116108fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108f590613091565b60405180910390fd5b6009610909836111a1565b60405160200161091a929190613231565b6040516020818303038152906040529050919050565b60085481565b61093e61126f565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16148061098457506109838561097e61126f565b610f75565b5b6109c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109ba906132d2565b60405180910390fd5b6109d08585858585611277565b5050505050565b60056020528060005260406000206000915090505481565b6109f7611598565b600060085490506000600881905550610a0e610c6c565b73ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610a53573d6000803e3d6000fd5b5050565b60008060006006600086815260200190815260200160002054905080600003610ab5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aac9061333e565b60405180910390fd5b6000670de0b6b3a76400008587610acc919061338d565b610ad6919061338d565b9050600061271060075483610aeb919061338d565b610af591906133fe565b90508181945094505050509250929050565b60608151835114610b4d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b44906134a1565b60405180910390fd5b6000835167ffffffffffffffff811115610b6a57610b69612791565b5b604051908082528060200260200182016040528015610b985781602001602082028036833780820191505090505b50905060005b8451811015610c1557610be5858281518110610bbd57610bbc6134c1565b5b6020026020010151858381518110610bd857610bd76134c1565b5b60200260200101516106fc565b828281518110610bf857610bf76134c1565b5b60200260200101818152505080610c0e906134f0565b9050610b9e565b508091505092915050565b610c28611598565b8060099081610c3791906136cf565b5050565b60066020528060005260406000206000915090505481565b610c5b611598565b610c656000611616565b565b600681565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600181565b60075481565b610cb3610cac61126f565b83836116dc565b5050565b600481565b610cc4611598565b6064811115610d08576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cff906137ed565b60405180910390fd5b8060078190555050565b610d1a611848565b80610d2533846106fc565b1015610d66576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d5d90613859565b60405180910390fd5b6000600560008481526020019081526020016000205490506000670de0b6b3a76400008383610d95919061338d565b610d9f919061338d565b9050610dac338585611897565b3373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610df2573d6000803e3d6000fd5b505050610dfd611add565b5050565b61271081565b600781565b600381565b60006006600085815260200190815260200160002054905080600003610e6c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e639061333e565b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff1603610edb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ed2906138c5565b60405180910390fd5b600080610ee88686610a57565b915091508082610ef891906138e5565b3414610f39576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f3090613965565b60405180910390fd5b8060086000828254610f4b91906138e5565b92505081905550610f6d84848760405180602001604052806000815250611ae7565b505050505050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600281565b61101661126f565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16148061105c575061105b8561105661126f565b610f75565b5b61109b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611092906132d2565b60405180910390fd5b6110a88585858585611c97565b5050505050565b6110b7611598565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611126576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161111d906139f7565b60405180910390fd5b61112f81611616565b50565b600581565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b6060600060016111b084611f32565b01905060008167ffffffffffffffff8111156111cf576111ce612791565b5b6040519080825280601f01601f1916602001820160405280156112015781602001600182028036833780820191505090505b509050600082602001820190505b600115611264578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8581611258576112576133cf565b5b0494506000850361120f575b819350505050919050565b600033905090565b81518351146112bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112b290613a89565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff160361132a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161132190613b1b565b60405180910390fd5b600061133461126f565b9050611344818787878787612085565b60005b84518110156114f5576000858281518110611365576113646134c1565b5b602002602001015190506000858381518110611384576113836134c1565b5b60200260200101519050600080600084815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611425576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161141c90613bad565b60405180910390fd5b81810360008085815260200190815260200160002060008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508160008085815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546114da91906138e5565b92505081905550505050806114ee906134f0565b9050611347565b508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161156c929190613bcd565b60405180910390a461158281878787878761208d565b611590818787878787612095565b505050505050565b6115a061126f565b73ffffffffffffffffffffffffffffffffffffffff166115be610c6c565b73ffffffffffffffffffffffffffffffffffffffff1614611614576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161160b90613c50565b60405180910390fd5b565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361174a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161174190613ce2565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161183b9190612692565b60405180910390a3505050565b60026004540361188d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161188490613d4e565b60405180910390fd5b6002600481905550565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611906576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118fd90613de0565b60405180910390fd5b600061191061126f565b9050600061191d8461226c565b9050600061192a8461226c565b905061194a83876000858560405180602001604052806000815250612085565b600080600087815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050848110156119e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119d890613e72565b60405180910390fd5b84810360008088815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628989604051611aae929190612a98565b60405180910390a4611ad48488600086866040518060200160405280600081525061208d565b50505050505050565b6001600481905550565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603611b56576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b4d90613f04565b60405180910390fd5b6000611b6061126f565b90506000611b6d8561226c565b90506000611b7a8561226c565b9050611b8b83600089858589612085565b8460008088815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611bea91906138e5565b925050819055508673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628989604051611c68929190612a98565b60405180910390a4611c7f8360008985858961208d565b611c8e836000898989896122e6565b50505050505050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603611d06576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cfd90613b1b565b60405180910390fd5b6000611d1061126f565b90506000611d1d8561226c565b90506000611d2a8561226c565b9050611d3a838989858589612085565b600080600088815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905085811015611dd1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dc890613bad565b60405180910390fd5b85810360008089815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508560008089815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611e8691906138e5565b925050819055508773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628a8a604051611f03929190612a98565b60405180910390a4611f19848a8a86868a61208d565b611f27848a8a8a8a8a6122e6565b505050505050505050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310611f90577a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008381611f8657611f856133cf565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310611fcd576d04ee2d6d415b85acef81000000008381611fc357611fc26133cf565b5b0492506020810190505b662386f26fc100008310611ffc57662386f26fc100008381611ff257611ff16133cf565b5b0492506010810190505b6305f5e1008310612025576305f5e100838161201b5761201a6133cf565b5b0492506008810190505b612710831061204a5761271083816120405761203f6133cf565b5b0492506004810190505b6064831061206d5760648381612063576120626133cf565b5b0492506002810190505b600a831061207c576001810190505b80915050919050565b505050505050565b505050505050565b6120b48473ffffffffffffffffffffffffffffffffffffffff166124bd565b15612264578373ffffffffffffffffffffffffffffffffffffffff1663bc197c8187878686866040518663ffffffff1660e01b81526004016120fa959493929190613f79565b6020604051808303816000875af192505050801561213657506040513d601f19601f820116820180604052508101906121339190613ff6565b60015b6121db57612142614030565b806308c379a00361219e5750612156614052565b8061216157506121a0565b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612195919061276a565b60405180910390fd5b505b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121d290614154565b60405180910390fd5b63bc197c8160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614612262576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612259906141e6565b60405180910390fd5b505b505050505050565b60606000600167ffffffffffffffff81111561228b5761228a612791565b5b6040519080825280602002602001820160405280156122b95781602001602082028036833780820191505090505b50905082816000815181106122d1576122d06134c1565b5b60200260200101818152505080915050919050565b6123058473ffffffffffffffffffffffffffffffffffffffff166124bd565b156124b5578373ffffffffffffffffffffffffffffffffffffffff1663f23a6e6187878686866040518663ffffffff1660e01b815260040161234b959493929190614206565b6020604051808303816000875af192505050801561238757506040513d601f19601f820116820180604052508101906123849190613ff6565b60015b61242c57612393614030565b806308c379a0036123ef57506123a7614052565b806123b257506123f1565b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123e6919061276a565b60405180910390fd5b505b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161242390614154565b60405180910390fd5b63f23a6e6160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916146124b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124aa906141e6565b60405180910390fd5b505b505050505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061251f826124f4565b9050919050565b61252f81612514565b811461253a57600080fd5b50565b60008135905061254c81612526565b92915050565b6000819050919050565b61256581612552565b811461257057600080fd5b50565b6000813590506125828161255c565b92915050565b6000806040838503121561259f5761259e6124ea565b5b60006125ad8582860161253d565b92505060206125be85828601612573565b9150509250929050565b6125d181612552565b82525050565b60006020820190506125ec60008301846125c8565b92915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612627816125f2565b811461263257600080fd5b50565b6000813590506126448161261e565b92915050565b6000602082840312156126605761265f6124ea565b5b600061266e84828501612635565b91505092915050565b60008115159050919050565b61268c81612677565b82525050565b60006020820190506126a76000830184612683565b92915050565b6000602082840312156126c3576126c26124ea565b5b60006126d184828501612573565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156127145780820151818401526020810190506126f9565b60008484015250505050565b6000601f19601f8301169050919050565b600061273c826126da565b61274681856126e5565b93506127568185602086016126f6565b61275f81612720565b840191505092915050565b600060208201905081810360008301526127848184612731565b905092915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6127c982612720565b810181811067ffffffffffffffff821117156127e8576127e7612791565b5b80604052505050565b60006127fb6124e0565b905061280782826127c0565b919050565b600067ffffffffffffffff82111561282757612826612791565b5b602082029050602081019050919050565b600080fd5b600061285061284b8461280c565b6127f1565b9050808382526020820190506020840283018581111561287357612872612838565b5b835b8181101561289c57806128888882612573565b845260208401935050602081019050612875565b5050509392505050565b600082601f8301126128bb576128ba61278c565b5b81356128cb84826020860161283d565b91505092915050565b600080fd5b600067ffffffffffffffff8211156128f4576128f3612791565b5b6128fd82612720565b9050602081019050919050565b82818337600083830152505050565b600061292c612927846128d9565b6127f1565b905082815260208101848484011115612948576129476128d4565b5b61295384828561290a565b509392505050565b600082601f8301126129705761296f61278c565b5b8135612980848260208601612919565b91505092915050565b600080600080600060a086880312156129a5576129a46124ea565b5b60006129b38882890161253d565b95505060206129c48882890161253d565b945050604086013567ffffffffffffffff8111156129e5576129e46124ef565b5b6129f1888289016128a6565b935050606086013567ffffffffffffffff811115612a1257612a116124ef565b5b612a1e888289016128a6565b925050608086013567ffffffffffffffff811115612a3f57612a3e6124ef565b5b612a4b8882890161295b565b9150509295509295909350565b60008060408385031215612a6f57612a6e6124ea565b5b6000612a7d85828601612573565b9250506020612a8e85828601612573565b9150509250929050565b6000604082019050612aad60008301856125c8565b612aba60208301846125c8565b9392505050565b600067ffffffffffffffff821115612adc57612adb612791565b5b602082029050602081019050919050565b6000612b00612afb84612ac1565b6127f1565b90508083825260208201905060208402830185811115612b2357612b22612838565b5b835b81811015612b4c5780612b38888261253d565b845260208401935050602081019050612b25565b5050509392505050565b600082601f830112612b6b57612b6a61278c565b5b8135612b7b848260208601612aed565b91505092915050565b60008060408385031215612b9b57612b9a6124ea565b5b600083013567ffffffffffffffff811115612bb957612bb86124ef565b5b612bc585828601612b56565b925050602083013567ffffffffffffffff811115612be657612be56124ef565b5b612bf2858286016128a6565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b612c3181612552565b82525050565b6000612c438383612c28565b60208301905092915050565b6000602082019050919050565b6000612c6782612bfc565b612c718185612c07565b9350612c7c83612c18565b8060005b83811015612cad578151612c948882612c37565b9750612c9f83612c4f565b925050600181019050612c80565b5085935050505092915050565b60006020820190508181036000830152612cd48184612c5c565b905092915050565b600067ffffffffffffffff821115612cf757612cf6612791565b5b612d0082612720565b9050602081019050919050565b6000612d20612d1b84612cdc565b6127f1565b905082815260208101848484011115612d3c57612d3b6128d4565b5b612d4784828561290a565b509392505050565b600082601f830112612d6457612d6361278c565b5b8135612d74848260208601612d0d565b91505092915050565b600060208284031215612d9357612d926124ea565b5b600082013567ffffffffffffffff811115612db157612db06124ef565b5b612dbd84828501612d4f565b91505092915050565b612dcf81612514565b82525050565b6000602082019050612dea6000830184612dc6565b92915050565b612df981612677565b8114612e0457600080fd5b50565b600081359050612e1681612df0565b92915050565b60008060408385031215612e3357612e326124ea565b5b6000612e418582860161253d565b9250506020612e5285828601612e07565b9150509250929050565b600080600060608486031215612e7557612e746124ea565b5b6000612e8386828701612573565b9350506020612e9486828701612573565b9250506040612ea58682870161253d565b9150509250925092565b60008060408385031215612ec657612ec56124ea565b5b6000612ed48582860161253d565b9250506020612ee58582860161253d565b9150509250929050565b600080600080600060a08688031215612f0b57612f0a6124ea565b5b6000612f198882890161253d565b9550506020612f2a8882890161253d565b9450506040612f3b88828901612573565b9350506060612f4c88828901612573565b925050608086013567ffffffffffffffff811115612f6d57612f6c6124ef565b5b612f798882890161295b565b9150509295509295909350565b600060208284031215612f9c57612f9b6124ea565b5b6000612faa8482850161253d565b91505092915050565b7f455243313135353a2061646472657373207a65726f206973206e6f742061207660008201527f616c6964206f776e657200000000000000000000000000000000000000000000602082015250565b600061300f602a836126e5565b915061301a82612fb3565b604082019050919050565b6000602082019050818103600083015261303e81613002565b9050919050565b7f5552492072657175657374656420666f7220696e76616c696420746f6b656e00600082015250565b600061307b601f836126e5565b915061308682613045565b602082019050919050565b600060208201905081810360008301526130aa8161306e565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806130f857607f821691505b60208210810361310b5761310a6130b1565b5b50919050565b600081905092915050565b60008190508160005260206000209050919050565b6000815461313e816130e0565b6131488186613111565b945060018216600081146131635760018114613178576131ab565b60ff19831686528115158202860193506131ab565b6131818561311c565b60005b838110156131a357815481890152600182019150602081019050613184565b838801955050505b50505092915050565b60006131bf826126da565b6131c98185613111565b93506131d98185602086016126f6565b80840191505092915050565b7f2e6a736f6e000000000000000000000000000000000000000000000000000000600082015250565b600061321b600583613111565b9150613226826131e5565b600582019050919050565b600061323d8285613131565b915061324982846131b4565b91506132548261320e565b91508190509392505050565b7f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60008201527f6572206f7220617070726f766564000000000000000000000000000000000000602082015250565b60006132bc602e836126e5565b91506132c782613260565b604082019050919050565b600060208201905081810360008301526132eb816132af565b9050919050565b7f496e76616c69642064656e6f6d696e6174696f6e000000000000000000000000600082015250565b60006133286014836126e5565b9150613333826132f2565b602082019050919050565b600060208201905081810360008301526133578161331b565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061339882612552565b91506133a383612552565b92508282026133b181612552565b915082820484148315176133c8576133c761335e565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061340982612552565b915061341483612552565b925082613424576134236133cf565b5b828204905092915050565b7f455243313135353a206163636f756e747320616e6420696473206c656e67746860008201527f206d69736d617463680000000000000000000000000000000000000000000000602082015250565b600061348b6029836126e5565b91506134968261342f565b604082019050919050565b600060208201905081810360008301526134ba8161347e565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006134fb82612552565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361352d5761352c61335e565b5b600182019050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026135857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82613548565b61358f8683613548565b95508019841693508086168417925050509392505050565b6000819050919050565b60006135cc6135c76135c284612552565b6135a7565b612552565b9050919050565b6000819050919050565b6135e6836135b1565b6135fa6135f2826135d3565b848454613555565b825550505050565b600090565b61360f613602565b61361a8184846135dd565b505050565b5b8181101561363e57613633600082613607565b600181019050613620565b5050565b601f821115613683576136548161311c565b61365d84613538565b8101602085101561366c578190505b61368061367885613538565b83018261361f565b50505b505050565b600082821c905092915050565b60006136a660001984600802613688565b1980831691505092915050565b60006136bf8383613695565b9150826002028217905092915050565b6136d8826126da565b67ffffffffffffffff8111156136f1576136f0612791565b5b6136fb82546130e0565b613706828285613642565b600060209050601f8311600181146137395760008415613727578287015190505b61373185826136b3565b865550613799565b601f1984166137478661311c565b60005b8281101561376f5784890151825560018201915060208501945060208101905061374a565b8683101561378c5784890151613788601f891682613695565b8355505b6001600288020188555050505b505050505050565b7f4665652070657263656e7461676520746f6f2068696768000000000000000000600082015250565b60006137d76017836126e5565b91506137e2826137a1565b602082019050919050565b60006020820190508181036000830152613806816137ca565b9050919050565b7f496e73756666696369656e742062616c616e6365000000000000000000000000600082015250565b60006138436014836126e5565b915061384e8261380d565b602082019050919050565b6000602082019050818103600083015261387281613836565b9050919050565b7f52656365697665722063616e6e6f74206265206e756c6c000000000000000000600082015250565b60006138af6017836126e5565b91506138ba82613879565b602082019050919050565b600060208201905081810360008301526138de816138a2565b9050919050565b60006138f082612552565b91506138fb83612552565b92508282019050808211156139135761391261335e565b5b92915050565b7f496e636f72726563742046544e20616d6f756e742073656e7400000000000000600082015250565b600061394f6019836126e5565b915061395a82613919565b602082019050919050565b6000602082019050818103600083015261397e81613942565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006139e16026836126e5565b91506139ec82613985565b604082019050919050565b60006020820190508181036000830152613a10816139d4565b9050919050565b7f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060008201527f6d69736d61746368000000000000000000000000000000000000000000000000602082015250565b6000613a736028836126e5565b9150613a7e82613a17565b604082019050919050565b60006020820190508181036000830152613aa281613a66565b9050919050565b7f455243313135353a207472616e7366657220746f20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000613b056025836126e5565b9150613b1082613aa9565b604082019050919050565b60006020820190508181036000830152613b3481613af8565b9050919050565b7f455243313135353a20696e73756666696369656e742062616c616e636520666f60008201527f72207472616e7366657200000000000000000000000000000000000000000000602082015250565b6000613b97602a836126e5565b9150613ba282613b3b565b604082019050919050565b60006020820190508181036000830152613bc681613b8a565b9050919050565b60006040820190508181036000830152613be78185612c5c565b90508181036020830152613bfb8184612c5c565b90509392505050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000613c3a6020836126e5565b9150613c4582613c04565b602082019050919050565b60006020820190508181036000830152613c6981613c2d565b9050919050565b7f455243313135353a2073657474696e6720617070726f76616c2073746174757360008201527f20666f722073656c660000000000000000000000000000000000000000000000602082015250565b6000613ccc6029836126e5565b9150613cd782613c70565b604082019050919050565b60006020820190508181036000830152613cfb81613cbf565b9050919050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b6000613d38601f836126e5565b9150613d4382613d02565b602082019050919050565b60006020820190508181036000830152613d6781613d2b565b9050919050565b7f455243313135353a206275726e2066726f6d20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000613dca6023836126e5565b9150613dd582613d6e565b604082019050919050565b60006020820190508181036000830152613df981613dbd565b9050919050565b7f455243313135353a206275726e20616d6f756e7420657863656564732062616c60008201527f616e636500000000000000000000000000000000000000000000000000000000602082015250565b6000613e5c6024836126e5565b9150613e6782613e00565b604082019050919050565b60006020820190508181036000830152613e8b81613e4f565b9050919050565b7f455243313135353a206d696e7420746f20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b6000613eee6021836126e5565b9150613ef982613e92565b604082019050919050565b60006020820190508181036000830152613f1d81613ee1565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000613f4b82613f24565b613f558185613f2f565b9350613f658185602086016126f6565b613f6e81612720565b840191505092915050565b600060a082019050613f8e6000830188612dc6565b613f9b6020830187612dc6565b8181036040830152613fad8186612c5c565b90508181036060830152613fc18185612c5c565b90508181036080830152613fd58184613f40565b90509695505050505050565b600081519050613ff08161261e565b92915050565b60006020828403121561400c5761400b6124ea565b5b600061401a84828501613fe1565b91505092915050565b60008160e01c9050919050565b600060033d111561404f5760046000803e61404c600051614023565b90505b90565b600060443d106140df576140646124e0565b60043d036004823e80513d602482011167ffffffffffffffff8211171561408c5750506140df565b808201805167ffffffffffffffff8111156140aa57505050506140df565b80602083010160043d0385018111156140c75750505050506140df565b6140d6826020018501866127c0565b82955050505050505b90565b7f455243313135353a207472616e7366657220746f206e6f6e2d4552433131353560008201527f526563656976657220696d706c656d656e746572000000000000000000000000602082015250565b600061413e6034836126e5565b9150614149826140e2565b604082019050919050565b6000602082019050818103600083015261416d81614131565b9050919050565b7f455243313135353a204552433131353552656365697665722072656a6563746560008201527f6420746f6b656e73000000000000000000000000000000000000000000000000602082015250565b60006141d06028836126e5565b91506141db82614174565b604082019050919050565b600060208201905081810360008301526141ff816141c3565b9050919050565b600060a08201905061421b6000830188612dc6565b6142286020830187612dc6565b61423560408301866125c8565b61424260608301856125c8565b81810360808301526142548184613f40565b9050969550505050505056fea2646970667358221220c7df06ff2ea544a2f6a870cb74071bfbd01ea341c8e9c4ede255bd2f4bceb9a364736f6c63430008130033