Address Details
contract
0x9cEd213C69d7bDAb6CBf1515fAA5Fc06Cc064059
- Contract Name
- CarbonizedCollection
- Creator
- 0x5ac1cf–67fbfd at 0x077e85–94c5be
- Balance
- 0 CELO ( )
- Locked CELO Balance
- 0.00 CELO
- Voting CELO Balance
- 0.00 CELO
- Pending Unlocked Gold
- 0.00 CELO
- Tokens
-
Fetching tokens...
- Transactions
- 0 Transactions
- Transfers
- 0 Transfers
- Gas Used
- Fetching gas used...
- Last Balance Update
- 17422727
This contract has been verified via Sourcify.
View contract in Sourcify repository
- Contract name:
- CarbonizedCollection
- Optimization enabled
- false
- Compiler version
- v0.8.9+commit.e5eed63a
- EVM Version
- london
- Verified at
- 2023-05-19T20:35:39.532291Z
contracts/CarbonizedCollection.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721ReceiverUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol"; import "./interface/ICarbonizer.sol"; import "./interface/ICarbonizerDeployer.sol"; /// @title CarbonizedCollection /// @author Bridger Zoske /// @dev This contract inherits from both ERC721 that ERC721Receiver which enables the mint, /// burn and safe storage of other ERC721 tokens. contract CarbonizedCollection is OwnableUpgradeable, ERC721EnumerableUpgradeable, IERC721ReceiverUpgradeable { using SafeERC20Upgradeable for IERC20Upgradeable; /* ========== STATE VARIABLES ========== */ IERC721Upgradeable public originalCollection; ICarbonizerDeployer public deployer; string public baseURI; string public baseExtension; // tokenId => carbonizer mapping(uint256 => address) public carbonizer; /* ========== INITIALIZER ========== */ function initialize( address _originalCollection, address _deployer, string memory _name, string memory _symbol, string memory _baseURI ) external virtual initializer { __Ownable_init(); __ERC721_init(_name, _symbol); originalCollection = IERC721Upgradeable(_originalCollection); deployer = ICarbonizerDeployer(_deployer); baseExtension = ".json"; baseURI = _baseURI; } /* ========== MUTATIVE FUNCTIONS ========== */ function carbonize(uint256 tokenId) public payable { // deploy carbonizer contract if not already deployed if (carbonizer[tokenId] == address(0)) carbonizer[tokenId] = deployer.deploy(address(this)); // if token not already carbonized if (!exists(tokenId)) { originalCollection.safeTransferFrom(msg.sender, address(this), tokenId); _safeMint(msg.sender, tokenId); } ICarbonizer(carbonizer[tokenId]).deposit{value: msg.value}(); emit TokenIdCarbonized(carbonizer[tokenId], tokenId, msg.value); } function startDecarbonize(uint256 tokenId) external { require( carbonizer[tokenId] != address(0), "CarbonizedCollection: tokenId is not carbonized" ); ICarbonizer(carbonizer[tokenId]).withdraw(); } function decarbonize(uint256 tokenId) public { require( ownerOf(tokenId) == msg.sender, "CarbonizedCollection: caller does not own tokenId" ); originalCollection.safeTransferFrom(address(this), msg.sender, tokenId); ICarbonizer(carbonizer[tokenId]).claim(msg.sender); _burn(tokenId); emit TokenIdDecarbonized(carbonizer[tokenId], tokenId); } /* ========== VIEWS ========== */ function getDeposit(uint256 tokenId) external view returns (uint256) { return ICarbonizer(carbonizer[tokenId]).getDeposit(); } function withdrawls(uint256 tokenId) external view returns (uint256 value, uint256 timestamp) { return ICarbonizer(carbonizer[tokenId]).withdrawls(); } function getYield(uint256 tokenId) external view returns (uint256) { return ICarbonizer(carbonizer[tokenId]).getYield(); } function exists(uint256 tokenId) public view returns (bool) { return _exists(tokenId); } function walletOfOwner(address _owner) public view returns (uint256[] memory, address[] memory) { uint256 ownerTokenCount = balanceOf(_owner); uint256[] memory tokenIds = new uint256[](ownerTokenCount); address[] memory carbonizers = new address[](ownerTokenCount); for (uint256 i; i < ownerTokenCount; i++) { tokenIds[i] = tokenOfOwnerByIndex(_owner, i); carbonizers[i] = carbonizer[tokenIds[i]]; } return (tokenIds, carbonizers); } function onERC721Received( address, address, uint256, bytes calldata ) external pure override returns (bytes4) { return bytes4(keccak256("onERC721Received(address,address,uint256,bytes)")); } /* ========== EVENTS ========== */ event TokenIdCarbonized(address carbonizer, uint256 tokenId, uint256 amount); event TokenIdDecarbonized(address carbonizer, uint256 tokenId); }
/_openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.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 OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal onlyInitializing { __Ownable_init_unchained(); } function __Ownable_init_unchained() internal onlyInitializing { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing 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); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
/_openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ``` * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`. */ modifier initializer() { bool isTopLevelCall = _setInitializedVersion(1); if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original * initialization step. This is essential to configure modules that are added through upgrades and that require * initialization. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. */ modifier reinitializer(uint8 version) { bool isTopLevelCall = _setInitializedVersion(version); if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(version); } } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. */ function _disableInitializers() internal virtual { _setInitializedVersion(type(uint8).max); } function _setInitializedVersion(uint8 version) private returns (bool) { // If the contract is initializing we ignore whether _initialized is set in order to support multiple // inheritance patterns, but we only do this in the context of a constructor, and for the lowest level // of initializers, because in other contexts the contract may have been reentered. if (_initializing) { require( version == 1 && !AddressUpgradeable.isContract(address(this)), "Initializable: contract is already initialized" ); return false; } else { require(_initialized < version, "Initializable: contract is already initialized"); _initialized = version; return true; } } }
/_openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20Upgradeable { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
/_openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20Upgradeable.sol"; import "../../../utils/AddressUpgradeable.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20Upgradeable { using AddressUpgradeable for address; function safeTransfer( IERC20Upgradeable token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20Upgradeable token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20Upgradeable token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20Upgradeable token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20Upgradeable token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20Upgradeable token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
/_openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721Upgradeable.sol"; import "./IERC721ReceiverUpgradeable.sol"; import "./extensions/IERC721MetadataUpgradeable.sol"; import "../../utils/AddressUpgradeable.sol"; import "../../utils/ContextUpgradeable.sol"; import "../../utils/StringsUpgradeable.sol"; import "../../utils/introspection/ERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable { using AddressUpgradeable for address; using StringsUpgradeable for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ function __ERC721_init(string memory name_, string memory symbol_) internal onlyInitializing { __ERC721_init_unchained(name_, symbol_); } function __ERC721_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) { return interfaceId == type(IERC721Upgradeable).interfaceId || interfaceId == type(IERC721MetadataUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721Upgradeable.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721Upgradeable.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721Upgradeable.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721Upgradeable.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721Upgradeable.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721ReceiverUpgradeable.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[44] private __gap; }
/_openzeppelin/contracts-upgradeable/token/ERC721/IERC721ReceiverUpgradeable.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721ReceiverUpgradeable { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
/_openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165Upgradeable.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721Upgradeable is IERC165Upgradeable { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
/_openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.0; import "../ERC721Upgradeable.sol"; import "./IERC721EnumerableUpgradeable.sol"; import "../../../proxy/utils/Initializable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721EnumerableUpgradeable is Initializable, ERC721Upgradeable, IERC721EnumerableUpgradeable { function __ERC721Enumerable_init() internal onlyInitializing { } function __ERC721Enumerable_init_unchained() internal onlyInitializing { } // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165Upgradeable, ERC721Upgradeable) returns (bool) { return interfaceId == type(IERC721EnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721Upgradeable.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721EnumerableUpgradeable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721Upgradeable.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721Upgradeable.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[46] private __gap; }
/_openzeppelin/contracts-upgradeable/token/ERC721/extensions/IERC721EnumerableUpgradeable.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721Upgradeable.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721EnumerableUpgradeable is IERC721Upgradeable { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
/_openzeppelin/contracts-upgradeable/token/ERC721/extensions/IERC721MetadataUpgradeable.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721Upgradeable.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721MetadataUpgradeable is IERC721Upgradeable { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
/_openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @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 * ==== * * [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://diligence.consensys.net/posts/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.5.11/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 functionCall(target, data, "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"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(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) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason 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 { // 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 assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
/_openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @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 ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
/_openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library StringsUpgradeable { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
/_openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable { function __ERC165_init() internal onlyInitializing { } function __ERC165_init_unchained() internal onlyInitializing { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165Upgradeable).interfaceId; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
/_openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.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 IERC165Upgradeable { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
/contracts/interface/ICarbonizer.sol
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.0; interface ICarbonizer { function deposit() external payable; function withdraw() external; function withdrawls() external view returns (uint256 value, uint256 timestamp); function getYield() external view returns (uint256); function getDeposit() external view returns (uint256); function claim(address _receiver) external; }
/contracts/interface/ICarbonizerDeployer.sol
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.0; interface ICarbonizerDeployer { function deploy(address _carbonizedCollection) external returns (address); }
Contract ABI
[{"type":"event","name":"Approval","inputs":[{"type":"address","name":"owner","internalType":"address","indexed":true},{"type":"address","name":"approved","internalType":"address","indexed":true},{"type":"uint256","name":"tokenId","internalType":"uint256","indexed":true}],"anonymous":false},{"type":"event","name":"ApprovalForAll","inputs":[{"type":"address","name":"owner","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":"Initialized","inputs":[{"type":"uint8","name":"version","internalType":"uint8","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":"TokenIdCarbonized","inputs":[{"type":"address","name":"carbonizer","internalType":"address","indexed":false},{"type":"uint256","name":"tokenId","internalType":"uint256","indexed":false},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"TokenIdDecarbonized","inputs":[{"type":"address","name":"carbonizer","internalType":"address","indexed":false},{"type":"uint256","name":"tokenId","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"type":"address","name":"from","internalType":"address","indexed":true},{"type":"address","name":"to","internalType":"address","indexed":true},{"type":"uint256","name":"tokenId","internalType":"uint256","indexed":true}],"anonymous":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"approve","inputs":[{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceOf","inputs":[{"type":"address","name":"owner","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"baseExtension","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"baseURI","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[],"name":"carbonize","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"carbonizer","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"decarbonize","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract ICarbonizerDeployer"}],"name":"deployer","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"exists","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"getApproved","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getDeposit","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getYield","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"initialize","inputs":[{"type":"address","name":"_originalCollection","internalType":"address"},{"type":"address","name":"_deployer","internalType":"address"},{"type":"string","name":"_name","internalType":"string"},{"type":"string","name":"_symbol","internalType":"string"},{"type":"string","name":"_baseURI","internalType":"string"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isApprovedForAll","inputs":[{"type":"address","name":"owner","internalType":"address"},{"type":"address","name":"operator","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"name","inputs":[]},{"type":"function","stateMutability":"pure","outputs":[{"type":"bytes4","name":"","internalType":"bytes4"}],"name":"onERC721Received","inputs":[{"type":"address","name":"","internalType":"address"},{"type":"address","name":"","internalType":"address"},{"type":"uint256","name":"","internalType":"uint256"},{"type":"bytes","name":"","internalType":"bytes"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IERC721Upgradeable"}],"name":"originalCollection","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"ownerOf","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"safeTransferFrom","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"safeTransferFrom","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"tokenId","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":"startDecarbonize","inputs":[{"type":"uint256","name":"tokenId","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":"string","name":"","internalType":"string"}],"name":"symbol","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"tokenByIndex","inputs":[{"type":"uint256","name":"index","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"tokenOfOwnerByIndex","inputs":[{"type":"address","name":"owner","internalType":"address"},{"type":"uint256","name":"index","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"tokenURI","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalSupply","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferFrom","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256[]","name":"","internalType":"uint256[]"},{"type":"address[]","name":"","internalType":"address[]"}],"name":"walletOfOwner","inputs":[{"type":"address","name":"_owner","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"value","internalType":"uint256"},{"type":"uint256","name":"timestamp","internalType":"uint256"}],"name":"withdrawls","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]}]
Deployed ByteCode
0x6080604052600436106101f95760003560e01c80636c0360eb1161010d578063b88d4fde116100a0578063e0a96bc91161006f578063e0a96bc91461079a578063e985e9c5146107c3578063eceac7bf14610800578063f2fde38b14610829578063fe6838a514610852576101f9565b8063b88d4fde146106de578063c668286214610707578063c87b56dd14610732578063d5f394881461076f576101f9565b806395d89b41116100dc57806395d89b411461060f5780639f9fb9681461063a578063a22cb46514610677578063ac687cc4146106a0576101f9565b80636c0360eb1461056557806370a0823114610590578063715018a6146105cd5780638da5cb5b146105e4576101f9565b80632f745c5911610190578063438b63001161015f578063438b6300146104455780634f558e79146104835780634f6ccce7146104c057806361dd277e146104fd5780636352211e14610528576101f9565b80632f745c591461039a5780633a781dc1146103d75780633f2f5ee2146103f357806342842e0e1461041c576101f9565b8063095ea7b3116101cc578063095ea7b3146102e0578063150b7a021461030957806318160ddd1461034657806323b872dd14610371576101f9565b806301ffc9a7146101fe57806306fdde031461023b5780630805d88414610266578063081812fc146102a3575b600080fd5b34801561020a57600080fd5b5061022560048036038101906102209190613677565b61088f565b60405161023291906136bf565b60405180910390f35b34801561024757600080fd5b50610250610909565b60405161025d9190613773565b60405180910390f35b34801561027257600080fd5b5061028d600480360381019061028891906137cb565b61099b565b60405161029a9190613807565b60405180910390f35b3480156102af57600080fd5b506102ca60048036038101906102c591906137cb565b610a55565b6040516102d79190613863565b60405180910390f35b3480156102ec57600080fd5b50610307600480360381019061030291906138aa565b610ada565b005b34801561031557600080fd5b50610330600480360381019061032b919061394f565b610bf2565b60405161033d91906139e6565b60405180910390f35b34801561035257600080fd5b5061035b610c20565b6040516103689190613807565b60405180910390f35b34801561037d57600080fd5b5061039860048036038101906103939190613a01565b610c2d565b005b3480156103a657600080fd5b506103c160048036038101906103bc91906138aa565b610c8d565b6040516103ce9190613807565b60405180910390f35b6103f160048036038101906103ec91906137cb565b610d32565b005b3480156103ff57600080fd5b5061041a60048036038101906104159190613b84565b611047565b005b34801561042857600080fd5b50610443600480360381019061043e9190613a01565b6111cf565b005b34801561045157600080fd5b5061046c60048036038101906104679190613c53565b6111ef565b60405161047a929190613dfc565b60405180910390f35b34801561048f57600080fd5b506104aa60048036038101906104a591906137cb565b61138a565b6040516104b791906136bf565b60405180910390f35b3480156104cc57600080fd5b506104e760048036038101906104e291906137cb565b61139c565b6040516104f49190613807565b60405180910390f35b34801561050957600080fd5b5061051261140d565b60405161051f9190613e92565b60405180910390f35b34801561053457600080fd5b5061054f600480360381019061054a91906137cb565b611433565b60405161055c9190613863565b60405180910390f35b34801561057157600080fd5b5061057a6114e5565b6040516105879190613773565b60405180910390f35b34801561059c57600080fd5b506105b760048036038101906105b29190613c53565b611573565b6040516105c49190613807565b60405180910390f35b3480156105d957600080fd5b506105e261162b565b005b3480156105f057600080fd5b506105f96116b3565b6040516106069190613863565b60405180910390f35b34801561061b57600080fd5b506106246116dd565b6040516106319190613773565b60405180910390f35b34801561064657600080fd5b50610661600480360381019061065c91906137cb565b61176f565b60405161066e9190613807565b60405180910390f35b34801561068357600080fd5b5061069e60048036038101906106999190613ed9565b611829565b005b3480156106ac57600080fd5b506106c760048036038101906106c291906137cb565b61183f565b6040516106d5929190613f19565b60405180910390f35b3480156106ea57600080fd5b5061070560048036038101906107009190613fe3565b6118fb565b005b34801561071357600080fd5b5061071c61195d565b6040516107299190613773565b60405180910390f35b34801561073e57600080fd5b50610759600480360381019061075491906137cb565b6119eb565b6040516107669190613773565b60405180910390f35b34801561077b57600080fd5b50610784611a92565b6040516107919190614087565b60405180910390f35b3480156107a657600080fd5b506107c160048036038101906107bc91906137cb565b611ab8565b005b3480156107cf57600080fd5b506107ea60048036038101906107e591906140a2565b611bf1565b6040516107f791906136bf565b60405180910390f35b34801561080c57600080fd5b50610827600480360381019061082291906137cb565b611c85565b005b34801561083557600080fd5b50610850600480360381019061084b9190613c53565b611ea2565b005b34801561085e57600080fd5b50610879600480360381019061087491906137cb565b611f9a565b6040516108869190613863565b60405180910390f35b60007f780e9d63000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610902575061090182611fcd565b5b9050919050565b60606097805461091890614111565b80601f016020809104026020016040519081016040528092919081815260200182805461094490614111565b80156109915780601f1061096657610100808354040283529160200191610991565b820191906000526020600020905b81548152906001019060200180831161097457829003601f168201915b5050505050905090565b600060ff600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637c2628716040518163ffffffff1660e01b815260040160206040518083038186803b158015610a1657600080fd5b505afa158015610a2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a4e9190614158565b9050919050565b6000610a60826120af565b610a9f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a96906141f7565b60405180910390fd5b609b600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000610ae582611433565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610b56576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b4d90614289565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610b7561211b565b73ffffffffffffffffffffffffffffffffffffffff161480610ba45750610ba381610b9e61211b565b611bf1565b5b610be3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bda9061431b565b60405180910390fd5b610bed8383612123565b505050565b60007f150b7a023d4804d13e8c85fb27262cb750cf6ba9f9dd3bb30d90f482ceeb4b1f905095945050505050565b600060cb80549050905090565b610c3e610c3861211b565b826121dc565b610c7d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c74906143ad565b60405180910390fd5b610c888383836122ba565b505050565b6000610c9883611573565b8210610cd9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cd09061443f565b60405180910390fd5b60c960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002054905092915050565b600073ffffffffffffffffffffffffffffffffffffffff1660ff600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610e995760fc60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634c96a389306040518263ffffffff1660e01b8152600401610df59190613863565b602060405180830381600087803b158015610e0f57600080fd5b505af1158015610e23573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e479190614474565b60ff600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b610ea28161138a565b610f425760fb60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342842e0e3330846040518463ffffffff1660e01b8152600401610f05939291906144a1565b600060405180830381600087803b158015610f1f57600080fd5b505af1158015610f33573d6000803e3d6000fd5b50505050610f413382612521565b5b60ff600082815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b158015610fbd57600080fd5b505af1158015610fd1573d6000803e3d6000fd5b50505050507f94d7341445c8324577301ae2fbc92ba44773357f4f3ba896bd12dfd76f99459d60ff600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16823460405161103c939291906144d8565b60405180910390a150565b6000611053600161253f565b90508015611077576001600060016101000a81548160ff0219169083151502179055505b61107f61262f565b6110898484612688565b8560fb60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508460fc60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040518060400160405280600581526020017f2e6a736f6e00000000000000000000000000000000000000000000000000000081525060fe9080519060200190611156929190613568565b508160fd908051906020019061116d929190613568565b5080156111c75760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249860016040516111be9190614557565b60405180910390a15b505050505050565b6111ea838383604051806020016040528060008152506118fb565b505050565b60608060006111fd84611573565b905060008167ffffffffffffffff81111561121b5761121a613a59565b5b6040519080825280602002602001820160405280156112495781602001602082028036833780820191505090505b50905060008267ffffffffffffffff81111561126857611267613a59565b5b6040519080825280602002602001820160405280156112965781602001602082028036833780820191505090505b50905060005b8381101561137b576112ae8782610c8d565b8382815181106112c1576112c0614572565b5b60200260200101818152505060ff60008483815181106112e4576112e3614572565b5b6020026020010151815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682828151811061132e5761132d614572565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508080611373906145d0565b91505061129c565b50818194509450505050915091565b6000611395826120af565b9050919050565b60006113a6610c20565b82106113e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113de9061468b565b60405180910390fd5b60cb82815481106113fb576113fa614572565b5b90600052602060002001549050919050565b60fb60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806099600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156114dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114d39061471d565b60405180910390fd5b80915050919050565b60fd80546114f290614111565b80601f016020809104026020016040519081016040528092919081815260200182805461151e90614111565b801561156b5780601f106115405761010080835404028352916020019161156b565b820191906000526020600020905b81548152906001019060200180831161154e57829003601f168201915b505050505081565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156115e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115db906147af565b60405180910390fd5b609a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b61163361211b565b73ffffffffffffffffffffffffffffffffffffffff166116516116b3565b73ffffffffffffffffffffffffffffffffffffffff16146116a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161169e9061481b565b60405180910390fd5b6116b160006126e5565b565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6060609880546116ec90614111565b80601f016020809104026020016040519081016040528092919081815260200182805461171890614111565b80156117655780601f1061173a57610100808354040283529160200191611765565b820191906000526020600020905b81548152906001019060200180831161174857829003601f168201915b5050505050905090565b600060ff600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c399ec886040518163ffffffff1660e01b815260040160206040518083038186803b1580156117ea57600080fd5b505afa1580156117fe573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118229190614158565b9050919050565b61183b61183461211b565b83836127ab565b5050565b60008060ff600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f35762206040518163ffffffff1660e01b8152600401604080518083038186803b1580156118ba57600080fd5b505afa1580156118ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118f2919061483b565b91509150915091565b61190c61190661211b565b836121dc565b61194b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611942906143ad565b60405180910390fd5b61195784848484612918565b50505050565b60fe805461196a90614111565b80601f016020809104026020016040519081016040528092919081815260200182805461199690614111565b80156119e35780601f106119b8576101008083540402835291602001916119e3565b820191906000526020600020905b8154815290600101906020018083116119c657829003601f168201915b505050505081565b60606119f6826120af565b611a35576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a2c906148ed565b60405180910390fd5b6000611a3f612974565b90506000815111611a5f5760405180602001604052806000815250611a8a565b80611a698461298b565b604051602001611a7a929190614949565b6040516020818303038152906040525b915050919050565b60fc60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600073ffffffffffffffffffffffffffffffffffffffff1660ff600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415611b5b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b52906149df565b60405180910390fd5b60ff600082815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633ccfd60b6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611bd657600080fd5b505af1158015611bea573d6000803e3d6000fd5b5050505050565b6000609c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b3373ffffffffffffffffffffffffffffffffffffffff16611ca582611433565b73ffffffffffffffffffffffffffffffffffffffff1614611cfb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cf290614a71565b60405180910390fd5b60fb60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342842e0e3033846040518463ffffffff1660e01b8152600401611d5a939291906144a1565b600060405180830381600087803b158015611d7457600080fd5b505af1158015611d88573d6000803e3d6000fd5b5050505060ff600082815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631e83409a336040518263ffffffff1660e01b8152600401611df89190613863565b600060405180830381600087803b158015611e1257600080fd5b505af1158015611e26573d6000803e3d6000fd5b50505050611e3381612aec565b7fa10425edcce3c531d8f074a91c3209a3f991e2a015ff946c111bd1cbd097ac4960ff600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682604051611e97929190614a91565b60405180910390a150565b611eaa61211b565b73ffffffffffffffffffffffffffffffffffffffff16611ec86116b3565b73ffffffffffffffffffffffffffffffffffffffff1614611f1e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f159061481b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611f8e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f8590614b2c565b60405180910390fd5b611f97816126e5565b50565b60ff6020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061209857507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806120a857506120a782612c09565b5b9050919050565b60008073ffffffffffffffffffffffffffffffffffffffff166099600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b600033905090565b81609b600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff1661219683611433565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006121e7826120af565b612226576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161221d90614bbe565b60405180910390fd5b600061223183611433565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148061227357506122728185611bf1565b5b806122b157508373ffffffffffffffffffffffffffffffffffffffff1661229984610a55565b73ffffffffffffffffffffffffffffffffffffffff16145b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff166122da82611433565b73ffffffffffffffffffffffffffffffffffffffff1614612330576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161232790614c50565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156123a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161239790614ce2565b60405180910390fd5b6123ab838383612c73565b6123b6600082612123565b6001609a60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546124069190614d02565b925050819055506001609a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461245d9190614d36565b92505081905550816099600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461251c838383612d87565b505050565b61253b828260405180602001604052806000815250612d8c565b5050565b60008060019054906101000a900460ff16156125b65760018260ff1614801561256e575061256c30612de7565b155b6125ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125a490614dfe565b60405180910390fd5b6000905061262a565b8160ff1660008054906101000a900460ff1660ff161061260b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161260290614dfe565b60405180910390fd5b816000806101000a81548160ff021916908360ff160217905550600190505b919050565b600060019054906101000a900460ff1661267e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161267590614e90565b60405180910390fd5b612686612e0a565b565b600060019054906101000a900460ff166126d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126ce90614e90565b60405180910390fd5b6126e18282612e6b565b5050565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561281a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161281190614efc565b60405180910390fd5b80609c60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161290b91906136bf565b60405180910390a3505050565b6129238484846122ba565b61292f84848484612eec565b61296e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161296590614f8e565b60405180910390fd5b50505050565b606060405180602001604052806000815250905090565b606060008214156129d3576040518060400160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509050612ae7565b600082905060005b60008214612a055780806129ee906145d0565b915050600a826129fe9190614fdd565b91506129db565b60008167ffffffffffffffff811115612a2157612a20613a59565b5b6040519080825280601f01601f191660200182016040528015612a535781602001600182028036833780820191505090505b5090505b60008514612ae057600182612a6c9190614d02565b9150600a85612a7b919061500e565b6030612a879190614d36565b60f81b818381518110612a9d57612a9c614572565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a85612ad99190614fdd565b9450612a57565b8093505050505b919050565b6000612af782611433565b9050612b0581600084612c73565b612b10600083612123565b6001609a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254612b609190614d02565b925050819055506099600083815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905581600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612c0581600084612d87565b5050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b612c7e838383613083565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612cc157612cbc81613088565b612d00565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614612cff57612cfe83826130d1565b5b5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612d4357612d3e8161323e565b612d82565b8273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614612d8157612d80828261330f565b5b5b505050565b505050565b612d96838361338e565b612da36000848484612eec565b612de2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612dd990614f8e565b60405180910390fd5b505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600060019054906101000a900460ff16612e59576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e5090614e90565b60405180910390fd5b612e69612e6461211b565b6126e5565b565b600060019054906101000a900460ff16612eba576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612eb190614e90565b60405180910390fd5b8160979080519060200190612ed0929190613568565b508060989080519060200190612ee7929190613568565b505050565b6000612f0d8473ffffffffffffffffffffffffffffffffffffffff16612de7565b15613076578373ffffffffffffffffffffffffffffffffffffffff1663150b7a02612f3661211b565b8786866040518563ffffffff1660e01b8152600401612f589493929190615094565b602060405180830381600087803b158015612f7257600080fd5b505af1925050508015612fa357506040513d601f19601f82011682018060405250810190612fa091906150f5565b60015b613026573d8060008114612fd3576040519150601f19603f3d011682016040523d82523d6000602084013e612fd8565b606091505b5060008151141561301e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161301590614f8e565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161491505061307b565b600190505b949350505050565b505050565b60cb8054905060cc60008381526020019081526020016000208190555060cb81908060018154018082558091505060019003906000526020600020016000909190919091505550565b600060016130de84611573565b6130e89190614d02565b9050600060ca60008481526020019081526020016000205490508181146131cd57600060c960008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008481526020019081526020016000205490508060c960008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000848152602001908152602001600020819055508160ca600083815260200190815260200160002081905550505b60ca60008481526020019081526020016000206000905560c960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000206000905550505050565b6000600160cb805490506132529190614d02565b9050600060cc6000848152602001908152602001600020549050600060cb838154811061328257613281614572565b5b906000526020600020015490508060cb83815481106132a4576132a3614572565b5b90600052602060002001819055508160cc60008381526020019081526020016000208190555060cc60008581526020019081526020016000206000905560cb8054806132f3576132f2615122565b5b6001900381819060005260206000200160009055905550505050565b600061331a83611573565b90508160c960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000838152602001908152602001600020819055508060ca600084815260200190815260200160002081905550505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156133fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016133f59061519d565b60405180910390fd5b613407816120af565b15613447576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161343e90615209565b60405180910390fd5b61345360008383612c73565b6001609a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546134a39190614d36565b92505081905550816099600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461356460008383612d87565b5050565b82805461357490614111565b90600052602060002090601f01602090048101928261359657600085556135dd565b82601f106135af57805160ff19168380011785556135dd565b828001600101855582156135dd579182015b828111156135dc5782518255916020019190600101906135c1565b5b5090506135ea91906135ee565b5090565b5b808211156136075760008160009055506001016135ef565b5090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6136548161361f565b811461365f57600080fd5b50565b6000813590506136718161364b565b92915050565b60006020828403121561368d5761368c613615565b5b600061369b84828501613662565b91505092915050565b60008115159050919050565b6136b9816136a4565b82525050565b60006020820190506136d460008301846136b0565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156137145780820151818401526020810190506136f9565b83811115613723576000848401525b50505050565b6000601f19601f8301169050919050565b6000613745826136da565b61374f81856136e5565b935061375f8185602086016136f6565b61376881613729565b840191505092915050565b6000602082019050818103600083015261378d818461373a565b905092915050565b6000819050919050565b6137a881613795565b81146137b357600080fd5b50565b6000813590506137c58161379f565b92915050565b6000602082840312156137e1576137e0613615565b5b60006137ef848285016137b6565b91505092915050565b61380181613795565b82525050565b600060208201905061381c60008301846137f8565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061384d82613822565b9050919050565b61385d81613842565b82525050565b60006020820190506138786000830184613854565b92915050565b61388781613842565b811461389257600080fd5b50565b6000813590506138a48161387e565b92915050565b600080604083850312156138c1576138c0613615565b5b60006138cf85828601613895565b92505060206138e0858286016137b6565b9150509250929050565b600080fd5b600080fd5b600080fd5b60008083601f84011261390f5761390e6138ea565b5b8235905067ffffffffffffffff81111561392c5761392b6138ef565b5b602083019150836001820283011115613948576139476138f4565b5b9250929050565b60008060008060006080868803121561396b5761396a613615565b5b600061397988828901613895565b955050602061398a88828901613895565b945050604061399b888289016137b6565b935050606086013567ffffffffffffffff8111156139bc576139bb61361a565b5b6139c8888289016138f9565b92509250509295509295909350565b6139e08161361f565b82525050565b60006020820190506139fb60008301846139d7565b92915050565b600080600060608486031215613a1a57613a19613615565b5b6000613a2886828701613895565b9350506020613a3986828701613895565b9250506040613a4a868287016137b6565b9150509250925092565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b613a9182613729565b810181811067ffffffffffffffff82111715613ab057613aaf613a59565b5b80604052505050565b6000613ac361360b565b9050613acf8282613a88565b919050565b600067ffffffffffffffff821115613aef57613aee613a59565b5b613af882613729565b9050602081019050919050565b82818337600083830152505050565b6000613b27613b2284613ad4565b613ab9565b905082815260208101848484011115613b4357613b42613a54565b5b613b4e848285613b05565b509392505050565b600082601f830112613b6b57613b6a6138ea565b5b8135613b7b848260208601613b14565b91505092915050565b600080600080600060a08688031215613ba057613b9f613615565b5b6000613bae88828901613895565b9550506020613bbf88828901613895565b945050604086013567ffffffffffffffff811115613be057613bdf61361a565b5b613bec88828901613b56565b935050606086013567ffffffffffffffff811115613c0d57613c0c61361a565b5b613c1988828901613b56565b925050608086013567ffffffffffffffff811115613c3a57613c3961361a565b5b613c4688828901613b56565b9150509295509295909350565b600060208284031215613c6957613c68613615565b5b6000613c7784828501613895565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b613cb581613795565b82525050565b6000613cc78383613cac565b60208301905092915050565b6000602082019050919050565b6000613ceb82613c80565b613cf58185613c8b565b9350613d0083613c9c565b8060005b83811015613d31578151613d188882613cbb565b9750613d2383613cd3565b925050600181019050613d04565b5085935050505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b613d7381613842565b82525050565b6000613d858383613d6a565b60208301905092915050565b6000602082019050919050565b6000613da982613d3e565b613db38185613d49565b9350613dbe83613d5a565b8060005b83811015613def578151613dd68882613d79565b9750613de183613d91565b925050600181019050613dc2565b5085935050505092915050565b60006040820190508181036000830152613e168185613ce0565b90508181036020830152613e2a8184613d9e565b90509392505050565b6000819050919050565b6000613e58613e53613e4e84613822565b613e33565b613822565b9050919050565b6000613e6a82613e3d565b9050919050565b6000613e7c82613e5f565b9050919050565b613e8c81613e71565b82525050565b6000602082019050613ea76000830184613e83565b92915050565b613eb6816136a4565b8114613ec157600080fd5b50565b600081359050613ed381613ead565b92915050565b60008060408385031215613ef057613eef613615565b5b6000613efe85828601613895565b9250506020613f0f85828601613ec4565b9150509250929050565b6000604082019050613f2e60008301856137f8565b613f3b60208301846137f8565b9392505050565b600067ffffffffffffffff821115613f5d57613f5c613a59565b5b613f6682613729565b9050602081019050919050565b6000613f86613f8184613f42565b613ab9565b905082815260208101848484011115613fa257613fa1613a54565b5b613fad848285613b05565b509392505050565b600082601f830112613fca57613fc96138ea565b5b8135613fda848260208601613f73565b91505092915050565b60008060008060808587031215613ffd57613ffc613615565b5b600061400b87828801613895565b945050602061401c87828801613895565b935050604061402d878288016137b6565b925050606085013567ffffffffffffffff81111561404e5761404d61361a565b5b61405a87828801613fb5565b91505092959194509250565b600061407182613e5f565b9050919050565b61408181614066565b82525050565b600060208201905061409c6000830184614078565b92915050565b600080604083850312156140b9576140b8613615565b5b60006140c785828601613895565b92505060206140d885828601613895565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061412957607f821691505b6020821081141561413d5761413c6140e2565b5b50919050565b6000815190506141528161379f565b92915050565b60006020828403121561416e5761416d613615565b5b600061417c84828501614143565b91505092915050565b7f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b60006141e1602c836136e5565b91506141ec82614185565b604082019050919050565b60006020820190508181036000830152614210816141d4565b9050919050565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b60006142736021836136e5565b915061427e82614217565b604082019050919050565b600060208201905081810360008301526142a281614266565b9050919050565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760008201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000602082015250565b60006143056038836136e5565b9150614310826142a9565b604082019050919050565b60006020820190508181036000830152614334816142f8565b9050919050565b7f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60008201527f776e6572206e6f7220617070726f766564000000000000000000000000000000602082015250565b60006143976031836136e5565b91506143a28261433b565b604082019050919050565b600060208201905081810360008301526143c68161438a565b9050919050565b7f455243373231456e756d657261626c653a206f776e657220696e646578206f7560008201527f74206f6620626f756e6473000000000000000000000000000000000000000000602082015250565b6000614429602b836136e5565b9150614434826143cd565b604082019050919050565b600060208201905081810360008301526144588161441c565b9050919050565b60008151905061446e8161387e565b92915050565b60006020828403121561448a57614489613615565b5b60006144988482850161445f565b91505092915050565b60006060820190506144b66000830186613854565b6144c36020830185613854565b6144d060408301846137f8565b949350505050565b60006060820190506144ed6000830186613854565b6144fa60208301856137f8565b61450760408301846137f8565b949350505050565b6000819050919050565b600060ff82169050919050565b600061454161453c6145378461450f565b613e33565b614519565b9050919050565b61455181614526565b82525050565b600060208201905061456c6000830184614548565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006145db82613795565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561460e5761460d6145a1565b5b600182019050919050565b7f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60008201527f7574206f6620626f756e64730000000000000000000000000000000000000000602082015250565b6000614675602c836136e5565b915061468082614619565b604082019050919050565b600060208201905081810360008301526146a481614668565b9050919050565b7f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460008201527f656e7420746f6b656e0000000000000000000000000000000000000000000000602082015250565b60006147076029836136e5565b9150614712826146ab565b604082019050919050565b60006020820190508181036000830152614736816146fa565b9050919050565b7f4552433732313a2062616c616e636520717565727920666f7220746865207a6560008201527f726f206164647265737300000000000000000000000000000000000000000000602082015250565b6000614799602a836136e5565b91506147a48261473d565b604082019050919050565b600060208201905081810360008301526147c88161478c565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006148056020836136e5565b9150614810826147cf565b602082019050919050565b60006020820190508181036000830152614834816147f8565b9050919050565b6000806040838503121561485257614851613615565b5b600061486085828601614143565b925050602061487185828601614143565b9150509250929050565b7f4552433732314d657461646174613a2055524920717565727920666f72206e6f60008201527f6e6578697374656e7420746f6b656e0000000000000000000000000000000000602082015250565b60006148d7602f836136e5565b91506148e28261487b565b604082019050919050565b60006020820190508181036000830152614906816148ca565b9050919050565b600081905092915050565b6000614923826136da565b61492d818561490d565b935061493d8185602086016136f6565b80840191505092915050565b60006149558285614918565b91506149618284614918565b91508190509392505050565b7f436172626f6e697a6564436f6c6c656374696f6e3a20746f6b656e496420697360008201527f206e6f7420636172626f6e697a65640000000000000000000000000000000000602082015250565b60006149c9602f836136e5565b91506149d48261496d565b604082019050919050565b600060208201905081810360008301526149f8816149bc565b9050919050565b7f436172626f6e697a6564436f6c6c656374696f6e3a2063616c6c657220646f6560008201527f73206e6f74206f776e20746f6b656e4964000000000000000000000000000000602082015250565b6000614a5b6031836136e5565b9150614a66826149ff565b604082019050919050565b60006020820190508181036000830152614a8a81614a4e565b9050919050565b6000604082019050614aa66000830185613854565b614ab360208301846137f8565b9392505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000614b166026836136e5565b9150614b2182614aba565b604082019050919050565b60006020820190508181036000830152614b4581614b09565b9050919050565b7f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b6000614ba8602c836136e5565b9150614bb382614b4c565b604082019050919050565b60006020820190508181036000830152614bd781614b9b565b9050919050565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b6000614c3a6025836136e5565b9150614c4582614bde565b604082019050919050565b60006020820190508181036000830152614c6981614c2d565b9050919050565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000614ccc6024836136e5565b9150614cd782614c70565b604082019050919050565b60006020820190508181036000830152614cfb81614cbf565b9050919050565b6000614d0d82613795565b9150614d1883613795565b925082821015614d2b57614d2a6145a1565b5b828203905092915050565b6000614d4182613795565b9150614d4c83613795565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115614d8157614d806145a1565b5b828201905092915050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b6000614de8602e836136e5565b9150614df382614d8c565b604082019050919050565b60006020820190508181036000830152614e1781614ddb565b9050919050565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960008201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b6000614e7a602b836136e5565b9150614e8582614e1e565b604082019050919050565b60006020820190508181036000830152614ea981614e6d565b9050919050565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b6000614ee66019836136e5565b9150614ef182614eb0565b602082019050919050565b60006020820190508181036000830152614f1581614ed9565b9050919050565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b6000614f786032836136e5565b9150614f8382614f1c565b604082019050919050565b60006020820190508181036000830152614fa781614f6b565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000614fe882613795565b9150614ff383613795565b92508261500357615002614fae565b5b828204905092915050565b600061501982613795565b915061502483613795565b92508261503457615033614fae565b5b828206905092915050565b600081519050919050565b600082825260208201905092915050565b60006150668261503f565b615070818561504a565b93506150808185602086016136f6565b61508981613729565b840191505092915050565b60006080820190506150a96000830187613854565b6150b66020830186613854565b6150c360408301856137f8565b81810360608301526150d5818461505b565b905095945050505050565b6000815190506150ef8161364b565b92915050565b60006020828403121561510b5761510a613615565b5b6000615119848285016150e0565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b60006151876020836136e5565b915061519282615151565b602082019050919050565b600060208201905081810360008301526151b68161517a565b9050919050565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b60006151f3601c836136e5565b91506151fe826151bd565b602082019050919050565b60006020820190508181036000830152615222816151e6565b905091905056fea26469706673582212206e46cf26a8a64983fcdc737ababd4ce1be17243118adcb0d348958f97dbbf0b664736f6c63430008090033