Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
- Contract name:
- YoGift
- Optimization enabled
- false
- Compiler version
- v0.8.19+commit.7dd6d404
- EVM Version
- default
- Verified at
- 2024-11-29T14:23:47.063879Z
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 TEN = 1;
uint256 public constant TWENTY = 2;
uint256 public constant FIFTY = 3;
uint256 public constant HUNDRED = 4;
uint256 public constant THOUSAND = 5;
uint256 public constant TEN_THOUSAND = 6;
// Mapping from token ID to its denomination value
mapping(uint256 => uint256) public denominationValues;
// Mapping from denomination value to token ID
mapping(uint256 => uint256) public denominationToId;
// Fee percentage (e.g., 1%)
uint256 public feePercentage = 1;
// Total fees collected
uint256 public totalFees;
// Base URI
string private baseURI;
constructor() ERC1155('') {
// Initialize denomination values
denominationValues[TEN] = 10 ether;
denominationValues[TWENTY] = 20 ether;
denominationValues[FIFTY] = 50 ether;
denominationValues[HUNDRED] = 100 ether;
denominationValues[THOUSAND] = 1000 ether;
denominationValues[TEN_THOUSAND] = 10000 ether;
// Initialize denomination to ID mapping
denominationToId[10 ether] = TEN;
denominationToId[20 ether] = TWENTY;
denominationToId[50 ether] = FIFTY;
denominationToId[100 ether] = HUNDRED;
denominationToId[1000 ether] = THOUSAND;
denominationToId[10000 ether] = TEN_THOUSAND;
// Set the base URI (replace with your actual IPFS CID)
baseURI = '';
}
// Override the uri function to return token-specific metadata
function uri(uint256 _id) override public view returns (string memory) {
require(denominationValues[_id] > 0, 'URI requested for invalid token');
return string(abi.encodePacked(baseURI, _id.toString(), '.json'));
}
// Mint function accepting denomination value instead of token ID
function mint(uint256 denominationValue, uint256 amount) external payable {
uint256 id = denominationToId[denominationValue];
require(id != 0, 'Invalid denomination');
uint256 totalValue = denominationValue * amount;
uint256 fee = (totalValue * feePercentage) / 100; // e.g., 1% fee
uint256 requiredAmount = totalValue + fee;
require(msg.value == requiredAmount, 'Incorrect ETH amount sent');
totalFees += fee; // Update total fees collected
_mint(msg.sender, id, amount, '');
}
// Burn and redeem function
function burn(uint256 id, uint256 amount) external nonReentrant {
require(balanceOf(msg.sender, id) >= amount, 'Insufficient balance');
uint256 denomination = denominationValues[id];
uint256 totalValue = denomination * amount;
_burn(msg.sender, id, amount);
payable(msg.sender).transfer(totalValue);
}
// Admin function to withdraw collected fees
function withdrawFees() external onlyOwner {
uint256 fees = totalFees;
totalFees = 0; // Reset the fees
payable(owner()).transfer(fees);
}
// Function to set fee percentage
function setFeePercentage(uint256 _feePercentage) external onlyOwner {
require(_feePercentage <= 100, 'Fee percentage too high');
feePercentage = _feePercentage;
}
// Function to set base URI
function setBaseURI(string memory newuri) public onlyOwner {
baseURI = newuri;
}
// Fallback function to receive ETH
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":"HUNDRED","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"TEN","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"TEN_THOUSAND","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"THOUSAND","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"TWENTY","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceOf","inputs":[{"type":"address","name":"account","internalType":"address"},{"type":"uint256","name":"id","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256[]","name":"","internalType":"uint256[]"}],"name":"balanceOfBatch","inputs":[{"type":"address[]","name":"accounts","internalType":"address[]"},{"type":"uint256[]","name":"ids","internalType":"uint256[]"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"burn","inputs":[{"type":"uint256","name":"id","internalType":"uint256"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"denominationToId","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"denominationValues","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"feePercentage","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isApprovedForAll","inputs":[{"type":"address","name":"account","internalType":"address"},{"type":"address","name":"operator","internalType":"address"}]},{"type":"function","stateMutability":"payable","outputs":[],"name":"mint","inputs":[{"type":"uint256","name":"denominationValue","internalType":"uint256"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"safeBatchTransferFrom","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256[]","name":"ids","internalType":"uint256[]"},{"type":"uint256[]","name":"amounts","internalType":"uint256[]"},{"type":"bytes","name":"data","internalType":"bytes"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"safeTransferFrom","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"id","internalType":"uint256"},{"type":"uint256","name":"amount","internalType":"uint256"},{"type":"bytes","name":"data","internalType":"bytes"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setApprovalForAll","inputs":[{"type":"address","name":"operator","internalType":"address"},{"type":"bool","name":"approved","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setBaseURI","inputs":[{"type":"string","name":"newuri","internalType":"string"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setFeePercentage","inputs":[{"type":"uint256","name":"_feePercentage","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"supportsInterface","inputs":[{"type":"bytes4","name":"interfaceId","internalType":"bytes4"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalFees","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"uri","inputs":[{"type":"uint256","name":"_id","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdrawFees","inputs":[]},{"type":"receive","stateMutability":"payable"}]
Contract Creation Code
0x608060405260016007553480156200001657600080fd5b506040518060200160405280600081525062000038816200021f60201b60201c565b50620000596200004d6200023460201b60201c565b6200023c60201b60201c565b6001600481905550678ac7230489e800006005600060018152602001908152602001600020819055506801158e460913d000006005600060028152602001908152602001600020819055506802b5e3af16b188000060056000600381526020019081526020016000208190555068056bc75e2d63100000600560006004815260200190815260200160002081905550683635c9adc5dea0000060056000600581526020019081526020016000208190555069021e19e0c9bab2400000600560006006815260200190815260200160002081905550600160066000678ac7230489e800008152602001908152602001600020819055506002600660006801158e460913d000008152602001908152602001600020819055506003600660006802b5e3af16b188000081526020019081526020016000208190555060046006600068056bc75e2d63100000815260200190815260200160002081905550600560066000683635c9adc5dea00000815260200190815260200160002081905550600680600069021e19e0c9bab240000081526020019081526020016000208190555060405180602001604052806000815250600990816200021891906200057c565b5062000663565b80600290816200023091906200057c565b5050565b600033905090565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200038457607f821691505b6020821081036200039a57620003996200033c565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302620004047fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620003c5565b620004108683620003c5565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b60006200045d62000457620004518462000428565b62000432565b62000428565b9050919050565b6000819050919050565b62000479836200043c565b62000491620004888262000464565b848454620003d2565b825550505050565b600090565b620004a862000499565b620004b58184846200046e565b505050565b5b81811015620004dd57620004d16000826200049e565b600181019050620004bb565b5050565b601f8211156200052c57620004f681620003a0565b6200050184620003b5565b8101602085101562000511578190505b620005296200052085620003b5565b830182620004ba565b50505b505050565b600082821c905092915050565b6000620005516000198460080262000531565b1980831691505092915050565b60006200056c83836200053e565b9150826002028217905092915050565b620005878262000302565b67ffffffffffffffff811115620005a357620005a26200030d565b5b620005af82546200036b565b620005bc828285620004e1565b600060209050601f831160018114620005f45760008415620005df578287015190505b620005eb85826200055e565b8655506200065b565b601f1984166200060486620003a0565b60005b828110156200062e5784890151825560018201915060208501945060208101905062000607565b868310156200064e57848901516200064a601f8916826200053e565b8355505b6001600288020188555050505b505050505050565b613fe780620006736000396000f3fe6080604052600436106101845760003560e01c80638da5cb5b116100d1578063ce1aad231161008a578063ee2f3a0511610064578063ee2f3a051461057f578063f242432a146105aa578063f2fde38b146105d3578063f85fc0ab146105fc5761018b565b8063ce1aad23146104ec578063dd47f7e214610517578063e985e9c5146105425761018b565b80638da5cb5b146103f0578063a001ecdd1461041b578063a22cb46514610446578063ad57f9f11461046f578063ae06c1b71461049a578063b390c0ab146104c35761018b565b8063449dd5211161013e57806355f804b31161011857806355f804b31461034857806364c8319514610371578063715018a6146103ae578063851cad90146103c55761018b565b8063449dd521146102b7578063476343ee146102f45780634e1273f41461030b5761018b565b8062fdd58e1461019057806301ffc9a7146101cd5780630e89341c1461020a57806313114a9d146102475780631b2ef1ca146102725780632eb2c2d61461028e5761018b565b3661018b57005b600080fd5b34801561019c57600080fd5b506101b760048036038101906101b29190612398565b610627565b6040516101c491906123e7565b60405180910390f35b3480156101d957600080fd5b506101f460048036038101906101ef919061245a565b6106ef565b60405161020191906124a2565b60405180910390f35b34801561021657600080fd5b50610231600480360381019061022c91906124bd565b6107d1565b60405161023e919061257a565b60405180910390f35b34801561025357600080fd5b5061025c61085b565b60405161026991906123e7565b60405180910390f35b61028c6004803603810190610287919061259c565b610861565b005b34801561029a57600080fd5b506102b560048036038101906102b091906127d9565b610978565b005b3480156102c357600080fd5b506102de60048036038101906102d991906124bd565b610a19565b6040516102eb91906123e7565b60405180910390f35b34801561030057600080fd5b50610309610a31565b005b34801561031757600080fd5b50610332600480360381019061032d919061296b565b610a99565b60405161033f9190612aa1565b60405180910390f35b34801561035457600080fd5b5061036f600480360381019061036a9190612b64565b610bb2565b005b34801561037d57600080fd5b50610398600480360381019061039391906124bd565b610bcd565b6040516103a591906123e7565b60405180910390f35b3480156103ba57600080fd5b506103c3610be5565b005b3480156103d157600080fd5b506103da610bf9565b6040516103e791906123e7565b60405180910390f35b3480156103fc57600080fd5b50610405610bfe565b6040516104129190612bbc565b60405180910390f35b34801561042757600080fd5b50610430610c28565b60405161043d91906123e7565b60405180910390f35b34801561045257600080fd5b5061046d60048036038101906104689190612c03565b610c2e565b005b34801561047b57600080fd5b50610484610c44565b60405161049191906123e7565b60405180910390f35b3480156104a657600080fd5b506104c160048036038101906104bc91906124bd565b610c49565b005b3480156104cf57600080fd5b506104ea60048036038101906104e5919061259c565b610c9f565b005b3480156104f857600080fd5b50610501610d7b565b60405161050e91906123e7565b60405180910390f35b34801561052357600080fd5b5061052c610d80565b60405161053991906123e7565b60405180910390f35b34801561054e57600080fd5b5061056960048036038101906105649190612c43565b610d85565b60405161057691906124a2565b60405180910390f35b34801561058b57600080fd5b50610594610e19565b6040516105a191906123e7565b60405180910390f35b3480156105b657600080fd5b506105d160048036038101906105cc9190612c83565b610e1e565b005b3480156105df57600080fd5b506105fa60048036038101906105f59190612d1a565b610ebf565b005b34801561060857600080fd5b50610611610f42565b60405161061e91906123e7565b60405180910390f35b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610697576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161068e90612db9565b60405180910390fd5b60008083815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60007fd9b67a26000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806107ba57507f0e89341c000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806107ca57506107c982610f47565b5b9050919050565b60606000600560008481526020019081526020016000205411610829576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161082090612e25565b60405180910390fd5b600961083483610fb1565b604051602001610845929190612fc5565b6040516020818303038152906040529050919050565b60085481565b600060066000848152602001908152602001600020549050600081036108bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108b390613040565b60405180910390fd5b600082846108ca919061308f565b905060006064600754836108de919061308f565b6108e89190613100565b9050600081836108f89190613131565b905080341461093c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610933906131b1565b60405180910390fd5b816008600082825461094e9190613131565b925050819055506109703385876040518060200160405280600081525061107f565b505050505050565b61098061122f565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614806109c657506109c5856109c061122f565b610d85565b5b610a05576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109fc90613243565b60405180910390fd5b610a128585858585611237565b5050505050565b60056020528060005260406000206000915090505481565b610a39611558565b600060085490506000600881905550610a50610bfe565b73ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610a95573d6000803e3d6000fd5b5050565b60608151835114610adf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ad6906132d5565b60405180910390fd5b6000835167ffffffffffffffff811115610afc57610afb6125e1565b5b604051908082528060200260200182016040528015610b2a5781602001602082028036833780820191505090505b50905060005b8451811015610ba757610b77858281518110610b4f57610b4e6132f5565b5b6020026020010151858381518110610b6a57610b696132f5565b5b6020026020010151610627565b828281518110610b8a57610b896132f5565b5b60200260200101818152505080610ba090613324565b9050610b30565b508091505092915050565b610bba611558565b8060099081610bc99190613503565b5050565b60066020528060005260406000206000915090505481565b610bed611558565b610bf760006115d6565b565b600581565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60075481565b610c40610c3961122f565b838361169c565b5050565b600381565b610c51611558565b6064811115610c95576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c8c90613621565b60405180910390fd5b8060078190555050565b610ca7611808565b80610cb23384610627565b1015610cf3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cea9061368d565b60405180910390fd5b60006005600084815260200190815260200160002054905060008282610d19919061308f565b9050610d26338585611857565b3373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610d6c573d6000803e3d6000fd5b505050610d77611a9d565b5050565b600681565b600281565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600181565b610e2661122f565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161480610e6c5750610e6b85610e6661122f565b610d85565b5b610eab576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ea290613243565b60405180910390fd5b610eb88585858585611aa7565b5050505050565b610ec7611558565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610f36576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f2d9061371f565b60405180910390fd5b610f3f816115d6565b50565b600481565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b606060006001610fc084611d42565b01905060008167ffffffffffffffff811115610fdf57610fde6125e1565b5b6040519080825280601f01601f1916602001820160405280156110115781602001600182028036833780820191505090505b509050600082602001820190505b600115611074578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8581611068576110676130d1565b5b0494506000850361101f575b819350505050919050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036110ee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110e5906137b1565b60405180910390fd5b60006110f861122f565b9050600061110585611e95565b9050600061111285611e95565b905061112383600089858589611f0f565b8460008088815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546111829190613131565b925050819055508673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6289896040516112009291906137d1565b60405180910390a461121783600089858589611f17565b61122683600089898989611f1f565b50505050505050565b600033905090565b815183511461127b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112729061386c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036112ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112e1906138fe565b60405180910390fd5b60006112f461122f565b9050611304818787878787611f0f565b60005b84518110156114b5576000858281518110611325576113246132f5565b5b602002602001015190506000858381518110611344576113436132f5565b5b60200260200101519050600080600084815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050818110156113e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113dc90613990565b60405180910390fd5b81810360008085815260200190815260200160002060008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508160008085815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461149a9190613131565b92505081905550505050806114ae90613324565b9050611307565b508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161152c9291906139b0565b60405180910390a4611542818787878787611f17565b6115508187878787876120f6565b505050505050565b61156061122f565b73ffffffffffffffffffffffffffffffffffffffff1661157e610bfe565b73ffffffffffffffffffffffffffffffffffffffff16146115d4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115cb90613a33565b60405180910390fd5b565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361170a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161170190613ac5565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516117fb91906124a2565b60405180910390a3505050565b60026004540361184d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161184490613b31565b60405180910390fd5b6002600481905550565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036118c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118bd90613bc3565b60405180910390fd5b60006118d061122f565b905060006118dd84611e95565b905060006118ea84611e95565b905061190a83876000858560405180602001604052806000815250611f0f565b600080600087815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050848110156119a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161199890613c55565b60405180910390fd5b84810360008088815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628989604051611a6e9291906137d1565b60405180910390a4611a9484886000868660405180602001604052806000815250611f17565b50505050505050565b6001600481905550565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603611b16576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b0d906138fe565b60405180910390fd5b6000611b2061122f565b90506000611b2d85611e95565b90506000611b3a85611e95565b9050611b4a838989858589611f0f565b600080600088815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905085811015611be1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bd890613990565b60405180910390fd5b85810360008089815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508560008089815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611c969190613131565b925050819055508773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628a8a604051611d139291906137d1565b60405180910390a4611d29848a8a86868a611f17565b611d37848a8a8a8a8a611f1f565b505050505050505050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310611da0577a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008381611d9657611d956130d1565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310611ddd576d04ee2d6d415b85acef81000000008381611dd357611dd26130d1565b5b0492506020810190505b662386f26fc100008310611e0c57662386f26fc100008381611e0257611e016130d1565b5b0492506010810190505b6305f5e1008310611e35576305f5e1008381611e2b57611e2a6130d1565b5b0492506008810190505b6127108310611e5a576127108381611e5057611e4f6130d1565b5b0492506004810190505b60648310611e7d5760648381611e7357611e726130d1565b5b0492506002810190505b600a8310611e8c576001810190505b80915050919050565b60606000600167ffffffffffffffff811115611eb457611eb36125e1565b5b604051908082528060200260200182016040528015611ee25781602001602082028036833780820191505090505b5090508281600081518110611efa57611ef96132f5565b5b60200260200101818152505080915050919050565b505050505050565b505050505050565b611f3e8473ffffffffffffffffffffffffffffffffffffffff166122cd565b156120ee578373ffffffffffffffffffffffffffffffffffffffff1663f23a6e6187878686866040518663ffffffff1660e01b8152600401611f84959493929190613cca565b6020604051808303816000875af1925050508015611fc057506040513d601f19601f82011682018060405250810190611fbd9190613d39565b60015b61206557611fcc613d73565b806308c379a0036120285750611fe0613d95565b80611feb575061202a565b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161201f919061257a565b60405180910390fd5b505b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161205c90613e97565b60405180910390fd5b63f23a6e6160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916146120ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120e390613f29565b60405180910390fd5b505b505050505050565b6121158473ffffffffffffffffffffffffffffffffffffffff166122cd565b156122c5578373ffffffffffffffffffffffffffffffffffffffff1663bc197c8187878686866040518663ffffffff1660e01b815260040161215b959493929190613f49565b6020604051808303816000875af192505050801561219757506040513d601f19601f820116820180604052508101906121949190613d39565b60015b61223c576121a3613d73565b806308c379a0036121ff57506121b7613d95565b806121c25750612201565b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121f6919061257a565b60405180910390fd5b505b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161223390613e97565b60405180910390fd5b63bc197c8160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916146122c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122ba90613f29565b60405180910390fd5b505b505050505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061232f82612304565b9050919050565b61233f81612324565b811461234a57600080fd5b50565b60008135905061235c81612336565b92915050565b6000819050919050565b61237581612362565b811461238057600080fd5b50565b6000813590506123928161236c565b92915050565b600080604083850312156123af576123ae6122fa565b5b60006123bd8582860161234d565b92505060206123ce85828601612383565b9150509250929050565b6123e181612362565b82525050565b60006020820190506123fc60008301846123d8565b92915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61243781612402565b811461244257600080fd5b50565b6000813590506124548161242e565b92915050565b6000602082840312156124705761246f6122fa565b5b600061247e84828501612445565b91505092915050565b60008115159050919050565b61249c81612487565b82525050565b60006020820190506124b76000830184612493565b92915050565b6000602082840312156124d3576124d26122fa565b5b60006124e184828501612383565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612524578082015181840152602081019050612509565b60008484015250505050565b6000601f19601f8301169050919050565b600061254c826124ea565b61255681856124f5565b9350612566818560208601612506565b61256f81612530565b840191505092915050565b600060208201905081810360008301526125948184612541565b905092915050565b600080604083850312156125b3576125b26122fa565b5b60006125c185828601612383565b92505060206125d285828601612383565b9150509250929050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61261982612530565b810181811067ffffffffffffffff82111715612638576126376125e1565b5b80604052505050565b600061264b6122f0565b90506126578282612610565b919050565b600067ffffffffffffffff821115612677576126766125e1565b5b602082029050602081019050919050565b600080fd5b60006126a061269b8461265c565b612641565b905080838252602082019050602084028301858111156126c3576126c2612688565b5b835b818110156126ec57806126d88882612383565b8452602084019350506020810190506126c5565b5050509392505050565b600082601f83011261270b5761270a6125dc565b5b813561271b84826020860161268d565b91505092915050565b600080fd5b600067ffffffffffffffff821115612744576127436125e1565b5b61274d82612530565b9050602081019050919050565b82818337600083830152505050565b600061277c61277784612729565b612641565b90508281526020810184848401111561279857612797612724565b5b6127a384828561275a565b509392505050565b600082601f8301126127c0576127bf6125dc565b5b81356127d0848260208601612769565b91505092915050565b600080600080600060a086880312156127f5576127f46122fa565b5b60006128038882890161234d565b95505060206128148882890161234d565b945050604086013567ffffffffffffffff811115612835576128346122ff565b5b612841888289016126f6565b935050606086013567ffffffffffffffff811115612862576128616122ff565b5b61286e888289016126f6565b925050608086013567ffffffffffffffff81111561288f5761288e6122ff565b5b61289b888289016127ab565b9150509295509295909350565b600067ffffffffffffffff8211156128c3576128c26125e1565b5b602082029050602081019050919050565b60006128e76128e2846128a8565b612641565b9050808382526020820190506020840283018581111561290a57612909612688565b5b835b81811015612933578061291f888261234d565b84526020840193505060208101905061290c565b5050509392505050565b600082601f830112612952576129516125dc565b5b81356129628482602086016128d4565b91505092915050565b60008060408385031215612982576129816122fa565b5b600083013567ffffffffffffffff8111156129a05761299f6122ff565b5b6129ac8582860161293d565b925050602083013567ffffffffffffffff8111156129cd576129cc6122ff565b5b6129d9858286016126f6565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b612a1881612362565b82525050565b6000612a2a8383612a0f565b60208301905092915050565b6000602082019050919050565b6000612a4e826129e3565b612a5881856129ee565b9350612a63836129ff565b8060005b83811015612a94578151612a7b8882612a1e565b9750612a8683612a36565b925050600181019050612a67565b5085935050505092915050565b60006020820190508181036000830152612abb8184612a43565b905092915050565b600067ffffffffffffffff821115612ade57612add6125e1565b5b612ae782612530565b9050602081019050919050565b6000612b07612b0284612ac3565b612641565b905082815260208101848484011115612b2357612b22612724565b5b612b2e84828561275a565b509392505050565b600082601f830112612b4b57612b4a6125dc565b5b8135612b5b848260208601612af4565b91505092915050565b600060208284031215612b7a57612b796122fa565b5b600082013567ffffffffffffffff811115612b9857612b976122ff565b5b612ba484828501612b36565b91505092915050565b612bb681612324565b82525050565b6000602082019050612bd16000830184612bad565b92915050565b612be081612487565b8114612beb57600080fd5b50565b600081359050612bfd81612bd7565b92915050565b60008060408385031215612c1a57612c196122fa565b5b6000612c288582860161234d565b9250506020612c3985828601612bee565b9150509250929050565b60008060408385031215612c5a57612c596122fa565b5b6000612c688582860161234d565b9250506020612c798582860161234d565b9150509250929050565b600080600080600060a08688031215612c9f57612c9e6122fa565b5b6000612cad8882890161234d565b9550506020612cbe8882890161234d565b9450506040612ccf88828901612383565b9350506060612ce088828901612383565b925050608086013567ffffffffffffffff811115612d0157612d006122ff565b5b612d0d888289016127ab565b9150509295509295909350565b600060208284031215612d3057612d2f6122fa565b5b6000612d3e8482850161234d565b91505092915050565b7f455243313135353a2061646472657373207a65726f206973206e6f742061207660008201527f616c6964206f776e657200000000000000000000000000000000000000000000602082015250565b6000612da3602a836124f5565b9150612dae82612d47565b604082019050919050565b60006020820190508181036000830152612dd281612d96565b9050919050565b7f5552492072657175657374656420666f7220696e76616c696420746f6b656e00600082015250565b6000612e0f601f836124f5565b9150612e1a82612dd9565b602082019050919050565b60006020820190508181036000830152612e3e81612e02565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680612e8c57607f821691505b602082108103612e9f57612e9e612e45565b5b50919050565b600081905092915050565b60008190508160005260206000209050919050565b60008154612ed281612e74565b612edc8186612ea5565b94506001821660008114612ef75760018114612f0c57612f3f565b60ff1983168652811515820286019350612f3f565b612f1585612eb0565b60005b83811015612f3757815481890152600182019150602081019050612f18565b838801955050505b50505092915050565b6000612f53826124ea565b612f5d8185612ea5565b9350612f6d818560208601612506565b80840191505092915050565b7f2e6a736f6e000000000000000000000000000000000000000000000000000000600082015250565b6000612faf600583612ea5565b9150612fba82612f79565b600582019050919050565b6000612fd18285612ec5565b9150612fdd8284612f48565b9150612fe882612fa2565b91508190509392505050565b7f496e76616c69642064656e6f6d696e6174696f6e000000000000000000000000600082015250565b600061302a6014836124f5565b915061303582612ff4565b602082019050919050565b600060208201905081810360008301526130598161301d565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061309a82612362565b91506130a583612362565b92508282026130b381612362565b915082820484148315176130ca576130c9613060565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061310b82612362565b915061311683612362565b925082613126576131256130d1565b5b828204905092915050565b600061313c82612362565b915061314783612362565b925082820190508082111561315f5761315e613060565b5b92915050565b7f496e636f72726563742045544820616d6f756e742073656e7400000000000000600082015250565b600061319b6019836124f5565b91506131a682613165565b602082019050919050565b600060208201905081810360008301526131ca8161318e565b9050919050565b7f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60008201527f6572206f7220617070726f766564000000000000000000000000000000000000602082015250565b600061322d602e836124f5565b9150613238826131d1565b604082019050919050565b6000602082019050818103600083015261325c81613220565b9050919050565b7f455243313135353a206163636f756e747320616e6420696473206c656e67746860008201527f206d69736d617463680000000000000000000000000000000000000000000000602082015250565b60006132bf6029836124f5565b91506132ca82613263565b604082019050919050565b600060208201905081810360008301526132ee816132b2565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600061332f82612362565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361336157613360613060565b5b600182019050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026133b97fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261337c565b6133c3868361337c565b95508019841693508086168417925050509392505050565b6000819050919050565b60006134006133fb6133f684612362565b6133db565b612362565b9050919050565b6000819050919050565b61341a836133e5565b61342e61342682613407565b848454613389565b825550505050565b600090565b613443613436565b61344e818484613411565b505050565b5b818110156134725761346760008261343b565b600181019050613454565b5050565b601f8211156134b75761348881612eb0565b6134918461336c565b810160208510156134a0578190505b6134b46134ac8561336c565b830182613453565b50505b505050565b600082821c905092915050565b60006134da600019846008026134bc565b1980831691505092915050565b60006134f383836134c9565b9150826002028217905092915050565b61350c826124ea565b67ffffffffffffffff811115613525576135246125e1565b5b61352f8254612e74565b61353a828285613476565b600060209050601f83116001811461356d576000841561355b578287015190505b61356585826134e7565b8655506135cd565b601f19841661357b86612eb0565b60005b828110156135a35784890151825560018201915060208501945060208101905061357e565b868310156135c057848901516135bc601f8916826134c9565b8355505b6001600288020188555050505b505050505050565b7f4665652070657263656e7461676520746f6f2068696768000000000000000000600082015250565b600061360b6017836124f5565b9150613616826135d5565b602082019050919050565b6000602082019050818103600083015261363a816135fe565b9050919050565b7f496e73756666696369656e742062616c616e6365000000000000000000000000600082015250565b60006136776014836124f5565b915061368282613641565b602082019050919050565b600060208201905081810360008301526136a68161366a565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006137096026836124f5565b9150613714826136ad565b604082019050919050565b60006020820190508181036000830152613738816136fc565b9050919050565b7f455243313135353a206d696e7420746f20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b600061379b6021836124f5565b91506137a68261373f565b604082019050919050565b600060208201905081810360008301526137ca8161378e565b9050919050565b60006040820190506137e660008301856123d8565b6137f360208301846123d8565b9392505050565b7f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060008201527f6d69736d61746368000000000000000000000000000000000000000000000000602082015250565b60006138566028836124f5565b9150613861826137fa565b604082019050919050565b6000602082019050818103600083015261388581613849565b9050919050565b7f455243313135353a207472616e7366657220746f20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b60006138e86025836124f5565b91506138f38261388c565b604082019050919050565b60006020820190508181036000830152613917816138db565b9050919050565b7f455243313135353a20696e73756666696369656e742062616c616e636520666f60008201527f72207472616e7366657200000000000000000000000000000000000000000000602082015250565b600061397a602a836124f5565b91506139858261391e565b604082019050919050565b600060208201905081810360008301526139a98161396d565b9050919050565b600060408201905081810360008301526139ca8185612a43565b905081810360208301526139de8184612a43565b90509392505050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000613a1d6020836124f5565b9150613a28826139e7565b602082019050919050565b60006020820190508181036000830152613a4c81613a10565b9050919050565b7f455243313135353a2073657474696e6720617070726f76616c2073746174757360008201527f20666f722073656c660000000000000000000000000000000000000000000000602082015250565b6000613aaf6029836124f5565b9150613aba82613a53565b604082019050919050565b60006020820190508181036000830152613ade81613aa2565b9050919050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b6000613b1b601f836124f5565b9150613b2682613ae5565b602082019050919050565b60006020820190508181036000830152613b4a81613b0e565b9050919050565b7f455243313135353a206275726e2066726f6d20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000613bad6023836124f5565b9150613bb882613b51565b604082019050919050565b60006020820190508181036000830152613bdc81613ba0565b9050919050565b7f455243313135353a206275726e20616d6f756e7420657863656564732062616c60008201527f616e636500000000000000000000000000000000000000000000000000000000602082015250565b6000613c3f6024836124f5565b9150613c4a82613be3565b604082019050919050565b60006020820190508181036000830152613c6e81613c32565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000613c9c82613c75565b613ca68185613c80565b9350613cb6818560208601612506565b613cbf81612530565b840191505092915050565b600060a082019050613cdf6000830188612bad565b613cec6020830187612bad565b613cf960408301866123d8565b613d0660608301856123d8565b8181036080830152613d188184613c91565b90509695505050505050565b600081519050613d338161242e565b92915050565b600060208284031215613d4f57613d4e6122fa565b5b6000613d5d84828501613d24565b91505092915050565b60008160e01c9050919050565b600060033d1115613d925760046000803e613d8f600051613d66565b90505b90565b600060443d10613e2257613da76122f0565b60043d036004823e80513d602482011167ffffffffffffffff82111715613dcf575050613e22565b808201805167ffffffffffffffff811115613ded5750505050613e22565b80602083010160043d038501811115613e0a575050505050613e22565b613e1982602001850186612610565b82955050505050505b90565b7f455243313135353a207472616e7366657220746f206e6f6e2d4552433131353560008201527f526563656976657220696d706c656d656e746572000000000000000000000000602082015250565b6000613e816034836124f5565b9150613e8c82613e25565b604082019050919050565b60006020820190508181036000830152613eb081613e74565b9050919050565b7f455243313135353a204552433131353552656365697665722072656a6563746560008201527f6420746f6b656e73000000000000000000000000000000000000000000000000602082015250565b6000613f136028836124f5565b9150613f1e82613eb7565b604082019050919050565b60006020820190508181036000830152613f4281613f06565b9050919050565b600060a082019050613f5e6000830188612bad565b613f6b6020830187612bad565b8181036040830152613f7d8186612a43565b90508181036060830152613f918185612a43565b90508181036080830152613fa58184613c91565b9050969550505050505056fea2646970667358221220d8b994de522438ee061f14ad8e53d7ca7c3d1d95268d87cce53ce72ac6e3058c64736f6c63430008130033
Deployed ByteCode
0x6080604052600436106101845760003560e01c80638da5cb5b116100d1578063ce1aad231161008a578063ee2f3a0511610064578063ee2f3a051461057f578063f242432a146105aa578063f2fde38b146105d3578063f85fc0ab146105fc5761018b565b8063ce1aad23146104ec578063dd47f7e214610517578063e985e9c5146105425761018b565b80638da5cb5b146103f0578063a001ecdd1461041b578063a22cb46514610446578063ad57f9f11461046f578063ae06c1b71461049a578063b390c0ab146104c35761018b565b8063449dd5211161013e57806355f804b31161011857806355f804b31461034857806364c8319514610371578063715018a6146103ae578063851cad90146103c55761018b565b8063449dd521146102b7578063476343ee146102f45780634e1273f41461030b5761018b565b8062fdd58e1461019057806301ffc9a7146101cd5780630e89341c1461020a57806313114a9d146102475780631b2ef1ca146102725780632eb2c2d61461028e5761018b565b3661018b57005b600080fd5b34801561019c57600080fd5b506101b760048036038101906101b29190612398565b610627565b6040516101c491906123e7565b60405180910390f35b3480156101d957600080fd5b506101f460048036038101906101ef919061245a565b6106ef565b60405161020191906124a2565b60405180910390f35b34801561021657600080fd5b50610231600480360381019061022c91906124bd565b6107d1565b60405161023e919061257a565b60405180910390f35b34801561025357600080fd5b5061025c61085b565b60405161026991906123e7565b60405180910390f35b61028c6004803603810190610287919061259c565b610861565b005b34801561029a57600080fd5b506102b560048036038101906102b091906127d9565b610978565b005b3480156102c357600080fd5b506102de60048036038101906102d991906124bd565b610a19565b6040516102eb91906123e7565b60405180910390f35b34801561030057600080fd5b50610309610a31565b005b34801561031757600080fd5b50610332600480360381019061032d919061296b565b610a99565b60405161033f9190612aa1565b60405180910390f35b34801561035457600080fd5b5061036f600480360381019061036a9190612b64565b610bb2565b005b34801561037d57600080fd5b50610398600480360381019061039391906124bd565b610bcd565b6040516103a591906123e7565b60405180910390f35b3480156103ba57600080fd5b506103c3610be5565b005b3480156103d157600080fd5b506103da610bf9565b6040516103e791906123e7565b60405180910390f35b3480156103fc57600080fd5b50610405610bfe565b6040516104129190612bbc565b60405180910390f35b34801561042757600080fd5b50610430610c28565b60405161043d91906123e7565b60405180910390f35b34801561045257600080fd5b5061046d60048036038101906104689190612c03565b610c2e565b005b34801561047b57600080fd5b50610484610c44565b60405161049191906123e7565b60405180910390f35b3480156104a657600080fd5b506104c160048036038101906104bc91906124bd565b610c49565b005b3480156104cf57600080fd5b506104ea60048036038101906104e5919061259c565b610c9f565b005b3480156104f857600080fd5b50610501610d7b565b60405161050e91906123e7565b60405180910390f35b34801561052357600080fd5b5061052c610d80565b60405161053991906123e7565b60405180910390f35b34801561054e57600080fd5b5061056960048036038101906105649190612c43565b610d85565b60405161057691906124a2565b60405180910390f35b34801561058b57600080fd5b50610594610e19565b6040516105a191906123e7565b60405180910390f35b3480156105b657600080fd5b506105d160048036038101906105cc9190612c83565b610e1e565b005b3480156105df57600080fd5b506105fa60048036038101906105f59190612d1a565b610ebf565b005b34801561060857600080fd5b50610611610f42565b60405161061e91906123e7565b60405180910390f35b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610697576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161068e90612db9565b60405180910390fd5b60008083815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60007fd9b67a26000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806107ba57507f0e89341c000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806107ca57506107c982610f47565b5b9050919050565b60606000600560008481526020019081526020016000205411610829576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161082090612e25565b60405180910390fd5b600961083483610fb1565b604051602001610845929190612fc5565b6040516020818303038152906040529050919050565b60085481565b600060066000848152602001908152602001600020549050600081036108bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108b390613040565b60405180910390fd5b600082846108ca919061308f565b905060006064600754836108de919061308f565b6108e89190613100565b9050600081836108f89190613131565b905080341461093c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610933906131b1565b60405180910390fd5b816008600082825461094e9190613131565b925050819055506109703385876040518060200160405280600081525061107f565b505050505050565b61098061122f565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614806109c657506109c5856109c061122f565b610d85565b5b610a05576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109fc90613243565b60405180910390fd5b610a128585858585611237565b5050505050565b60056020528060005260406000206000915090505481565b610a39611558565b600060085490506000600881905550610a50610bfe565b73ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610a95573d6000803e3d6000fd5b5050565b60608151835114610adf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ad6906132d5565b60405180910390fd5b6000835167ffffffffffffffff811115610afc57610afb6125e1565b5b604051908082528060200260200182016040528015610b2a5781602001602082028036833780820191505090505b50905060005b8451811015610ba757610b77858281518110610b4f57610b4e6132f5565b5b6020026020010151858381518110610b6a57610b696132f5565b5b6020026020010151610627565b828281518110610b8a57610b896132f5565b5b60200260200101818152505080610ba090613324565b9050610b30565b508091505092915050565b610bba611558565b8060099081610bc99190613503565b5050565b60066020528060005260406000206000915090505481565b610bed611558565b610bf760006115d6565b565b600581565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60075481565b610c40610c3961122f565b838361169c565b5050565b600381565b610c51611558565b6064811115610c95576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c8c90613621565b60405180910390fd5b8060078190555050565b610ca7611808565b80610cb23384610627565b1015610cf3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cea9061368d565b60405180910390fd5b60006005600084815260200190815260200160002054905060008282610d19919061308f565b9050610d26338585611857565b3373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610d6c573d6000803e3d6000fd5b505050610d77611a9d565b5050565b600681565b600281565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600181565b610e2661122f565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161480610e6c5750610e6b85610e6661122f565b610d85565b5b610eab576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ea290613243565b60405180910390fd5b610eb88585858585611aa7565b5050505050565b610ec7611558565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610f36576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f2d9061371f565b60405180910390fd5b610f3f816115d6565b50565b600481565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b606060006001610fc084611d42565b01905060008167ffffffffffffffff811115610fdf57610fde6125e1565b5b6040519080825280601f01601f1916602001820160405280156110115781602001600182028036833780820191505090505b509050600082602001820190505b600115611074578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8581611068576110676130d1565b5b0494506000850361101f575b819350505050919050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036110ee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110e5906137b1565b60405180910390fd5b60006110f861122f565b9050600061110585611e95565b9050600061111285611e95565b905061112383600089858589611f0f565b8460008088815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546111829190613131565b925050819055508673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6289896040516112009291906137d1565b60405180910390a461121783600089858589611f17565b61122683600089898989611f1f565b50505050505050565b600033905090565b815183511461127b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112729061386c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036112ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112e1906138fe565b60405180910390fd5b60006112f461122f565b9050611304818787878787611f0f565b60005b84518110156114b5576000858281518110611325576113246132f5565b5b602002602001015190506000858381518110611344576113436132f5565b5b60200260200101519050600080600084815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050818110156113e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113dc90613990565b60405180910390fd5b81810360008085815260200190815260200160002060008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508160008085815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461149a9190613131565b92505081905550505050806114ae90613324565b9050611307565b508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161152c9291906139b0565b60405180910390a4611542818787878787611f17565b6115508187878787876120f6565b505050505050565b61156061122f565b73ffffffffffffffffffffffffffffffffffffffff1661157e610bfe565b73ffffffffffffffffffffffffffffffffffffffff16146115d4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115cb90613a33565b60405180910390fd5b565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361170a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161170190613ac5565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516117fb91906124a2565b60405180910390a3505050565b60026004540361184d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161184490613b31565b60405180910390fd5b6002600481905550565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036118c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118bd90613bc3565b60405180910390fd5b60006118d061122f565b905060006118dd84611e95565b905060006118ea84611e95565b905061190a83876000858560405180602001604052806000815250611f0f565b600080600087815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050848110156119a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161199890613c55565b60405180910390fd5b84810360008088815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628989604051611a6e9291906137d1565b60405180910390a4611a9484886000868660405180602001604052806000815250611f17565b50505050505050565b6001600481905550565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603611b16576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b0d906138fe565b60405180910390fd5b6000611b2061122f565b90506000611b2d85611e95565b90506000611b3a85611e95565b9050611b4a838989858589611f0f565b600080600088815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905085811015611be1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bd890613990565b60405180910390fd5b85810360008089815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508560008089815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611c969190613131565b925050819055508773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628a8a604051611d139291906137d1565b60405180910390a4611d29848a8a86868a611f17565b611d37848a8a8a8a8a611f1f565b505050505050505050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310611da0577a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008381611d9657611d956130d1565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310611ddd576d04ee2d6d415b85acef81000000008381611dd357611dd26130d1565b5b0492506020810190505b662386f26fc100008310611e0c57662386f26fc100008381611e0257611e016130d1565b5b0492506010810190505b6305f5e1008310611e35576305f5e1008381611e2b57611e2a6130d1565b5b0492506008810190505b6127108310611e5a576127108381611e5057611e4f6130d1565b5b0492506004810190505b60648310611e7d5760648381611e7357611e726130d1565b5b0492506002810190505b600a8310611e8c576001810190505b80915050919050565b60606000600167ffffffffffffffff811115611eb457611eb36125e1565b5b604051908082528060200260200182016040528015611ee25781602001602082028036833780820191505090505b5090508281600081518110611efa57611ef96132f5565b5b60200260200101818152505080915050919050565b505050505050565b505050505050565b611f3e8473ffffffffffffffffffffffffffffffffffffffff166122cd565b156120ee578373ffffffffffffffffffffffffffffffffffffffff1663f23a6e6187878686866040518663ffffffff1660e01b8152600401611f84959493929190613cca565b6020604051808303816000875af1925050508015611fc057506040513d601f19601f82011682018060405250810190611fbd9190613d39565b60015b61206557611fcc613d73565b806308c379a0036120285750611fe0613d95565b80611feb575061202a565b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161201f919061257a565b60405180910390fd5b505b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161205c90613e97565b60405180910390fd5b63f23a6e6160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916146120ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120e390613f29565b60405180910390fd5b505b505050505050565b6121158473ffffffffffffffffffffffffffffffffffffffff166122cd565b156122c5578373ffffffffffffffffffffffffffffffffffffffff1663bc197c8187878686866040518663ffffffff1660e01b815260040161215b959493929190613f49565b6020604051808303816000875af192505050801561219757506040513d601f19601f820116820180604052508101906121949190613d39565b60015b61223c576121a3613d73565b806308c379a0036121ff57506121b7613d95565b806121c25750612201565b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121f6919061257a565b60405180910390fd5b505b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161223390613e97565b60405180910390fd5b63bc197c8160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916146122c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122ba90613f29565b60405180910390fd5b505b505050505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061232f82612304565b9050919050565b61233f81612324565b811461234a57600080fd5b50565b60008135905061235c81612336565b92915050565b6000819050919050565b61237581612362565b811461238057600080fd5b50565b6000813590506123928161236c565b92915050565b600080604083850312156123af576123ae6122fa565b5b60006123bd8582860161234d565b92505060206123ce85828601612383565b9150509250929050565b6123e181612362565b82525050565b60006020820190506123fc60008301846123d8565b92915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61243781612402565b811461244257600080fd5b50565b6000813590506124548161242e565b92915050565b6000602082840312156124705761246f6122fa565b5b600061247e84828501612445565b91505092915050565b60008115159050919050565b61249c81612487565b82525050565b60006020820190506124b76000830184612493565b92915050565b6000602082840312156124d3576124d26122fa565b5b60006124e184828501612383565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612524578082015181840152602081019050612509565b60008484015250505050565b6000601f19601f8301169050919050565b600061254c826124ea565b61255681856124f5565b9350612566818560208601612506565b61256f81612530565b840191505092915050565b600060208201905081810360008301526125948184612541565b905092915050565b600080604083850312156125b3576125b26122fa565b5b60006125c185828601612383565b92505060206125d285828601612383565b9150509250929050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61261982612530565b810181811067ffffffffffffffff82111715612638576126376125e1565b5b80604052505050565b600061264b6122f0565b90506126578282612610565b919050565b600067ffffffffffffffff821115612677576126766125e1565b5b602082029050602081019050919050565b600080fd5b60006126a061269b8461265c565b612641565b905080838252602082019050602084028301858111156126c3576126c2612688565b5b835b818110156126ec57806126d88882612383565b8452602084019350506020810190506126c5565b5050509392505050565b600082601f83011261270b5761270a6125dc565b5b813561271b84826020860161268d565b91505092915050565b600080fd5b600067ffffffffffffffff821115612744576127436125e1565b5b61274d82612530565b9050602081019050919050565b82818337600083830152505050565b600061277c61277784612729565b612641565b90508281526020810184848401111561279857612797612724565b5b6127a384828561275a565b509392505050565b600082601f8301126127c0576127bf6125dc565b5b81356127d0848260208601612769565b91505092915050565b600080600080600060a086880312156127f5576127f46122fa565b5b60006128038882890161234d565b95505060206128148882890161234d565b945050604086013567ffffffffffffffff811115612835576128346122ff565b5b612841888289016126f6565b935050606086013567ffffffffffffffff811115612862576128616122ff565b5b61286e888289016126f6565b925050608086013567ffffffffffffffff81111561288f5761288e6122ff565b5b61289b888289016127ab565b9150509295509295909350565b600067ffffffffffffffff8211156128c3576128c26125e1565b5b602082029050602081019050919050565b60006128e76128e2846128a8565b612641565b9050808382526020820190506020840283018581111561290a57612909612688565b5b835b81811015612933578061291f888261234d565b84526020840193505060208101905061290c565b5050509392505050565b600082601f830112612952576129516125dc565b5b81356129628482602086016128d4565b91505092915050565b60008060408385031215612982576129816122fa565b5b600083013567ffffffffffffffff8111156129a05761299f6122ff565b5b6129ac8582860161293d565b925050602083013567ffffffffffffffff8111156129cd576129cc6122ff565b5b6129d9858286016126f6565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b612a1881612362565b82525050565b6000612a2a8383612a0f565b60208301905092915050565b6000602082019050919050565b6000612a4e826129e3565b612a5881856129ee565b9350612a63836129ff565b8060005b83811015612a94578151612a7b8882612a1e565b9750612a8683612a36565b925050600181019050612a67565b5085935050505092915050565b60006020820190508181036000830152612abb8184612a43565b905092915050565b600067ffffffffffffffff821115612ade57612add6125e1565b5b612ae782612530565b9050602081019050919050565b6000612b07612b0284612ac3565b612641565b905082815260208101848484011115612b2357612b22612724565b5b612b2e84828561275a565b509392505050565b600082601f830112612b4b57612b4a6125dc565b5b8135612b5b848260208601612af4565b91505092915050565b600060208284031215612b7a57612b796122fa565b5b600082013567ffffffffffffffff811115612b9857612b976122ff565b5b612ba484828501612b36565b91505092915050565b612bb681612324565b82525050565b6000602082019050612bd16000830184612bad565b92915050565b612be081612487565b8114612beb57600080fd5b50565b600081359050612bfd81612bd7565b92915050565b60008060408385031215612c1a57612c196122fa565b5b6000612c288582860161234d565b9250506020612c3985828601612bee565b9150509250929050565b60008060408385031215612c5a57612c596122fa565b5b6000612c688582860161234d565b9250506020612c798582860161234d565b9150509250929050565b600080600080600060a08688031215612c9f57612c9e6122fa565b5b6000612cad8882890161234d565b9550506020612cbe8882890161234d565b9450506040612ccf88828901612383565b9350506060612ce088828901612383565b925050608086013567ffffffffffffffff811115612d0157612d006122ff565b5b612d0d888289016127ab565b9150509295509295909350565b600060208284031215612d3057612d2f6122fa565b5b6000612d3e8482850161234d565b91505092915050565b7f455243313135353a2061646472657373207a65726f206973206e6f742061207660008201527f616c6964206f776e657200000000000000000000000000000000000000000000602082015250565b6000612da3602a836124f5565b9150612dae82612d47565b604082019050919050565b60006020820190508181036000830152612dd281612d96565b9050919050565b7f5552492072657175657374656420666f7220696e76616c696420746f6b656e00600082015250565b6000612e0f601f836124f5565b9150612e1a82612dd9565b602082019050919050565b60006020820190508181036000830152612e3e81612e02565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680612e8c57607f821691505b602082108103612e9f57612e9e612e45565b5b50919050565b600081905092915050565b60008190508160005260206000209050919050565b60008154612ed281612e74565b612edc8186612ea5565b94506001821660008114612ef75760018114612f0c57612f3f565b60ff1983168652811515820286019350612f3f565b612f1585612eb0565b60005b83811015612f3757815481890152600182019150602081019050612f18565b838801955050505b50505092915050565b6000612f53826124ea565b612f5d8185612ea5565b9350612f6d818560208601612506565b80840191505092915050565b7f2e6a736f6e000000000000000000000000000000000000000000000000000000600082015250565b6000612faf600583612ea5565b9150612fba82612f79565b600582019050919050565b6000612fd18285612ec5565b9150612fdd8284612f48565b9150612fe882612fa2565b91508190509392505050565b7f496e76616c69642064656e6f6d696e6174696f6e000000000000000000000000600082015250565b600061302a6014836124f5565b915061303582612ff4565b602082019050919050565b600060208201905081810360008301526130598161301d565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061309a82612362565b91506130a583612362565b92508282026130b381612362565b915082820484148315176130ca576130c9613060565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061310b82612362565b915061311683612362565b925082613126576131256130d1565b5b828204905092915050565b600061313c82612362565b915061314783612362565b925082820190508082111561315f5761315e613060565b5b92915050565b7f496e636f72726563742045544820616d6f756e742073656e7400000000000000600082015250565b600061319b6019836124f5565b91506131a682613165565b602082019050919050565b600060208201905081810360008301526131ca8161318e565b9050919050565b7f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60008201527f6572206f7220617070726f766564000000000000000000000000000000000000602082015250565b600061322d602e836124f5565b9150613238826131d1565b604082019050919050565b6000602082019050818103600083015261325c81613220565b9050919050565b7f455243313135353a206163636f756e747320616e6420696473206c656e67746860008201527f206d69736d617463680000000000000000000000000000000000000000000000602082015250565b60006132bf6029836124f5565b91506132ca82613263565b604082019050919050565b600060208201905081810360008301526132ee816132b2565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600061332f82612362565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361336157613360613060565b5b600182019050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026133b97fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261337c565b6133c3868361337c565b95508019841693508086168417925050509392505050565b6000819050919050565b60006134006133fb6133f684612362565b6133db565b612362565b9050919050565b6000819050919050565b61341a836133e5565b61342e61342682613407565b848454613389565b825550505050565b600090565b613443613436565b61344e818484613411565b505050565b5b818110156134725761346760008261343b565b600181019050613454565b5050565b601f8211156134b75761348881612eb0565b6134918461336c565b810160208510156134a0578190505b6134b46134ac8561336c565b830182613453565b50505b505050565b600082821c905092915050565b60006134da600019846008026134bc565b1980831691505092915050565b60006134f383836134c9565b9150826002028217905092915050565b61350c826124ea565b67ffffffffffffffff811115613525576135246125e1565b5b61352f8254612e74565b61353a828285613476565b600060209050601f83116001811461356d576000841561355b578287015190505b61356585826134e7565b8655506135cd565b601f19841661357b86612eb0565b60005b828110156135a35784890151825560018201915060208501945060208101905061357e565b868310156135c057848901516135bc601f8916826134c9565b8355505b6001600288020188555050505b505050505050565b7f4665652070657263656e7461676520746f6f2068696768000000000000000000600082015250565b600061360b6017836124f5565b9150613616826135d5565b602082019050919050565b6000602082019050818103600083015261363a816135fe565b9050919050565b7f496e73756666696369656e742062616c616e6365000000000000000000000000600082015250565b60006136776014836124f5565b915061368282613641565b602082019050919050565b600060208201905081810360008301526136a68161366a565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006137096026836124f5565b9150613714826136ad565b604082019050919050565b60006020820190508181036000830152613738816136fc565b9050919050565b7f455243313135353a206d696e7420746f20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b600061379b6021836124f5565b91506137a68261373f565b604082019050919050565b600060208201905081810360008301526137ca8161378e565b9050919050565b60006040820190506137e660008301856123d8565b6137f360208301846123d8565b9392505050565b7f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060008201527f6d69736d61746368000000000000000000000000000000000000000000000000602082015250565b60006138566028836124f5565b9150613861826137fa565b604082019050919050565b6000602082019050818103600083015261388581613849565b9050919050565b7f455243313135353a207472616e7366657220746f20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b60006138e86025836124f5565b91506138f38261388c565b604082019050919050565b60006020820190508181036000830152613917816138db565b9050919050565b7f455243313135353a20696e73756666696369656e742062616c616e636520666f60008201527f72207472616e7366657200000000000000000000000000000000000000000000602082015250565b600061397a602a836124f5565b91506139858261391e565b604082019050919050565b600060208201905081810360008301526139a98161396d565b9050919050565b600060408201905081810360008301526139ca8185612a43565b905081810360208301526139de8184612a43565b90509392505050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000613a1d6020836124f5565b9150613a28826139e7565b602082019050919050565b60006020820190508181036000830152613a4c81613a10565b9050919050565b7f455243313135353a2073657474696e6720617070726f76616c2073746174757360008201527f20666f722073656c660000000000000000000000000000000000000000000000602082015250565b6000613aaf6029836124f5565b9150613aba82613a53565b604082019050919050565b60006020820190508181036000830152613ade81613aa2565b9050919050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b6000613b1b601f836124f5565b9150613b2682613ae5565b602082019050919050565b60006020820190508181036000830152613b4a81613b0e565b9050919050565b7f455243313135353a206275726e2066726f6d20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000613bad6023836124f5565b9150613bb882613b51565b604082019050919050565b60006020820190508181036000830152613bdc81613ba0565b9050919050565b7f455243313135353a206275726e20616d6f756e7420657863656564732062616c60008201527f616e636500000000000000000000000000000000000000000000000000000000602082015250565b6000613c3f6024836124f5565b9150613c4a82613be3565b604082019050919050565b60006020820190508181036000830152613c6e81613c32565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000613c9c82613c75565b613ca68185613c80565b9350613cb6818560208601612506565b613cbf81612530565b840191505092915050565b600060a082019050613cdf6000830188612bad565b613cec6020830187612bad565b613cf960408301866123d8565b613d0660608301856123d8565b8181036080830152613d188184613c91565b90509695505050505050565b600081519050613d338161242e565b92915050565b600060208284031215613d4f57613d4e6122fa565b5b6000613d5d84828501613d24565b91505092915050565b60008160e01c9050919050565b600060033d1115613d925760046000803e613d8f600051613d66565b90505b90565b600060443d10613e2257613da76122f0565b60043d036004823e80513d602482011167ffffffffffffffff82111715613dcf575050613e22565b808201805167ffffffffffffffff811115613ded5750505050613e22565b80602083010160043d038501811115613e0a575050505050613e22565b613e1982602001850186612610565b82955050505050505b90565b7f455243313135353a207472616e7366657220746f206e6f6e2d4552433131353560008201527f526563656976657220696d706c656d656e746572000000000000000000000000602082015250565b6000613e816034836124f5565b9150613e8c82613e25565b604082019050919050565b60006020820190508181036000830152613eb081613e74565b9050919050565b7f455243313135353a204552433131353552656365697665722072656a6563746560008201527f6420746f6b656e73000000000000000000000000000000000000000000000000602082015250565b6000613f136028836124f5565b9150613f1e82613eb7565b604082019050919050565b60006020820190508181036000830152613f4281613f06565b9050919050565b600060a082019050613f5e6000830188612bad565b613f6b6020830187612bad565b8181036040830152613f7d8186612a43565b90508181036060830152613f918185612a43565b90508181036080830152613fa58184613c91565b9050969550505050505056fea2646970667358221220d8b994de522438ee061f14ad8e53d7ca7c3d1d95268d87cce53ce72ac6e3058c64736f6c63430008130033