NFT
Overview
TokenID
191
Total Transfers
-
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Source Code Verified (Exact Match)
Contract Name:
Hedgeys
Compiler Version
v0.8.13+commit.abaa5c0e
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.13; import '@openzeppelin/contracts/token/ERC721/ERC721.sol'; import '@openzeppelin/contracts/utils/Counters.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import './libraries/TransferHelper.sol'; /** * @title An NFT representation of ownership of time locked tokens * @notice The time locked tokens are redeemable by the owner of the NFT * @notice The NFT is basic ERC721 with an ownable usage to ensure only a single owner call mint new NFTs * @notice it uses the Enumerable extension to allow for easy lookup to pull balances of one account for multiple NFTs */ contract Hedgeys is ERC721Enumerable, ReentrancyGuard { using SafeERC20 for IERC20; using Counters for Counters.Counter; Counters.Counter private _tokenIds; /// @dev handles weth in case WETH is being held - this allows us to unwrap and deliver ETH upon redemption of a timelocked NFT with ETH address payable public weth; /// @dev baseURI is the URI directory where the metadata is stored string private baseURI; /// @dev this is a counter used so that the baseURI can only be set once after deployment uint8 private uriSet = 0; /// @dev the Future is the storage in a struct of the tokens that are time locked /// @dev the Future contains the information about the amount of tokens, the underlying token address (asset), and the date in which they are unlocked struct Future { uint256 amount; address token; uint256 unlockDate; } /// @dev this maping maps the _tokenIDs from Counters to a Future struct. the same _tokenIDs that is set for the NFT id is mapped to the futures mapping(uint256 => Future) public futures; constructor(address payable _weth, string memory uri) ERC721('Hedgeys', 'HDGY') { weth = _weth; baseURI = uri; } receive() external payable {} /** * @notice The external function creates a Future position * @notice This function does not accept ETH, must send in WETH to lock ETH * @notice A Future position is the combination of an NFT and a Future struct with the same _tokenID storing both information separately but with the same index * @notice Anyone can mint an NFT & create a futures Struct, so long as they have sufficient tokens to lock up * @notice A user can mint the NFT to themselves, passing in their address to the first parameter, or they can directly mint an NFT to someone else * @param _holder is the owner of the minted NFT and the owner of the locked tokens * @param _amount is the amount with full decimals of the tokens being locked into the future * @param _token is the address of the tokens that are being delivered to this contract to be held and locked * @param _unlockDate is the date in UTC in which the tokens can become redeemed - evaluated based on the block.timestamp */ function createNFT( address _holder, uint256 _amount, address _token, uint256 _unlockDate ) external nonReentrant returns (uint256) { /// @dev increment our counter by 1 _tokenIds.increment(); /// @dev set our newItemID do the current counter uint uint256 newItemId = _tokenIds.current(); /// @dev require that the amount is not 0, address is not the 0 address, and that the expiration date is actually beyond now require(_amount > 0 && _token != address(0) && _unlockDate > block.timestamp, 'NFT01'); /// @dev using the same newItemID we generate a Future struct recording the token address (asset), the amount of tokens (amount), and time it can be unlocked (_unlockDate) futures[newItemId] = Future(_amount, _token, _unlockDate); /// @dev pulls funds from the msg.sender into this contract for escrow to be locked until the unlockDate has passed TransferHelper.transferTokens(_token, msg.sender, address(this), _amount); /// @dev this safely mints an NFT to the _holder address at the current counter index newItemID. /// @dev _safeMint ensures that the receiver address can receive and handle ERC721s - which is either a normal wallet, or a smart contract that has implemented ERC721 receiver _safeMint(_holder, newItemId); /// @dev emit an event with the details of the NFT id minted, plus the attributes of the locked tokens emit NFTCreated(newItemId, _holder, _amount, _token, _unlockDate); return newItemId; } /// @dev internal function used by the standard ER721 function tokenURI to retrieve the baseURI privately held to visualize and get the metadata function _baseURI() internal view override returns (string memory) { return baseURI; } /// @notice function to set the base URI after the contract has been launched, only once - this is done by the admin /// @notice there is no actual on-chain functions that require this URI to be anything beyond a blank string ("") /// @param _uri is the function updateBaseURI(string memory _uri) external { /// @dev this function can only be called once - when the public variable uriSet is set to 0 require(uriSet == 0, 'NFT02'); /// @dev update the baseURI with the new _uri baseURI = _uri; /// @dev set the public variable uriSet to 1 so that this function cannot be called anymore /// @dev cheaper to use uint8 than bool for this admin safety feature uriSet = 1; /// @dev emit event of the update uri emit URISet(_uri); } /// @notice this is the external function that actually redeems an NFT position /// @notice returns true if the function is successful /// @dev this function calls the _redeemFuture(...) internal function which handles the requirements and checks function redeemNFT(uint256 _id) external nonReentrant returns (bool) { /// @dev calls the internal _redeemNFT function that performs various checks to ensure that only the owner of the NFT can redeem their NFT and Future position _redeemNFT(payable(msg.sender), _id); return true; } /** * @notice This internal function, called by redeemNFT to physically burn the NFT and redeem their Future position which distributes the locked tokens to its owner * @dev this function does five things: 1) Checks to ensure only the owner of the NFT can call this function * @dev 2) it checks that the tokens can actually be unlocked based on the time from the expiration * @dev 3) it burns the NFT - removing it from storage entirely * @dev 4) it also deletes the futures struct from storage so that nothing can be redeemed from that storage index again * @dev 5) it withdraws the tokens that have been locked - delivering them to the current owner of the NFT * @param _holder is the owner of the NFT calling the function * @param _id is the unique id of the NFT and unique id of the Future struct */ function _redeemNFT(address payable _holder, uint256 _id) internal { /// @dev ensure that only the owner of the NFT can call this function require(ownerOf(_id) == _holder, 'NFT03'); /// @dev pull the future data from storage and keep in memory to check requirements and disribute tokens Future memory future = futures[_id]; /// @dev ensure that the unlockDate is in the past compared to block.timestamp /// @dev ensure that the future has not been redeemed already and that the amount is greater than 0 require(future.unlockDate < block.timestamp && future.amount > 0, 'NFT04'); /// @dev emit an event of the redemption, the id of the NFt and details of the future (locked tokens) - needs to happen before we delete the future struct and burn the NFT emit NFTRedeemed(_id, _holder, future.amount, future.token, future.unlockDate); /// @dev burn the NFT _burn(_id); /// @dev delete the futures struct so that the owner cannot call this function again delete futures[_id]; /// @dev physically deliver the tokens to the NFT owner TransferHelper.withdrawPayment(weth, future.token, _holder, future.amount); } ///@notice Events when a new NFT (future) is created and one with a Future is redeemed (burned) event NFTCreated(uint256 _i, address _holder, uint256 _amount, address _token, uint256 _unlockDate); event NFTRedeemed(uint256 _i, address _holder, uint256 _amount, address _token, uint256 _unlockDate); event URISet(string newURI); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.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 ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings 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. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).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 overriden 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 = ERC721.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 = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, 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 = ERC721.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(ERC721.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(ERC721.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 IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.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 {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "./IERC721Enumerable.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 ERC721Enumerable is ERC721, IERC721Enumerable { // 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(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.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 < ERC721Enumerable.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 = ERC721.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 = ERC721.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(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.13; import '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol'; import '../interfaces/IWETH.sol'; /// @notice Library to help safely transfer tokens and handle ETH wrapping and unwrapping of WETH library TransferHelper { using SafeERC20 for IERC20; /// @notice Internal function used for standard ERC20 transferFrom method /// @notice it contains a pre and post balance check /// @notice as well as a check on the msg.senders balance /// @param token is the address of the ERC20 being transferred /// @param from is the remitting address /// @param to is the location where they are being delivered function transferTokens( address token, address from, address to, uint256 amount ) internal { uint256 priorBalance = IERC20(token).balanceOf(address(to)); require(IERC20(token).balanceOf(msg.sender) >= amount, 'THL01'); SafeERC20.safeTransferFrom(IERC20(token), from, to, amount); uint256 postBalance = IERC20(token).balanceOf(address(to)); require(postBalance - priorBalance == amount, 'THL02'); } /// @notice Internal function is used with standard ERC20 transfer method /// @notice this function ensures that the amount received is the amount sent with pre and post balance checking /// @param token is the ERC20 contract address that is being transferred /// @param to is the address of the recipient /// @param amount is the amount of tokens that are being transferred function withdrawTokens( address token, address to, uint256 amount ) internal { uint256 priorBalance = IERC20(token).balanceOf(address(to)); SafeERC20.safeTransfer(IERC20(token), to, amount); uint256 postBalance = IERC20(token).balanceOf(address(to)); require(postBalance - priorBalance == amount, 'THL02'); } /// @dev Internal function that handles transfering payments from buyers to sellers with special WETH handling /// @dev this function assumes that if the recipient address is a contract, it cannot handle ETH - so we always deliver WETH /// @dev special care needs to be taken when using contract addresses to sell deals - to ensure it can handle WETH properly when received function transferPayment( address weth, address token, address from, address payable to, uint256 amount ) internal { if (token == weth) { require(msg.value == amount, 'THL03'); if (!Address.isContract(to)) { (bool success, ) = to.call{value: amount}(''); require(success, 'THL04'); } else { /// @dev we want to deliver WETH from ETH here for better handling at contract IWETH(weth).deposit{value: amount}(); assert(IWETH(weth).transfer(to, amount)); } } else { transferTokens(token, from, to, amount); } } /// @dev Internal funciton that handles withdrawing tokens and WETH that are up for sale to buyers /// @dev this function is only called if the tokens are not timelocked /// @dev this function handles weth specially and delivers ETH to the recipient function withdrawPayment( address weth, address token, address payable to, uint256 amount ) internal { if (token == weth) { IWETH(weth).withdraw(amount); (bool success, ) = to.call{value: amount}(''); require(success, 'THL04'); } else { withdrawTokens(token, to, amount); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @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`, 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 Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @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 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); /** * @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; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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 IERC721Receiver { /** * @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 `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @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); }
// 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 Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [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 Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(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); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { 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); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @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); /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../../../utils/Address.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 SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 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( IERC20 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( IERC20 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( IERC20 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(IERC20 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"); } } }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.13; /// @dev used for handling ETH wrapping into WETH to be stored in smart contracts upon deposit, /// ... and used to unwrap WETH into ETH to deliver when withdrawing from smart contracts interface IWETH { function deposit() external payable; function transfer(address to, uint256 value) external returns (bool); function withdraw(uint256) external; }
{ "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address payable","name":"_weth","type":"address"},{"internalType":"string","name":"uri","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_i","type":"uint256"},{"indexed":false,"internalType":"address","name":"_holder","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"},{"indexed":false,"internalType":"address","name":"_token","type":"address"},{"indexed":false,"internalType":"uint256","name":"_unlockDate","type":"uint256"}],"name":"NFTCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_i","type":"uint256"},{"indexed":false,"internalType":"address","name":"_holder","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"},{"indexed":false,"internalType":"address","name":"_token","type":"address"},{"indexed":false,"internalType":"uint256","name":"_unlockDate","type":"uint256"}],"name":"NFTRedeemed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"newURI","type":"string"}],"name":"URISet","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_holder","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_unlockDate","type":"uint256"}],"name":"createNFT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"futures","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"unlockDate","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"redeemNFT","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"updateBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"weth","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60806040526000600e60006101000a81548160ff021916908360ff1602179055503480156200002d57600080fd5b5060405162004f4438038062004f4483398181016040528101906200005391906200040f565b6040518060400160405280600781526020017f48656467657973000000000000000000000000000000000000000000000000008152506040518060400160405280600481526020017f48444759000000000000000000000000000000000000000000000000000000008152508160009080519060200190620000d79291906200015d565b508060019080519060200190620000f09291906200015d565b5050506001600a8190555081600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600d9080519060200190620001549291906200015d565b505050620004d9565b8280546200016b90620004a4565b90600052602060002090601f0160209004810192826200018f5760008555620001db565b82601f10620001aa57805160ff1916838001178555620001db565b82800160010185558215620001db579182015b82811115620001da578251825591602001919060010190620001bd565b5b509050620001ea9190620001ee565b5090565b5b8082111562000209576000816000905550600101620001ef565b5090565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006200024e8262000221565b9050919050565b620002608162000241565b81146200026c57600080fd5b50565b600081519050620002808162000255565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b620002db8262000290565b810181811067ffffffffffffffff82111715620002fd57620002fc620002a1565b5b80604052505050565b6000620003126200020d565b9050620003208282620002d0565b919050565b600067ffffffffffffffff821115620003435762000342620002a1565b5b6200034e8262000290565b9050602081019050919050565b60005b838110156200037b5780820151818401526020810190506200035e565b838111156200038b576000848401525b50505050565b6000620003a8620003a28462000325565b62000306565b905082815260208101848484011115620003c757620003c66200028b565b5b620003d48482856200035b565b509392505050565b600082601f830112620003f457620003f362000286565b5b81516200040684826020860162000391565b91505092915050565b6000806040838503121562000429576200042862000217565b5b600062000439858286016200026f565b925050602083015167ffffffffffffffff8111156200045d576200045c6200021c565b5b6200046b85828601620003dc565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680620004bd57607f821691505b602082108103620004d357620004d262000475565b5b50919050565b614a5b80620004e96000396000f3fe60806040526004361061012e5760003560e01c806358dc2cdb116100ab57806395d89b411161006f57806395d89b4114610449578063a22cb46514610474578063b273e6531461049d578063b88d4fde146104da578063c87b56dd14610503578063e985e9c51461054057610135565b806358dc2cdb1461032a5780636352211e1461036757806370a08231146103a45780638a1a110d146103e1578063931688cb1461042057610135565b806323b872dd116100f257806323b872dd146102335780632f745c591461025c5780633fc8cef31461029957806342842e0e146102c45780634f6ccce7146102ed57610135565b806301ffc9a71461013a57806306fdde0314610177578063081812fc146101a2578063095ea7b3146101df57806318160ddd1461020857610135565b3661013557005b600080fd5b34801561014657600080fd5b50610161600480360381019061015c9190612f62565b61057d565b60405161016e9190612faa565b60405180910390f35b34801561018357600080fd5b5061018c6105f7565b604051610199919061305e565b60405180910390f35b3480156101ae57600080fd5b506101c960048036038101906101c491906130b6565b610689565b6040516101d69190613124565b60405180910390f35b3480156101eb57600080fd5b506102066004803603810190610201919061316b565b61070e565b005b34801561021457600080fd5b5061021d610825565b60405161022a91906131ba565b60405180910390f35b34801561023f57600080fd5b5061025a600480360381019061025591906131d5565b610832565b005b34801561026857600080fd5b50610283600480360381019061027e919061316b565b610892565b60405161029091906131ba565b60405180910390f35b3480156102a557600080fd5b506102ae610937565b6040516102bb9190613249565b60405180910390f35b3480156102d057600080fd5b506102eb60048036038101906102e691906131d5565b61095d565b005b3480156102f957600080fd5b50610314600480360381019061030f91906130b6565b61097d565b60405161032191906131ba565b60405180910390f35b34801561033657600080fd5b50610351600480360381019061034c91906130b6565b6109ee565b60405161035e9190612faa565b60405180910390f35b34801561037357600080fd5b5061038e600480360381019061038991906130b6565b610a58565b60405161039b9190613124565b60405180910390f35b3480156103b057600080fd5b506103cb60048036038101906103c69190613264565b610b09565b6040516103d891906131ba565b60405180910390f35b3480156103ed57600080fd5b50610408600480360381019061040391906130b6565b610bc0565b60405161041793929190613291565b60405180910390f35b34801561042c57600080fd5b50610447600480360381019061044291906133fd565b610c0a565b005b34801561045557600080fd5b5061045e610ccc565b60405161046b919061305e565b60405180910390f35b34801561048057600080fd5b5061049b60048036038101906104969190613472565b610d5e565b005b3480156104a957600080fd5b506104c460048036038101906104bf91906134b2565b610d74565b6040516104d191906131ba565b60405180910390f35b3480156104e657600080fd5b5061050160048036038101906104fc91906135ba565b610f6d565b005b34801561050f57600080fd5b5061052a600480360381019061052591906130b6565b610fcf565b604051610537919061305e565b60405180910390f35b34801561054c57600080fd5b506105676004803603810190610562919061363d565b611076565b6040516105749190612faa565b60405180910390f35b60007f780e9d63000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806105f057506105ef8261110a565b5b9050919050565b606060008054610606906136ac565b80601f0160208091040260200160405190810160405280929190818152602001828054610632906136ac565b801561067f5780601f106106545761010080835404028352916020019161067f565b820191906000526020600020905b81548152906001019060200180831161066257829003601f168201915b5050505050905090565b6000610694826111ec565b6106d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106ca9061374f565b60405180910390fd5b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600061071982610a58565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610789576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610780906137e1565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166107a8611258565b73ffffffffffffffffffffffffffffffffffffffff1614806107d757506107d6816107d1611258565b611076565b5b610816576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161080d90613873565b60405180910390fd5b6108208383611260565b505050565b6000600880549050905090565b61084361083d611258565b82611319565b610882576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161087990613905565b60405180910390fd5b61088d8383836113f7565b505050565b600061089d83610b09565b82106108de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108d590613997565b60405180910390fd5b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002054905092915050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61097883838360405180602001604052806000815250610f6d565b505050565b6000610987610825565b82106109c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109bf90613a29565b60405180910390fd5b600882815481106109dc576109db613a49565b5b90600052602060002001549050919050565b60006002600a5403610a35576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a2c90613ac4565b60405180910390fd5b6002600a81905550610a47338361165d565b600190506001600a81905550919050565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610b00576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610af790613b56565b60405180910390fd5b80915050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610b79576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b7090613be8565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600f6020528060005260406000206000915090508060000154908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060020154905083565b6000600e60009054906101000a900460ff1660ff1614610c5f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5690613c54565b60405180910390fd5b80600d9080519060200190610c75929190612e53565b506001600e60006101000a81548160ff021916908360ff1602179055507fde63cc2d19581e57e158d078c2df83f9ab70addd6257f7f12bfecb21c06c912881604051610cc1919061305e565b60405180910390a150565b606060018054610cdb906136ac565b80601f0160208091040260200160405190810160405280929190818152602001828054610d07906136ac565b8015610d545780601f10610d2957610100808354040283529160200191610d54565b820191906000526020600020905b815481529060010190602001808311610d3757829003601f168201915b5050505050905090565b610d70610d69611258565b8383611891565b5050565b60006002600a5403610dbb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610db290613ac4565b60405180910390fd5b6002600a81905550610dcd600b6119fd565b6000610dd9600b611a13565b9050600085118015610e185750600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015610e2357504283115b610e62576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e5990613cc0565b60405180910390fd5b60405180606001604052808681526020018573ffffffffffffffffffffffffffffffffffffffff16815260200184815250600f60008381526020019081526020016000206000820151816000015560208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060408201518160020155905050610f1084333088611a21565b610f1a8682611c3a565b7fcd994fa262ab94dc214c94042fdc0563334c749730f5b49663732eda398fe1298187878787604051610f51959493929190613ce0565b60405180910390a1809150506001600a81905550949350505050565b610f7e610f78611258565b83611319565b610fbd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fb490613905565b60405180910390fd5b610fc984848484611c58565b50505050565b6060610fda826111ec565b611019576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161101090613da5565b60405180910390fd5b6000611023611cb4565b90506000815111611043576040518060200160405280600081525061106e565b8061104d84611d46565b60405160200161105e929190613e01565b6040516020818303038152906040525b915050919050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806111d557507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806111e557506111e482611ea6565b5b9050919050565b60008073ffffffffffffffffffffffffffffffffffffffff166002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b600033905090565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff166112d383610a58565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000611324826111ec565b611363576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161135a90613e97565b60405180910390fd5b600061136e83610a58565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614806113dd57508373ffffffffffffffffffffffffffffffffffffffff166113c584610689565b73ffffffffffffffffffffffffffffffffffffffff16145b806113ee57506113ed8185611076565b5b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff1661141782610a58565b73ffffffffffffffffffffffffffffffffffffffff161461146d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161146490613f29565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036114dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114d390613fbb565b60405180910390fd5b6114e7838383611f10565b6114f2600082611260565b6001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611542919061400a565b925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611599919061403e565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4611658838383612022565b505050565b8173ffffffffffffffffffffffffffffffffffffffff1661167d82610a58565b73ffffffffffffffffffffffffffffffffffffffff16146116d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116ca906140e0565b60405180910390fd5b6000600f6000838152602001908152602001600020604051806060016040529081600082015481526020016001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016002820154815250509050428160400151108015611776575060008160000151115b6117b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117ac9061414c565b60405180910390fd5b7f59e3d61947ca8bf2d075b2e99dd29f02f9be1be5206aa07df0fff70a8b1ca5b982848360000151846020015185604001516040516117f89594939291906141cb565b60405180910390a161180982612027565b600f60008381526020019081526020016000206000808201600090556001820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556002820160009055505061188c600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168260200151858460000151612144565b505050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036118ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118f69061426a565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516119f09190612faa565b60405180910390a3505050565b6001816000016000828254019250508190555050565b600081600001549050919050565b60008473ffffffffffffffffffffffffffffffffffffffff166370a08231846040518263ffffffff1660e01b8152600401611a5c9190613124565b602060405180830381865afa158015611a79573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a9d919061429f565b9050818573ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401611ad99190613124565b602060405180830381865afa158015611af6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b1a919061429f565b1015611b5b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b5290614318565b60405180910390fd5b611b67858585856122a6565b60008573ffffffffffffffffffffffffffffffffffffffff166370a08231856040518263ffffffff1660e01b8152600401611ba29190613124565b602060405180830381865afa158015611bbf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611be3919061429f565b9050828282611bf2919061400a565b14611c32576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c2990614384565b60405180910390fd5b505050505050565b611c5482826040518060200160405280600081525061232f565b5050565b611c638484846113f7565b611c6f8484848461238a565b611cae576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ca590614416565b60405180910390fd5b50505050565b6060600d8054611cc3906136ac565b80601f0160208091040260200160405190810160405280929190818152602001828054611cef906136ac565b8015611d3c5780601f10611d1157610100808354040283529160200191611d3c565b820191906000526020600020905b815481529060010190602001808311611d1f57829003601f168201915b5050505050905090565b606060008203611d8d576040518060400160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509050611ea1565b600082905060005b60008214611dbf578080611da890614436565b915050600a82611db891906144ad565b9150611d95565b60008167ffffffffffffffff811115611ddb57611dda6132d2565b5b6040519080825280601f01601f191660200182016040528015611e0d5781602001600182028036833780820191505090505b5090505b60008514611e9a57600182611e26919061400a565b9150600a85611e3591906144de565b6030611e41919061403e565b60f81b818381518110611e5757611e56613a49565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a85611e9391906144ad565b9450611e11565b8093505050505b919050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b611f1b838383612511565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611f5d57611f5881612516565b611f9c565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611f9b57611f9a838261255f565b5b5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611fde57611fd9816126cc565b61201d565b8273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161461201c5761201b828261279d565b5b5b505050565b505050565b600061203282610a58565b905061204081600084611f10565b61204b600083611260565b6001600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461209b919061400a565b925050819055506002600083815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905581600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461214081600084612022565b5050565b8373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603612294578373ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b81526004016121b091906131ba565b600060405180830381600087803b1580156121ca57600080fd5b505af11580156121de573d6000803e3d6000fd5b5050505060008273ffffffffffffffffffffffffffffffffffffffff168260405161220890614540565b60006040518083038185875af1925050503d8060008114612245576040519150601f19603f3d011682016040523d82523d6000602084013e61224a565b606091505b505090508061228e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612285906145a1565b60405180910390fd5b506122a0565b61229f83838361281c565b5b50505050565b612329846323b872dd60e01b8585856040516024016122c7939291906145c1565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612977565b50505050565b6123398383612a3e565b612346600084848461238a565b612385576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161237c90614416565b60405180910390fd5b505050565b60006123ab8473ffffffffffffffffffffffffffffffffffffffff16612c17565b15612504578373ffffffffffffffffffffffffffffffffffffffff1663150b7a026123d4611258565b8786866040518563ffffffff1660e01b81526004016123f6949392919061464d565b6020604051808303816000875af192505050801561243257506040513d601f19601f8201168201806040525081019061242f91906146ae565b60015b6124b4573d8060008114612462576040519150601f19603f3d011682016040523d82523d6000602084013e612467565b606091505b5060008151036124ac576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124a390614416565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050612509565b600190505b949350505050565b505050565b6008805490506009600083815260200190815260200160002081905550600881908060018154018082558091505060019003906000526020600020016000909190919091505550565b6000600161256c84610b09565b612576919061400a565b905060006007600084815260200190815260200160002054905081811461265b576000600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002054905080600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002081905550816007600083815260200190815260200160002081905550505b6007600084815260200190815260200160002060009055600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000206000905550505050565b600060016008805490506126e0919061400a565b90506000600960008481526020019081526020016000205490506000600883815481106127105761270f613a49565b5b90600052602060002001549050806008838154811061273257612731613a49565b5b906000526020600020018190555081600960008381526020019081526020016000208190555060096000858152602001908152602001600020600090556008805480612781576127806146db565b5b6001900381819060005260206000200160009055905550505050565b60006127a883610b09565b905081600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002081905550806007600084815260200190815260200160002081905550505050565b60008373ffffffffffffffffffffffffffffffffffffffff166370a08231846040518263ffffffff1660e01b81526004016128579190613124565b602060405180830381865afa158015612874573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612898919061429f565b90506128a5848484612c3a565b60008473ffffffffffffffffffffffffffffffffffffffff166370a08231856040518263ffffffff1660e01b81526004016128e09190613124565b602060405180830381865afa1580156128fd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612921919061429f565b9050828282612930919061400a565b14612970576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161296790614384565b60405180910390fd5b5050505050565b60006129d9826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16612cc09092919063ffffffff16565b9050600081511115612a3957808060200190518101906129f9919061471f565b612a38576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a2f906147be565b60405180910390fd5b5b505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603612aad576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612aa49061482a565b60405180910390fd5b612ab6816111ec565b15612af6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612aed90614896565b60405180910390fd5b612b0260008383611f10565b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254612b52919061403e565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612c1360008383612022565b5050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b612cbb8363a9059cbb60e01b8484604051602401612c599291906148b6565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612977565b505050565b6060612ccf8484600085612cd8565b90509392505050565b606082471015612d1d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d1490614951565b60405180910390fd5b612d2685612c17565b612d65576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d5c906149bd565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051612d8e9190614a0e565b60006040518083038185875af1925050503d8060008114612dcb576040519150601f19603f3d011682016040523d82523d6000602084013e612dd0565b606091505b5091509150612de0828286612dec565b92505050949350505050565b60608315612dfc57829050612e4c565b600083511115612e0f5782518084602001fd5b816040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e43919061305e565b60405180910390fd5b9392505050565b828054612e5f906136ac565b90600052602060002090601f016020900481019282612e815760008555612ec8565b82601f10612e9a57805160ff1916838001178555612ec8565b82800160010185558215612ec8579182015b82811115612ec7578251825591602001919060010190612eac565b5b509050612ed59190612ed9565b5090565b5b80821115612ef2576000816000905550600101612eda565b5090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612f3f81612f0a565b8114612f4a57600080fd5b50565b600081359050612f5c81612f36565b92915050565b600060208284031215612f7857612f77612f00565b5b6000612f8684828501612f4d565b91505092915050565b60008115159050919050565b612fa481612f8f565b82525050565b6000602082019050612fbf6000830184612f9b565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612fff578082015181840152602081019050612fe4565b8381111561300e576000848401525b50505050565b6000601f19601f8301169050919050565b600061303082612fc5565b61303a8185612fd0565b935061304a818560208601612fe1565b61305381613014565b840191505092915050565b600060208201905081810360008301526130788184613025565b905092915050565b6000819050919050565b61309381613080565b811461309e57600080fd5b50565b6000813590506130b08161308a565b92915050565b6000602082840312156130cc576130cb612f00565b5b60006130da848285016130a1565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061310e826130e3565b9050919050565b61311e81613103565b82525050565b60006020820190506131396000830184613115565b92915050565b61314881613103565b811461315357600080fd5b50565b6000813590506131658161313f565b92915050565b6000806040838503121561318257613181612f00565b5b600061319085828601613156565b92505060206131a1858286016130a1565b9150509250929050565b6131b481613080565b82525050565b60006020820190506131cf60008301846131ab565b92915050565b6000806000606084860312156131ee576131ed612f00565b5b60006131fc86828701613156565b935050602061320d86828701613156565b925050604061321e868287016130a1565b9150509250925092565b6000613233826130e3565b9050919050565b61324381613228565b82525050565b600060208201905061325e600083018461323a565b92915050565b60006020828403121561327a57613279612f00565b5b600061328884828501613156565b91505092915050565b60006060820190506132a660008301866131ab565b6132b36020830185613115565b6132c060408301846131ab565b949350505050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61330a82613014565b810181811067ffffffffffffffff82111715613329576133286132d2565b5b80604052505050565b600061333c612ef6565b90506133488282613301565b919050565b600067ffffffffffffffff821115613368576133676132d2565b5b61337182613014565b9050602081019050919050565b82818337600083830152505050565b60006133a061339b8461334d565b613332565b9050828152602081018484840111156133bc576133bb6132cd565b5b6133c784828561337e565b509392505050565b600082601f8301126133e4576133e36132c8565b5b81356133f484826020860161338d565b91505092915050565b60006020828403121561341357613412612f00565b5b600082013567ffffffffffffffff81111561343157613430612f05565b5b61343d848285016133cf565b91505092915050565b61344f81612f8f565b811461345a57600080fd5b50565b60008135905061346c81613446565b92915050565b6000806040838503121561348957613488612f00565b5b600061349785828601613156565b92505060206134a88582860161345d565b9150509250929050565b600080600080608085870312156134cc576134cb612f00565b5b60006134da87828801613156565b94505060206134eb878288016130a1565b93505060406134fc87828801613156565b925050606061350d878288016130a1565b91505092959194509250565b600067ffffffffffffffff821115613534576135336132d2565b5b61353d82613014565b9050602081019050919050565b600061355d61355884613519565b613332565b905082815260208101848484011115613579576135786132cd565b5b61358484828561337e565b509392505050565b600082601f8301126135a1576135a06132c8565b5b81356135b184826020860161354a565b91505092915050565b600080600080608085870312156135d4576135d3612f00565b5b60006135e287828801613156565b94505060206135f387828801613156565b9350506040613604878288016130a1565b925050606085013567ffffffffffffffff81111561362557613624612f05565b5b6136318782880161358c565b91505092959194509250565b6000806040838503121561365457613653612f00565b5b600061366285828601613156565b925050602061367385828601613156565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806136c457607f821691505b6020821081036136d7576136d661367d565b5b50919050565b7f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b6000613739602c83612fd0565b9150613744826136dd565b604082019050919050565b600060208201905081810360008301526137688161372c565b9050919050565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b60006137cb602183612fd0565b91506137d68261376f565b604082019050919050565b600060208201905081810360008301526137fa816137be565b9050919050565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760008201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000602082015250565b600061385d603883612fd0565b915061386882613801565b604082019050919050565b6000602082019050818103600083015261388c81613850565b9050919050565b7f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60008201527f776e6572206e6f7220617070726f766564000000000000000000000000000000602082015250565b60006138ef603183612fd0565b91506138fa82613893565b604082019050919050565b6000602082019050818103600083015261391e816138e2565b9050919050565b7f455243373231456e756d657261626c653a206f776e657220696e646578206f7560008201527f74206f6620626f756e6473000000000000000000000000000000000000000000602082015250565b6000613981602b83612fd0565b915061398c82613925565b604082019050919050565b600060208201905081810360008301526139b081613974565b9050919050565b7f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60008201527f7574206f6620626f756e64730000000000000000000000000000000000000000602082015250565b6000613a13602c83612fd0565b9150613a1e826139b7565b604082019050919050565b60006020820190508181036000830152613a4281613a06565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b6000613aae601f83612fd0565b9150613ab982613a78565b602082019050919050565b60006020820190508181036000830152613add81613aa1565b9050919050565b7f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460008201527f656e7420746f6b656e0000000000000000000000000000000000000000000000602082015250565b6000613b40602983612fd0565b9150613b4b82613ae4565b604082019050919050565b60006020820190508181036000830152613b6f81613b33565b9050919050565b7f4552433732313a2062616c616e636520717565727920666f7220746865207a6560008201527f726f206164647265737300000000000000000000000000000000000000000000602082015250565b6000613bd2602a83612fd0565b9150613bdd82613b76565b604082019050919050565b60006020820190508181036000830152613c0181613bc5565b9050919050565b7f4e46543032000000000000000000000000000000000000000000000000000000600082015250565b6000613c3e600583612fd0565b9150613c4982613c08565b602082019050919050565b60006020820190508181036000830152613c6d81613c31565b9050919050565b7f4e46543031000000000000000000000000000000000000000000000000000000600082015250565b6000613caa600583612fd0565b9150613cb582613c74565b602082019050919050565b60006020820190508181036000830152613cd981613c9d565b9050919050565b600060a082019050613cf560008301886131ab565b613d026020830187613115565b613d0f60408301866131ab565b613d1c6060830185613115565b613d2960808301846131ab565b9695505050505050565b7f4552433732314d657461646174613a2055524920717565727920666f72206e6f60008201527f6e6578697374656e7420746f6b656e0000000000000000000000000000000000602082015250565b6000613d8f602f83612fd0565b9150613d9a82613d33565b604082019050919050565b60006020820190508181036000830152613dbe81613d82565b9050919050565b600081905092915050565b6000613ddb82612fc5565b613de58185613dc5565b9350613df5818560208601612fe1565b80840191505092915050565b6000613e0d8285613dd0565b9150613e198284613dd0565b91508190509392505050565b7f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b6000613e81602c83612fd0565b9150613e8c82613e25565b604082019050919050565b60006020820190508181036000830152613eb081613e74565b9050919050565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b6000613f13602583612fd0565b9150613f1e82613eb7565b604082019050919050565b60006020820190508181036000830152613f4281613f06565b9050919050565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000613fa5602483612fd0565b9150613fb082613f49565b604082019050919050565b60006020820190508181036000830152613fd481613f98565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061401582613080565b915061402083613080565b92508282101561403357614032613fdb565b5b828203905092915050565b600061404982613080565b915061405483613080565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561408957614088613fdb565b5b828201905092915050565b7f4e46543033000000000000000000000000000000000000000000000000000000600082015250565b60006140ca600583612fd0565b91506140d582614094565b602082019050919050565b600060208201905081810360008301526140f9816140bd565b9050919050565b7f4e46543034000000000000000000000000000000000000000000000000000000600082015250565b6000614136600583612fd0565b915061414182614100565b602082019050919050565b6000602082019050818103600083015261416581614129565b9050919050565b6000819050919050565b600061419161418c614187846130e3565b61416c565b6130e3565b9050919050565b60006141a382614176565b9050919050565b60006141b582614198565b9050919050565b6141c5816141aa565b82525050565b600060a0820190506141e060008301886131ab565b6141ed60208301876141bc565b6141fa60408301866131ab565b6142076060830185613115565b61421460808301846131ab565b9695505050505050565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b6000614254601983612fd0565b915061425f8261421e565b602082019050919050565b6000602082019050818103600083015261428381614247565b9050919050565b6000815190506142998161308a565b92915050565b6000602082840312156142b5576142b4612f00565b5b60006142c38482850161428a565b91505092915050565b7f54484c3031000000000000000000000000000000000000000000000000000000600082015250565b6000614302600583612fd0565b915061430d826142cc565b602082019050919050565b60006020820190508181036000830152614331816142f5565b9050919050565b7f54484c3032000000000000000000000000000000000000000000000000000000600082015250565b600061436e600583612fd0565b915061437982614338565b602082019050919050565b6000602082019050818103600083015261439d81614361565b9050919050565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b6000614400603283612fd0565b915061440b826143a4565b604082019050919050565b6000602082019050818103600083015261442f816143f3565b9050919050565b600061444182613080565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361447357614472613fdb565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006144b882613080565b91506144c383613080565b9250826144d3576144d261447e565b5b828204905092915050565b60006144e982613080565b91506144f483613080565b9250826145045761450361447e565b5b828206905092915050565b600081905092915050565b50565b600061452a60008361450f565b91506145358261451a565b600082019050919050565b600061454b8261451d565b9150819050919050565b7f54484c3034000000000000000000000000000000000000000000000000000000600082015250565b600061458b600583612fd0565b915061459682614555565b602082019050919050565b600060208201905081810360008301526145ba8161457e565b9050919050565b60006060820190506145d66000830186613115565b6145e36020830185613115565b6145f060408301846131ab565b949350505050565b600081519050919050565b600082825260208201905092915050565b600061461f826145f8565b6146298185614603565b9350614639818560208601612fe1565b61464281613014565b840191505092915050565b60006080820190506146626000830187613115565b61466f6020830186613115565b61467c60408301856131ab565b818103606083015261468e8184614614565b905095945050505050565b6000815190506146a881612f36565b92915050565b6000602082840312156146c4576146c3612f00565b5b60006146d284828501614699565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60008151905061471981613446565b92915050565b60006020828403121561473557614734612f00565b5b60006147438482850161470a565b91505092915050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b60006147a8602a83612fd0565b91506147b38261474c565b604082019050919050565b600060208201905081810360008301526147d78161479b565b9050919050565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b6000614814602083612fd0565b915061481f826147de565b602082019050919050565b6000602082019050818103600083015261484381614807565b9050919050565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b6000614880601c83612fd0565b915061488b8261484a565b602082019050919050565b600060208201905081810360008301526148af81614873565b9050919050565b60006040820190506148cb6000830185613115565b6148d860208301846131ab565b9392505050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b600061493b602683612fd0565b9150614946826148df565b604082019050919050565b6000602082019050818103600083015261496a8161492e565b9050919050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b60006149a7601d83612fd0565b91506149b282614971565b602082019050919050565b600060208201905081810360008301526149d68161499a565b9050919050565b60006149e8826145f8565b6149f2818561450f565b9350614a02818560208601612fe1565b80840191505092915050565b6000614a1a82846149dd565b91508190509291505056fea2646970667358221220b0b408545892ddf62b1ed9e709634e8723dc9c2814e28a032e1eed2e71ebef9a64736f6c634300080d0033000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x60806040526004361061012e5760003560e01c806358dc2cdb116100ab57806395d89b411161006f57806395d89b4114610449578063a22cb46514610474578063b273e6531461049d578063b88d4fde146104da578063c87b56dd14610503578063e985e9c51461054057610135565b806358dc2cdb1461032a5780636352211e1461036757806370a08231146103a45780638a1a110d146103e1578063931688cb1461042057610135565b806323b872dd116100f257806323b872dd146102335780632f745c591461025c5780633fc8cef31461029957806342842e0e146102c45780634f6ccce7146102ed57610135565b806301ffc9a71461013a57806306fdde0314610177578063081812fc146101a2578063095ea7b3146101df57806318160ddd1461020857610135565b3661013557005b600080fd5b34801561014657600080fd5b50610161600480360381019061015c9190612f62565b61057d565b60405161016e9190612faa565b60405180910390f35b34801561018357600080fd5b5061018c6105f7565b604051610199919061305e565b60405180910390f35b3480156101ae57600080fd5b506101c960048036038101906101c491906130b6565b610689565b6040516101d69190613124565b60405180910390f35b3480156101eb57600080fd5b506102066004803603810190610201919061316b565b61070e565b005b34801561021457600080fd5b5061021d610825565b60405161022a91906131ba565b60405180910390f35b34801561023f57600080fd5b5061025a600480360381019061025591906131d5565b610832565b005b34801561026857600080fd5b50610283600480360381019061027e919061316b565b610892565b60405161029091906131ba565b60405180910390f35b3480156102a557600080fd5b506102ae610937565b6040516102bb9190613249565b60405180910390f35b3480156102d057600080fd5b506102eb60048036038101906102e691906131d5565b61095d565b005b3480156102f957600080fd5b50610314600480360381019061030f91906130b6565b61097d565b60405161032191906131ba565b60405180910390f35b34801561033657600080fd5b50610351600480360381019061034c91906130b6565b6109ee565b60405161035e9190612faa565b60405180910390f35b34801561037357600080fd5b5061038e600480360381019061038991906130b6565b610a58565b60405161039b9190613124565b60405180910390f35b3480156103b057600080fd5b506103cb60048036038101906103c69190613264565b610b09565b6040516103d891906131ba565b60405180910390f35b3480156103ed57600080fd5b50610408600480360381019061040391906130b6565b610bc0565b60405161041793929190613291565b60405180910390f35b34801561042c57600080fd5b50610447600480360381019061044291906133fd565b610c0a565b005b34801561045557600080fd5b5061045e610ccc565b60405161046b919061305e565b60405180910390f35b34801561048057600080fd5b5061049b60048036038101906104969190613472565b610d5e565b005b3480156104a957600080fd5b506104c460048036038101906104bf91906134b2565b610d74565b6040516104d191906131ba565b60405180910390f35b3480156104e657600080fd5b5061050160048036038101906104fc91906135ba565b610f6d565b005b34801561050f57600080fd5b5061052a600480360381019061052591906130b6565b610fcf565b604051610537919061305e565b60405180910390f35b34801561054c57600080fd5b506105676004803603810190610562919061363d565b611076565b6040516105749190612faa565b60405180910390f35b60007f780e9d63000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806105f057506105ef8261110a565b5b9050919050565b606060008054610606906136ac565b80601f0160208091040260200160405190810160405280929190818152602001828054610632906136ac565b801561067f5780601f106106545761010080835404028352916020019161067f565b820191906000526020600020905b81548152906001019060200180831161066257829003601f168201915b5050505050905090565b6000610694826111ec565b6106d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106ca9061374f565b60405180910390fd5b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600061071982610a58565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610789576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610780906137e1565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166107a8611258565b73ffffffffffffffffffffffffffffffffffffffff1614806107d757506107d6816107d1611258565b611076565b5b610816576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161080d90613873565b60405180910390fd5b6108208383611260565b505050565b6000600880549050905090565b61084361083d611258565b82611319565b610882576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161087990613905565b60405180910390fd5b61088d8383836113f7565b505050565b600061089d83610b09565b82106108de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108d590613997565b60405180910390fd5b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002054905092915050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61097883838360405180602001604052806000815250610f6d565b505050565b6000610987610825565b82106109c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109bf90613a29565b60405180910390fd5b600882815481106109dc576109db613a49565b5b90600052602060002001549050919050565b60006002600a5403610a35576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a2c90613ac4565b60405180910390fd5b6002600a81905550610a47338361165d565b600190506001600a81905550919050565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610b00576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610af790613b56565b60405180910390fd5b80915050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610b79576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b7090613be8565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600f6020528060005260406000206000915090508060000154908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060020154905083565b6000600e60009054906101000a900460ff1660ff1614610c5f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5690613c54565b60405180910390fd5b80600d9080519060200190610c75929190612e53565b506001600e60006101000a81548160ff021916908360ff1602179055507fde63cc2d19581e57e158d078c2df83f9ab70addd6257f7f12bfecb21c06c912881604051610cc1919061305e565b60405180910390a150565b606060018054610cdb906136ac565b80601f0160208091040260200160405190810160405280929190818152602001828054610d07906136ac565b8015610d545780601f10610d2957610100808354040283529160200191610d54565b820191906000526020600020905b815481529060010190602001808311610d3757829003601f168201915b5050505050905090565b610d70610d69611258565b8383611891565b5050565b60006002600a5403610dbb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610db290613ac4565b60405180910390fd5b6002600a81905550610dcd600b6119fd565b6000610dd9600b611a13565b9050600085118015610e185750600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015610e2357504283115b610e62576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e5990613cc0565b60405180910390fd5b60405180606001604052808681526020018573ffffffffffffffffffffffffffffffffffffffff16815260200184815250600f60008381526020019081526020016000206000820151816000015560208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060408201518160020155905050610f1084333088611a21565b610f1a8682611c3a565b7fcd994fa262ab94dc214c94042fdc0563334c749730f5b49663732eda398fe1298187878787604051610f51959493929190613ce0565b60405180910390a1809150506001600a81905550949350505050565b610f7e610f78611258565b83611319565b610fbd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fb490613905565b60405180910390fd5b610fc984848484611c58565b50505050565b6060610fda826111ec565b611019576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161101090613da5565b60405180910390fd5b6000611023611cb4565b90506000815111611043576040518060200160405280600081525061106e565b8061104d84611d46565b60405160200161105e929190613e01565b6040516020818303038152906040525b915050919050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806111d557507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806111e557506111e482611ea6565b5b9050919050565b60008073ffffffffffffffffffffffffffffffffffffffff166002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b600033905090565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff166112d383610a58565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000611324826111ec565b611363576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161135a90613e97565b60405180910390fd5b600061136e83610a58565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614806113dd57508373ffffffffffffffffffffffffffffffffffffffff166113c584610689565b73ffffffffffffffffffffffffffffffffffffffff16145b806113ee57506113ed8185611076565b5b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff1661141782610a58565b73ffffffffffffffffffffffffffffffffffffffff161461146d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161146490613f29565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036114dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114d390613fbb565b60405180910390fd5b6114e7838383611f10565b6114f2600082611260565b6001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611542919061400a565b925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611599919061403e565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4611658838383612022565b505050565b8173ffffffffffffffffffffffffffffffffffffffff1661167d82610a58565b73ffffffffffffffffffffffffffffffffffffffff16146116d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116ca906140e0565b60405180910390fd5b6000600f6000838152602001908152602001600020604051806060016040529081600082015481526020016001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016002820154815250509050428160400151108015611776575060008160000151115b6117b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117ac9061414c565b60405180910390fd5b7f59e3d61947ca8bf2d075b2e99dd29f02f9be1be5206aa07df0fff70a8b1ca5b982848360000151846020015185604001516040516117f89594939291906141cb565b60405180910390a161180982612027565b600f60008381526020019081526020016000206000808201600090556001820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556002820160009055505061188c600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168260200151858460000151612144565b505050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036118ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118f69061426a565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516119f09190612faa565b60405180910390a3505050565b6001816000016000828254019250508190555050565b600081600001549050919050565b60008473ffffffffffffffffffffffffffffffffffffffff166370a08231846040518263ffffffff1660e01b8152600401611a5c9190613124565b602060405180830381865afa158015611a79573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a9d919061429f565b9050818573ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401611ad99190613124565b602060405180830381865afa158015611af6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b1a919061429f565b1015611b5b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b5290614318565b60405180910390fd5b611b67858585856122a6565b60008573ffffffffffffffffffffffffffffffffffffffff166370a08231856040518263ffffffff1660e01b8152600401611ba29190613124565b602060405180830381865afa158015611bbf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611be3919061429f565b9050828282611bf2919061400a565b14611c32576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c2990614384565b60405180910390fd5b505050505050565b611c5482826040518060200160405280600081525061232f565b5050565b611c638484846113f7565b611c6f8484848461238a565b611cae576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ca590614416565b60405180910390fd5b50505050565b6060600d8054611cc3906136ac565b80601f0160208091040260200160405190810160405280929190818152602001828054611cef906136ac565b8015611d3c5780601f10611d1157610100808354040283529160200191611d3c565b820191906000526020600020905b815481529060010190602001808311611d1f57829003601f168201915b5050505050905090565b606060008203611d8d576040518060400160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509050611ea1565b600082905060005b60008214611dbf578080611da890614436565b915050600a82611db891906144ad565b9150611d95565b60008167ffffffffffffffff811115611ddb57611dda6132d2565b5b6040519080825280601f01601f191660200182016040528015611e0d5781602001600182028036833780820191505090505b5090505b60008514611e9a57600182611e26919061400a565b9150600a85611e3591906144de565b6030611e41919061403e565b60f81b818381518110611e5757611e56613a49565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a85611e9391906144ad565b9450611e11565b8093505050505b919050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b611f1b838383612511565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611f5d57611f5881612516565b611f9c565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611f9b57611f9a838261255f565b5b5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611fde57611fd9816126cc565b61201d565b8273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161461201c5761201b828261279d565b5b5b505050565b505050565b600061203282610a58565b905061204081600084611f10565b61204b600083611260565b6001600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461209b919061400a565b925050819055506002600083815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905581600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461214081600084612022565b5050565b8373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603612294578373ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b81526004016121b091906131ba565b600060405180830381600087803b1580156121ca57600080fd5b505af11580156121de573d6000803e3d6000fd5b5050505060008273ffffffffffffffffffffffffffffffffffffffff168260405161220890614540565b60006040518083038185875af1925050503d8060008114612245576040519150601f19603f3d011682016040523d82523d6000602084013e61224a565b606091505b505090508061228e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612285906145a1565b60405180910390fd5b506122a0565b61229f83838361281c565b5b50505050565b612329846323b872dd60e01b8585856040516024016122c7939291906145c1565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612977565b50505050565b6123398383612a3e565b612346600084848461238a565b612385576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161237c90614416565b60405180910390fd5b505050565b60006123ab8473ffffffffffffffffffffffffffffffffffffffff16612c17565b15612504578373ffffffffffffffffffffffffffffffffffffffff1663150b7a026123d4611258565b8786866040518563ffffffff1660e01b81526004016123f6949392919061464d565b6020604051808303816000875af192505050801561243257506040513d601f19601f8201168201806040525081019061242f91906146ae565b60015b6124b4573d8060008114612462576040519150601f19603f3d011682016040523d82523d6000602084013e612467565b606091505b5060008151036124ac576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124a390614416565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050612509565b600190505b949350505050565b505050565b6008805490506009600083815260200190815260200160002081905550600881908060018154018082558091505060019003906000526020600020016000909190919091505550565b6000600161256c84610b09565b612576919061400a565b905060006007600084815260200190815260200160002054905081811461265b576000600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002054905080600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002081905550816007600083815260200190815260200160002081905550505b6007600084815260200190815260200160002060009055600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000206000905550505050565b600060016008805490506126e0919061400a565b90506000600960008481526020019081526020016000205490506000600883815481106127105761270f613a49565b5b90600052602060002001549050806008838154811061273257612731613a49565b5b906000526020600020018190555081600960008381526020019081526020016000208190555060096000858152602001908152602001600020600090556008805480612781576127806146db565b5b6001900381819060005260206000200160009055905550505050565b60006127a883610b09565b905081600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002081905550806007600084815260200190815260200160002081905550505050565b60008373ffffffffffffffffffffffffffffffffffffffff166370a08231846040518263ffffffff1660e01b81526004016128579190613124565b602060405180830381865afa158015612874573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612898919061429f565b90506128a5848484612c3a565b60008473ffffffffffffffffffffffffffffffffffffffff166370a08231856040518263ffffffff1660e01b81526004016128e09190613124565b602060405180830381865afa1580156128fd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612921919061429f565b9050828282612930919061400a565b14612970576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161296790614384565b60405180910390fd5b5050505050565b60006129d9826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16612cc09092919063ffffffff16565b9050600081511115612a3957808060200190518101906129f9919061471f565b612a38576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a2f906147be565b60405180910390fd5b5b505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603612aad576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612aa49061482a565b60405180910390fd5b612ab6816111ec565b15612af6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612aed90614896565b60405180910390fd5b612b0260008383611f10565b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254612b52919061403e565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612c1360008383612022565b5050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b612cbb8363a9059cbb60e01b8484604051602401612c599291906148b6565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612977565b505050565b6060612ccf8484600085612cd8565b90509392505050565b606082471015612d1d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d1490614951565b60405180910390fd5b612d2685612c17565b612d65576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d5c906149bd565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051612d8e9190614a0e565b60006040518083038185875af1925050503d8060008114612dcb576040519150601f19603f3d011682016040523d82523d6000602084013e612dd0565b606091505b5091509150612de0828286612dec565b92505050949350505050565b60608315612dfc57829050612e4c565b600083511115612e0f5782518084602001fd5b816040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e43919061305e565b60405180910390fd5b9392505050565b828054612e5f906136ac565b90600052602060002090601f016020900481019282612e815760008555612ec8565b82601f10612e9a57805160ff1916838001178555612ec8565b82800160010185558215612ec8579182015b82811115612ec7578251825591602001919060010190612eac565b5b509050612ed59190612ed9565b5090565b5b80821115612ef2576000816000905550600101612eda565b5090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612f3f81612f0a565b8114612f4a57600080fd5b50565b600081359050612f5c81612f36565b92915050565b600060208284031215612f7857612f77612f00565b5b6000612f8684828501612f4d565b91505092915050565b60008115159050919050565b612fa481612f8f565b82525050565b6000602082019050612fbf6000830184612f9b565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612fff578082015181840152602081019050612fe4565b8381111561300e576000848401525b50505050565b6000601f19601f8301169050919050565b600061303082612fc5565b61303a8185612fd0565b935061304a818560208601612fe1565b61305381613014565b840191505092915050565b600060208201905081810360008301526130788184613025565b905092915050565b6000819050919050565b61309381613080565b811461309e57600080fd5b50565b6000813590506130b08161308a565b92915050565b6000602082840312156130cc576130cb612f00565b5b60006130da848285016130a1565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061310e826130e3565b9050919050565b61311e81613103565b82525050565b60006020820190506131396000830184613115565b92915050565b61314881613103565b811461315357600080fd5b50565b6000813590506131658161313f565b92915050565b6000806040838503121561318257613181612f00565b5b600061319085828601613156565b92505060206131a1858286016130a1565b9150509250929050565b6131b481613080565b82525050565b60006020820190506131cf60008301846131ab565b92915050565b6000806000606084860312156131ee576131ed612f00565b5b60006131fc86828701613156565b935050602061320d86828701613156565b925050604061321e868287016130a1565b9150509250925092565b6000613233826130e3565b9050919050565b61324381613228565b82525050565b600060208201905061325e600083018461323a565b92915050565b60006020828403121561327a57613279612f00565b5b600061328884828501613156565b91505092915050565b60006060820190506132a660008301866131ab565b6132b36020830185613115565b6132c060408301846131ab565b949350505050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61330a82613014565b810181811067ffffffffffffffff82111715613329576133286132d2565b5b80604052505050565b600061333c612ef6565b90506133488282613301565b919050565b600067ffffffffffffffff821115613368576133676132d2565b5b61337182613014565b9050602081019050919050565b82818337600083830152505050565b60006133a061339b8461334d565b613332565b9050828152602081018484840111156133bc576133bb6132cd565b5b6133c784828561337e565b509392505050565b600082601f8301126133e4576133e36132c8565b5b81356133f484826020860161338d565b91505092915050565b60006020828403121561341357613412612f00565b5b600082013567ffffffffffffffff81111561343157613430612f05565b5b61343d848285016133cf565b91505092915050565b61344f81612f8f565b811461345a57600080fd5b50565b60008135905061346c81613446565b92915050565b6000806040838503121561348957613488612f00565b5b600061349785828601613156565b92505060206134a88582860161345d565b9150509250929050565b600080600080608085870312156134cc576134cb612f00565b5b60006134da87828801613156565b94505060206134eb878288016130a1565b93505060406134fc87828801613156565b925050606061350d878288016130a1565b91505092959194509250565b600067ffffffffffffffff821115613534576135336132d2565b5b61353d82613014565b9050602081019050919050565b600061355d61355884613519565b613332565b905082815260208101848484011115613579576135786132cd565b5b61358484828561337e565b509392505050565b600082601f8301126135a1576135a06132c8565b5b81356135b184826020860161354a565b91505092915050565b600080600080608085870312156135d4576135d3612f00565b5b60006135e287828801613156565b94505060206135f387828801613156565b9350506040613604878288016130a1565b925050606085013567ffffffffffffffff81111561362557613624612f05565b5b6136318782880161358c565b91505092959194509250565b6000806040838503121561365457613653612f00565b5b600061366285828601613156565b925050602061367385828601613156565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806136c457607f821691505b6020821081036136d7576136d661367d565b5b50919050565b7f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b6000613739602c83612fd0565b9150613744826136dd565b604082019050919050565b600060208201905081810360008301526137688161372c565b9050919050565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b60006137cb602183612fd0565b91506137d68261376f565b604082019050919050565b600060208201905081810360008301526137fa816137be565b9050919050565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760008201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000602082015250565b600061385d603883612fd0565b915061386882613801565b604082019050919050565b6000602082019050818103600083015261388c81613850565b9050919050565b7f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60008201527f776e6572206e6f7220617070726f766564000000000000000000000000000000602082015250565b60006138ef603183612fd0565b91506138fa82613893565b604082019050919050565b6000602082019050818103600083015261391e816138e2565b9050919050565b7f455243373231456e756d657261626c653a206f776e657220696e646578206f7560008201527f74206f6620626f756e6473000000000000000000000000000000000000000000602082015250565b6000613981602b83612fd0565b915061398c82613925565b604082019050919050565b600060208201905081810360008301526139b081613974565b9050919050565b7f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60008201527f7574206f6620626f756e64730000000000000000000000000000000000000000602082015250565b6000613a13602c83612fd0565b9150613a1e826139b7565b604082019050919050565b60006020820190508181036000830152613a4281613a06565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b6000613aae601f83612fd0565b9150613ab982613a78565b602082019050919050565b60006020820190508181036000830152613add81613aa1565b9050919050565b7f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460008201527f656e7420746f6b656e0000000000000000000000000000000000000000000000602082015250565b6000613b40602983612fd0565b9150613b4b82613ae4565b604082019050919050565b60006020820190508181036000830152613b6f81613b33565b9050919050565b7f4552433732313a2062616c616e636520717565727920666f7220746865207a6560008201527f726f206164647265737300000000000000000000000000000000000000000000602082015250565b6000613bd2602a83612fd0565b9150613bdd82613b76565b604082019050919050565b60006020820190508181036000830152613c0181613bc5565b9050919050565b7f4e46543032000000000000000000000000000000000000000000000000000000600082015250565b6000613c3e600583612fd0565b9150613c4982613c08565b602082019050919050565b60006020820190508181036000830152613c6d81613c31565b9050919050565b7f4e46543031000000000000000000000000000000000000000000000000000000600082015250565b6000613caa600583612fd0565b9150613cb582613c74565b602082019050919050565b60006020820190508181036000830152613cd981613c9d565b9050919050565b600060a082019050613cf560008301886131ab565b613d026020830187613115565b613d0f60408301866131ab565b613d1c6060830185613115565b613d2960808301846131ab565b9695505050505050565b7f4552433732314d657461646174613a2055524920717565727920666f72206e6f60008201527f6e6578697374656e7420746f6b656e0000000000000000000000000000000000602082015250565b6000613d8f602f83612fd0565b9150613d9a82613d33565b604082019050919050565b60006020820190508181036000830152613dbe81613d82565b9050919050565b600081905092915050565b6000613ddb82612fc5565b613de58185613dc5565b9350613df5818560208601612fe1565b80840191505092915050565b6000613e0d8285613dd0565b9150613e198284613dd0565b91508190509392505050565b7f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b6000613e81602c83612fd0565b9150613e8c82613e25565b604082019050919050565b60006020820190508181036000830152613eb081613e74565b9050919050565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b6000613f13602583612fd0565b9150613f1e82613eb7565b604082019050919050565b60006020820190508181036000830152613f4281613f06565b9050919050565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000613fa5602483612fd0565b9150613fb082613f49565b604082019050919050565b60006020820190508181036000830152613fd481613f98565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061401582613080565b915061402083613080565b92508282101561403357614032613fdb565b5b828203905092915050565b600061404982613080565b915061405483613080565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561408957614088613fdb565b5b828201905092915050565b7f4e46543033000000000000000000000000000000000000000000000000000000600082015250565b60006140ca600583612fd0565b91506140d582614094565b602082019050919050565b600060208201905081810360008301526140f9816140bd565b9050919050565b7f4e46543034000000000000000000000000000000000000000000000000000000600082015250565b6000614136600583612fd0565b915061414182614100565b602082019050919050565b6000602082019050818103600083015261416581614129565b9050919050565b6000819050919050565b600061419161418c614187846130e3565b61416c565b6130e3565b9050919050565b60006141a382614176565b9050919050565b60006141b582614198565b9050919050565b6141c5816141aa565b82525050565b600060a0820190506141e060008301886131ab565b6141ed60208301876141bc565b6141fa60408301866131ab565b6142076060830185613115565b61421460808301846131ab565b9695505050505050565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b6000614254601983612fd0565b915061425f8261421e565b602082019050919050565b6000602082019050818103600083015261428381614247565b9050919050565b6000815190506142998161308a565b92915050565b6000602082840312156142b5576142b4612f00565b5b60006142c38482850161428a565b91505092915050565b7f54484c3031000000000000000000000000000000000000000000000000000000600082015250565b6000614302600583612fd0565b915061430d826142cc565b602082019050919050565b60006020820190508181036000830152614331816142f5565b9050919050565b7f54484c3032000000000000000000000000000000000000000000000000000000600082015250565b600061436e600583612fd0565b915061437982614338565b602082019050919050565b6000602082019050818103600083015261439d81614361565b9050919050565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b6000614400603283612fd0565b915061440b826143a4565b604082019050919050565b6000602082019050818103600083015261442f816143f3565b9050919050565b600061444182613080565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361447357614472613fdb565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006144b882613080565b91506144c383613080565b9250826144d3576144d261447e565b5b828204905092915050565b60006144e982613080565b91506144f483613080565b9250826145045761450361447e565b5b828206905092915050565b600081905092915050565b50565b600061452a60008361450f565b91506145358261451a565b600082019050919050565b600061454b8261451d565b9150819050919050565b7f54484c3034000000000000000000000000000000000000000000000000000000600082015250565b600061458b600583612fd0565b915061459682614555565b602082019050919050565b600060208201905081810360008301526145ba8161457e565b9050919050565b60006060820190506145d66000830186613115565b6145e36020830185613115565b6145f060408301846131ab565b949350505050565b600081519050919050565b600082825260208201905092915050565b600061461f826145f8565b6146298185614603565b9350614639818560208601612fe1565b61464281613014565b840191505092915050565b60006080820190506146626000830187613115565b61466f6020830186613115565b61467c60408301856131ab565b818103606083015261468e8184614614565b905095945050505050565b6000815190506146a881612f36565b92915050565b6000602082840312156146c4576146c3612f00565b5b60006146d284828501614699565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60008151905061471981613446565b92915050565b60006020828403121561473557614734612f00565b5b60006147438482850161470a565b91505092915050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b60006147a8602a83612fd0565b91506147b38261474c565b604082019050919050565b600060208201905081810360008301526147d78161479b565b9050919050565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b6000614814602083612fd0565b915061481f826147de565b602082019050919050565b6000602082019050818103600083015261484381614807565b9050919050565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b6000614880601c83612fd0565b915061488b8261484a565b602082019050919050565b600060208201905081810360008301526148af81614873565b9050919050565b60006040820190506148cb6000830185613115565b6148d860208301846131ab565b9392505050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b600061493b602683612fd0565b9150614946826148df565b604082019050919050565b6000602082019050818103600083015261496a8161492e565b9050919050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b60006149a7601d83612fd0565b91506149b282614971565b602082019050919050565b600060208201905081810360008301526149d68161499a565b9050919050565b60006149e8826145f8565b6149f2818561450f565b9350614a02818560208601612fe1565b80840191505092915050565b6000614a1a82846149dd565b91508190509291505056fea2646970667358221220b0b408545892ddf62b1ed9e709634e8723dc9c2814e28a032e1eed2e71ebef9a64736f6c634300080d0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _weth (address): 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
Arg [1] : uri (string):
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.