Feature Tip: Add private address tag to any address under My Name Tag !
Overview
TokenID
57
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 Name:
GenesisRepot
Compiler Version
v0.8.4+commit.c7e474f2
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import '@openzeppelin/contracts/utils/Strings.sol'; import '../VarietyRepot.sol'; import '../../Randomize.sol'; /// @title Genesis /// @author Simon Fremaux (@dievardump) contract GenesisRepot is VarietyRepot { using Strings for uint256; using Strings for uint16; using Strings for uint8; using Randomize for Randomize.Random; enum ColorTypes { AUTO, BLACK_WHITE, FULL } struct Grid { uint8 cols; uint8 rows; uint16 cellSize; uint16 offset; uint16 shapes; uint16 minContentSize; uint16 maxContentSize; bool shadowed; bool degen; bool dark; bool full; ColorTypes colorType; uint256 tokenId; uint256 baseSeed; string[5] palette; } struct CellData { uint16 x; uint16 y; uint16 cx; uint16 cy; uint16 index; } /// @notice constructor /// @param name_ name of the contract (see ERC721) /// @param symbol_ symbol of the contract (see ERC721) /// @param contractURI_ The contract URI (containing its metadata) - can be empty "" /// @param openseaProxyRegistry_ OpenSea's proxy registry to allow gas-less listings - can be address(0) /// @param sower_ Sower contract /// @param oldContract_ the oldContract for migration constructor( string memory name_, string memory symbol_, string memory contractURI_, address openseaProxyRegistry_, address sower_, address oldContract_ ) VarietyRepot( name_, symbol_, contractURI_, openseaProxyRegistry_, sower_, oldContract_ ) {} /// @dev internal function to get the name. Should be overrode by actual Variety contract /// @param tokenId the token to get the name of /// @return seedlingName the token name function _getName(uint256 tokenId) internal view override returns (string memory seedlingName) { seedlingName = names[tokenId]; if (bytes(seedlingName).length == 0) { seedlingName = string( abi.encodePacked('Genesis.sol #', tokenId.toString()) ); } } /// @dev Rendering function; should be overrode by the actual seedling contract /// @param tokenId the tokenId /// @param seed the seed /// @return the json function _render(uint256 tokenId, bytes32 seed) internal view virtual override returns (string memory) { Randomize.Random memory random = Randomize.Random({ seed: uint256(seed), offsetBit: 0 }); uint256 result = random.next(0, 100); Grid memory grid = Grid({ cols: 8, rows: 8, cellSize: 140, offset: 40, shapes: 0, minContentSize: 0, maxContentSize: 0, colorType: result <= 80 // auto 80%, 10% B&W, 10% FULL Color ? ColorTypes.AUTO : (result <= 90 ? ColorTypes.BLACK_WHITE : ColorTypes.FULL), dark: random.next(0, 100) < 10, // 10% dark mode degen: random.next(0, 100) < 10, // 10% degen (grid offseted) shadowed: random.next(0, 100) < 3, // 3% with shadow full: random.next(0, 100) < 1, // 1% full genesis palette: _getPalette(random), tokenId: tokenId, baseSeed: uint256(seed) }); // shadowed + full black white is not pleasing to the eye with the wrong first color if (grid.shadowed && grid.colorType == ColorTypes.BLACK_WHITE) { grid.palette[0] = '#99B898'; } result = random.next(0, 16); if (result < 1) { grid.cols = 3; grid.rows = 3; grid.cellSize = 146; grid.offset = 381; } else if (result < 3) { grid.cols = 4; grid.rows = 4; grid.offset = 320; } else if (result < 7) { grid.cols = 6; grid.rows = 6; grid.offset = 180; } else if (result < 11) { grid.cols = 7; grid.rows = 7; grid.cellSize = 146; grid.offset = 89; } grid.minContentSize = (grid.cellSize * 2) / 10; grid.maxContentSize = (grid.cellSize * 6) / 10; bytes memory svg = abi.encodePacked( 'data:application/json;utf8,{"name":"', _getName(tokenId), '","image":"data:image/svg+xml;utf8,', "<svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1200 1200' width='1200' height='1200'>", _renderGrid(grid, random), _renderCells(grid, random) ); svg = abi.encodePacked( svg, "<text style='font: bold 11px sans-serif;' text-anchor='end' x='", (1200 - grid.offset).toString(), "' y='", (1220 - grid.offset).toString(), "'", grid.dark ? " fill='#fff'" : '', '>#', tokenId.toString(), '</text>', '</svg>"' ); svg = abi.encodePacked( svg, ',"license":"Full ownership with unlimited commercial rights.","creator":"@dievardump"', ',"description":"Genesis: A seed, some love, that', "'s", 'all it takes.\\n\\nGenesis is the first of the [sol]Seedlings, an experiment of art and collectible NFTs 100% generated with Solidity.\\nby @dievardump\\n\\nLicense: Full ownership with unlimited commercial rights.\\n\\nMore info at https://solSeedlings.art"' ); return string( abi.encodePacked( svg, ',"properties":{"Colors":"', grid.colorType == ColorTypes.AUTO ? 'Auto' : ( grid.colorType == ColorTypes.BLACK_WHITE ? 'Black & White' : 'Full color' ), '","Grid":"', grid.degen ? 'Degen' : 'Normal', '","Mode":"', grid.dark ? 'Dark' : 'Light', '","Rendering":"', grid.shadowed ? 'Ghost' : 'Normal', '","Size":"', abi.encodePacked( grid.cols.toString(), '*', grid.rows.toString() ), '"', grid.shapes == grid.rows * grid.cols ? ',"Bonus":"Full Board"' : '', '}}' ) ); } function _renderGrid(Grid memory grid, Randomize.Random memory random) internal pure returns (bytes memory svg) { uint256 offsetMore = grid.degen ? grid.cellSize / 2 : 0; svg = abi.encodePacked( "<defs><pattern id='genesis-grid-", grid.baseSeed.toString(), "' x='", (grid.offset + offsetMore).toString(), "' y='", (grid.offset + offsetMore).toString(), "' width='", grid.cellSize.toString(), "' height='", grid.cellSize.toString(), "' patternUnits='userSpaceOnUse'>" ); svg = abi.encodePacked( svg, "<path d='M ", grid.cellSize.toString(), ' 0 L 0 0 0 ', grid.cellSize.toString(), "' fill='none' stroke='", grid.dark ? '#fff' : '#000', "' stroke-width='4'/></pattern>" ); if (!grid.dark) { svg = abi.encodePacked( svg, "<linearGradient id='genesis-gradient-", grid.baseSeed.toString(), "' gradientTransform='rotate(", random.next(0, 360).toString(), ")'><stop offset='0%' stop-color='", _randomHSLA(random.next(10, 45), random), "'/><stop offset='100%' stop-color='", _randomHSLA(random.next(10, 45), random), "' /></linearGradient>" ); } svg = abi.encodePacked( svg, "</defs><rect width='100%' height='100%' fill='#fff' />", grid.dark ? "<rect width='100%' height='100%' fill='#000' />" : string( abi.encodePacked( "<rect width='100%' height='100%' fill='url(#genesis-gradient-", grid.baseSeed.toString(), ")' />" ) ), "<rect x='", grid.offset.toString(), "' y='", grid.offset.toString(), "' width='", (1200 - grid.offset * 2).toString(), "' height='", (1200 - grid.offset * 2).toString(), "' fill='url(#genesis-grid-", grid.baseSeed.toString(), ")' stroke='", grid.dark ? '#fff' : '#000', "' stroke-width='4' />" ); } function _getCellData( uint16 x, uint16 y, Grid memory grid ) internal pure returns (CellData memory) { uint16 left = x * grid.cellSize; uint16 top = y * grid.cellSize; return CellData({ index: y * grid.cols + x, x: left, y: top, cx: left + grid.cellSize / 2, cy: top + grid.cellSize / 2 }); } function _renderCells(Grid memory grid, Randomize.Random memory random) internal pure returns (bytes memory) { uint256 result; CellData memory cellData; bytes memory cells = abi.encodePacked( '<g ', grid.shadowed ? string( abi.encodePacked( "style='filter: drop-shadow(16px 16px 20px ", grid.palette[0], ") invert(80%);'" ) ) : '', " stroke-width='4' stroke-linecap='round' transform='translate(", grid.offset.toString(), ',', grid.offset.toString(), ")'>" ); for (uint16 y; y < grid.rows; y++) { for (uint16 x; x < grid.cols; x++) { cellData = _getCellData(x, y, grid); result = random.next(0, grid.full ? 10 : 16); if (result <= 1) { // 0 & 1 cells = abi.encodePacked( cells, _getCircle( result != 0, random.next( grid.minContentSize / 2, grid.maxContentSize / 2 ), cellData, grid, random ) ); grid.shapes++; } else if (result <= 3) { // 2 & 3 uint256 size = random.next( grid.minContentSize, grid.maxContentSize ); cells = abi.encodePacked( cells, _getSquare(result != 5, size, cellData, grid, random) ); grid.shapes++; } else if (result == 4) { // 4 cells = abi.encodePacked( cells, _getSquare( true, grid.minContentSize, cellData, grid, random ), _getSquare( false, grid.maxContentSize, cellData, grid, random ) ); grid.shapes++; } else if (result == 5) { uint256 half = grid.maxContentSize / 2; bytes memory color = _getColor(false, random, grid); cells = abi.encodePacked( cells, _getLine( cellData.cx - half, cellData.cy - half, cellData.cx + half, cellData.cy + half, color, false ) ); grid.shapes++; } else if (result <= 8) { uint256 half = result >= 7 ? grid.minContentSize / 2 : grid.maxContentSize / 2; bool strong = result >= 7; bytes memory color = _getColor(false, random, grid); bytes memory square; if (result == 8) { square = _getSquare( false, grid.maxContentSize, cellData, grid, random ); } cells = abi.encodePacked( cells, square, _getLine( cellData.cx - half, cellData.cy - half, cellData.cx + half, cellData.cy + half, color, strong ), _getLine( cellData.cx + half, cellData.cy - half, cellData.cx - half, cellData.cy + half, color, strong ) ); grid.shapes++; } else if (result < 10) { cells = abi.encodePacked( cells, _getCircle( result == 8, grid.maxContentSize / 2, cellData, grid, random ), _getCircle( true, grid.minContentSize / 2, cellData, grid, random ) ); grid.shapes++; } } } return abi.encodePacked(cells, '</g>'); } function _getPalette(Randomize.Random memory random) internal pure returns (string[5] memory) { uint256 randPalette = random.next(0, 6); if (randPalette == 0) { return ['#F8B195', '#F67280', '#C06C84', '#6C5B7B', '#355C7D']; } else if (randPalette == 1) { return ['#173F5F', '#20639B', '#3CAEA3', '#F6D55C', '#ED553B']; } else if (randPalette == 2) { return ['#A7226E', '#EC2049', '#F26B38', '#F7DB4F', '#2F9599']; } else if (randPalette == 3) { return ['#99B898', '#FECEAB', '#FF847C', '#E84A5F', '#2A363B']; } else if (randPalette == 4) { return ['#FFADAD', '#FDFFB6', '#9BF6FF', '#BDB2FF', '#FFC6FF']; } else { return ['#EA698B', '#C05299', '#973AA8', '#6D23B6', '#571089']; } } function _getColor( bool fill, Randomize.Random memory random, Grid memory grid ) internal pure returns (bytes memory) { string memory color = grid.dark ? '#fff' : '#000'; if ( // if not full black & white ColorTypes.BLACK_WHITE != grid.colorType && // and if either full color OR 1 out of 5, colorize (ColorTypes.FULL == grid.colorType || random.next(0, 5) < 1) ) { color = grid.palette[random.next(0, grid.palette.length)]; } if (!fill) { return abi.encodePacked(" stroke='", color, "' fill='none' "); } return abi.encodePacked(" fill='", color, "' stroke='none' "); } function _randomHSLA(uint256 maxOpacity, Randomize.Random memory random) internal pure returns (bytes memory) { return abi.encodePacked( 'hsla(', random.next(0, 255).toString(), ',', random.next(0, 100).toString(), '%,', random.next(40, 100).toString(), '%,0.', maxOpacity < 10 ? '0' : '', maxOpacity.toString(), ')' ); } function _getCircle( bool fill, uint256 size, CellData memory cellData, Grid memory grid, Randomize.Random memory random ) internal pure returns (bytes memory) { return abi.encodePacked( "<circle cx='", cellData.cx.toString(), "' cy='", cellData.cy.toString(), "' r='", size.toString(), "'", _getColor(fill, random, grid), '/>' ); } function _getSquare( bool fill, uint256 size, CellData memory cellData, Grid memory grid, Randomize.Random memory random ) internal pure returns (bytes memory) { return abi.encodePacked( "<rect x='", (cellData.cx - size / 2).toString(), "' y='", (cellData.cy - size / 2).toString(), "' width='", size.toString(), "' height='", size.toString(), "'", _getColor(fill, random, grid), '/>' ); } function _getLine( uint256 x0, uint256 y0, uint256 x1, uint256 y1, bytes memory color, bool strong ) internal pure returns (bytes memory) { return abi.encodePacked( "<path d='M ", x0.toString(), ' ', y0.toString(), ' L ', x1.toString(), ' ', y1.toString(), "'", color, '', strong ? "stroke-width='8'" : '', '/>' ); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _setOwner(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _setOwner(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT 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 { require(operator != _msgSender(), "ERC721: approve to caller"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_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); } /** * @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); } /** * @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 of token that is not own"); 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); } /** * @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 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(to).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 {} }
// SPDX-License-Identifier: MIT 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 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 pragma solidity ^0.8.0; import "../ERC721.sol"; import "../../../utils/Context.sol"; /** * @title ERC721 Burnable Token * @dev ERC721 Token that can be irreversibly burned (destroyed). */ abstract contract ERC721Burnable is Context, ERC721 { /** * @dev Burns `tokenId`. See {ERC721-_burn}. * * Requirements: * * - The caller must own `tokenId` or be an approved operator. */ function burn(uint256 tokenId) public virtual { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721Burnable: caller is not owner nor approved"); _burn(tokenId); } }
// SPDX-License-Identifier: MIT 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 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 tokenId); /** * @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 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 pragma solidity ^0.8.0; /** * @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 * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 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); } function _verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) private 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 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 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 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 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 pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } }
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol'; import './ERC721Ownable.sol'; import './ERC721WithRoyalties.sol'; /// @title ERC721Full /// @dev This contains all the different overrides needed on /// ERC721 / Enumerable / URIStorage / Royalties /// @author Simon Fremaux (@dievardump) abstract contract ERC721Full is ERC721Ownable, ERC721Burnable, ERC721WithRoyalties { /// @inheritdoc ERC165 function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721Enumerable, ERC721, ERC721WithRoyalties) returns (bool) { return // either ERC721Enumerable ERC721Enumerable.supportsInterface(interfaceId) || // or Royalties ERC721WithRoyalties.supportsInterface(interfaceId); } /// @inheritdoc ERC721 function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal override(ERC721, ERC721Enumerable) { super._beforeTokenTransfer(from, to, tokenId); } /// @inheritdoc ERC721Ownable function isApprovedForAll(address owner_, address operator) public view override(ERC721, ERC721Ownable) returns (bool) { return ERC721Ownable.isApprovedForAll(owner_, operator); } }
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol'; import '../OpenSea/BaseOpenSea.sol'; /// @title ERC721Ownable /// @author Simon Fremaux (@dievardump) contract ERC721Ownable is Ownable, ERC721Enumerable, BaseOpenSea { /// @notice constructor /// @param name_ name of the contract (see ERC721) /// @param symbol_ symbol of the contract (see ERC721) /// @param contractURI_ The contract URI (containing its metadata) - can be empty "" /// @param openseaProxyRegistry_ OpenSea's proxy registry to allow gas-less listings - can be address(0) constructor( string memory name_, string memory symbol_, string memory contractURI_, address openseaProxyRegistry_ ) ERC721(name_, symbol_) { // set contract uri if present if (bytes(contractURI_).length > 0) { _setContractURI(contractURI_); } // set OpenSea proxyRegistry for gas-less trading if present if (address(0) != openseaProxyRegistry_) { _setOpenSeaRegistry(openseaProxyRegistry_); } } /// @notice Allows gas-less trading on OpenSea by safelisting the Proxy of the user /// @dev Override isApprovedForAll to check first if current operator is owner's OpenSea proxy /// @inheritdoc ERC721 function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { // allows gas less trading on OpenSea if (isOwnersOpenSeaProxy(owner, operator)) { return true; } return super.isApprovedForAll(owner, operator); } /// @notice Helper for the owner of the contract to set the new contract URI /// @dev needs to be owner /// @param contractURI_ new contract URI function setContractURI(string memory contractURI_) external onlyOwner { _setContractURI(contractURI_); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import '../Royalties/ERC2981/IERC2981Royalties.sol'; import '../Royalties/RaribleSecondarySales/IRaribleSecondarySales.sol'; /// @dev This is a contract used for royalties on various platforms /// @author Simon Fremaux (@dievardump) contract ERC721WithRoyalties is IERC2981Royalties, IRaribleSecondarySales { function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) { return interfaceId == type(IERC2981Royalties).interfaceId || interfaceId == type(IRaribleSecondarySales).interfaceId; } /// @inheritdoc IERC2981Royalties function royaltyInfo(uint256, uint256) public view virtual override returns (address _receiver, uint256 _royaltyAmount) { _receiver = address(this); _royaltyAmount = 0; } /// @inheritdoc IRaribleSecondarySales function getFeeRecipients(uint256 tokenId) public view override returns (address payable[] memory recipients) { // using ERC2981 implementation to get the recipient & amount (address recipient, uint256 amount) = royaltyInfo(tokenId, 10000); if (amount != 0) { recipients = new address payable[](1); recipients[0] = payable(recipient); } } /// @inheritdoc IRaribleSecondarySales function getFeeBps(uint256 tokenId) public view override returns (uint256[] memory fees) { // using ERC2981 implementation to get the amount (, uint256 amount) = royaltyInfo(tokenId, 10000); if (amount != 0) { fees = new uint256[](1); fees[0] = amount; } } }
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @title OpenSea contract helper that defines a few things /// @author Simon Fremaux (@dievardump) /// @dev This is a contract used to add OpenSea's support contract BaseOpenSea { string private _contractURI; ProxyRegistry private _proxyRegistry; /// @notice Returns the contract URI function. Used on OpenSea to get details // about a contract (owner, royalties etc...) function contractURI() public view returns (string memory) { return _contractURI; } /// @notice Helper for OpenSea gas-less trading /// @dev Allows to check if `operator` is owner's OpenSea proxy /// @param owner the owner we check for /// @param operator the operator (proxy) we check for function isOwnersOpenSeaProxy(address owner, address operator) public view returns (bool) { ProxyRegistry proxyRegistry = _proxyRegistry; return // we have a proxy registry address address(proxyRegistry) != address(0) && // current operator is owner's proxy address address(proxyRegistry.proxies(owner)) == operator; } /// @dev Internal function to set the _contractURI /// @param contractURI_ the new contract uri function _setContractURI(string memory contractURI_) internal { _contractURI = contractURI_; } /// @dev Internal function to set the _proxyRegistry /// @param proxyRegistryAddress the new proxy registry address function _setOpenSeaRegistry(address proxyRegistryAddress) internal { _proxyRegistry = ProxyRegistry(proxyRegistryAddress); } } contract OwnableDelegateProxy {} contract ProxyRegistry { mapping(address => OwnableDelegateProxy) public proxies; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @title IERC2981Royalties /// @dev Interface for the ERC2981 - Token Royalty standard interface IERC2981Royalties { /// @notice Called with the sale price to determine how much royalty // is owed and to whom. /// @param _tokenId - the NFT asset queried for royalty information /// @param _value - the sale price of the NFT asset specified by _tokenId /// @return _receiver - address of who should be sent the royalty payment /// @return _royaltyAmount - the royalty payment amount for value sale price function royaltyInfo(uint256 _tokenId, uint256 _value) external view returns (address _receiver, uint256 _royaltyAmount); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IRaribleSecondarySales { /// @notice returns a list of royalties recipients /// @param tokenId the token Id to check for /// @return all the recipients for tokenId function getFeeRecipients(uint256 tokenId) external view returns (address payable[] memory); /// @notice returns a list of royalties amounts /// @param tokenId the token Id to check for /// @return all the amounts for tokenId function getFeeBps(uint256 tokenId) external view returns (uint256[] memory); }
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; // small library to randomize using (min, max, seed, offsetBit etc...) library Randomize { struct Random { uint256 seed; uint256 offsetBit; } /// @notice get an random number between (min and max) using seed and offseting bits /// this function assumes that max is never bigger than 0xffffff (hex color with opacity included) /// @dev this function is simply used to get random number using a seed. /// if does bitshifting operations to try to reuse the same seed as much as possible. /// should be enough for anyth /// @param random the randomizer /// @param min the minimum /// @param max the maximum /// @return result the resulting pseudo random number function next( Random memory random, uint256 min, uint256 max ) internal pure returns (uint256 result) { uint256 newSeed = random.seed; uint256 newOffset = random.offsetBit + 3; uint256 maxOffset = 4; uint256 mask = 0xf; if (max > 0xfffff) { mask = 0xffffff; maxOffset = 24; } else if (max > 0xffff) { mask = 0xfffff; maxOffset = 20; } else if (max > 0xfff) { mask = 0xffff; maxOffset = 16; } else if (max > 0xff) { mask = 0xfff; maxOffset = 12; } else if (max > 0xf) { mask = 0xff; maxOffset = 8; } // if offsetBit is too high to get the max number // just get new seed and restart offset to 0 if (newOffset > (256 - maxOffset)) { newOffset = 0; newSeed = uint256(keccak256(abi.encode(newSeed))); } uint256 offseted = (newSeed >> newOffset); uint256 part = offseted & mask; result = min + (part % (max - min)); random.seed = newSeed; random.offsetBit = newOffset; } function nextInt( Random memory random, uint256 min, uint256 max ) internal pure returns (int256 result) { result = int256(Randomize.next(random, min, max)); } }
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import '@openzeppelin/contracts/token/ERC721/IERC721.sol'; /// @title IVariety interface /// @author Simon Fremaux (@dievardump) interface IVariety is IERC721 { /// @notice mint `seeds.length` token(s) to `to` using `seeds` /// @param to token recipient /// @param seeds each token seed function plant(address to, bytes32[] memory seeds) external returns (uint256); /// @notice this function returns the seed associated to a tokenId /// @param tokenId to get the seed of function getTokenSeed(uint256 tokenId) external view returns (bytes32); /// @notice This function allows an owner to ask for a seed update /// this can be needed because although I test the contract as much as possible, /// it might be possible that one token does not render because the seed creates /// error or even "out of gas" computation. That's why this would allow an owner /// in such case, to request for a seed change that will then be triggered by Sower /// @param tokenId id to regenerate seed for function requestSeedChange(uint256 tokenId) external; /// @notice This function allows Sower to answer to a seed change request /// in the event where a seed would produce errors of rendering /// 1) this function can only be called by Sower if the token owner /// asked for a new seed /// 2) this function will only be called if there is a rendering error /// or, Vitalik Buterin forbid, a duplicate /// @param tokenId id to regenerate seed for function changeSeedAfterRequest(uint256 tokenId) external; }
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@//////************@@ // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@/////*******************@@ // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@///***********************@@@ // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@///**************************@@@ // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@///**********/**************/*@@@@ // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@///////****/****************//@@@@@ // @@@*********@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@(///////////*****************//@@@@@@ // @@@**************//////@@@@@@@@@@@@@@@@@@@((////////////***************//@@@@@@@ // @@@*********************////@@@@@@@@@@@@@((///////////////************//@@@@@@@@ // @@@@//**************//***//////@@@@@@@@@@(///////////////////*******//@@@@@@@@@@ // @@@@@/*****************////////((@@@@@@@((///((////////////////***//@@@@@@@@@@@@ // @@@@@@//*************////////////((@@@@@((//((////////////////////@@@@@@@@@@@@@@ // @@@@@@@//**********///////////////((@@@@((((//////////////////@@@@@@@@@@@@@@@@@@ // @@@@@@@@///******//////////////((//((@@@(((((((((((((((((@@@@@@@@@@@@@@@@@@@@@@@ // @@@@@@@@@@@//*///////////////////(//((@(((@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@////////////////////(((((((@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@/((((/////////////((((/@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@@@@@@@@@((((((((@@@(((@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@(((@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@(((@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&(((@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&(((@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&(((@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@(((@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@(((((((((((@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@@@@@@@@(((((((((((((((((((((((((((@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@@@@@@###(((((((((((((((((((((((((###@@@@@@@@@@@@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@@@####################################@@@@@@@@@@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@#############################################@@@@@@@@@@@@@@@@@ // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ import '@openzeppelin/contracts/utils/structs/EnumerableSet.sol'; import './IVariety.sol'; import '../NFT/ERC721Helpers/ERC721Full.sol'; /// @title Variety Contract /// @author Simon Fremaux (@dievardump) contract Variety is IVariety, ERC721Full { event SeedChangeRequest(uint256 indexed tokenId, address indexed operator); // seedlings Sower address public sower; // last tokenId uint256 public lastTokenId; // each token seed mapping(uint256 => bytes32) internal tokenSeed; // names mapping(uint256 => string) public names; // useNames mapping(bytes32 => bool) public usedNames; // tokenIds with a request for seeds change mapping(uint256 => bool) internal seedChangeRequests; modifier onlySower() { require(msg.sender == sower, 'Not Sower.'); _; } /// @notice constructor /// @param name_ name of the contract (see ERC721) /// @param symbol_ symbol of the contract (see ERC721) /// @param contractURI_ The contract URI (containing its metadata) - can be empty "" /// @param openseaProxyRegistry_ OpenSea's proxy registry to allow gas-less listings - can be address(0) /// @param sower_ Sower contract constructor( string memory name_, string memory symbol_, string memory contractURI_, address openseaProxyRegistry_, address sower_ ) ERC721Ownable(name_, symbol_, contractURI_, openseaProxyRegistry_) { sower = sower_; } /// @notice mint `seeds.length` token(s) to `to` using `seeds` /// @param to token recipient /// @param seeds each token seed function plant(address to, bytes32[] memory seeds) external virtual override onlySower returns (uint256) { uint256 tokenId = lastTokenId; for (uint256 i; i < seeds.length; i++) { tokenId++; _safeMint(to, tokenId); tokenSeed[tokenId] = seeds[i]; } lastTokenId = tokenId; return tokenId; } /// @inheritdoc ERC165 function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721Full, IERC165) returns (bool) { return super.supportsInterface(interfaceId); } /// @notice tokenURI override that returns a data:json application /// @inheritdoc ERC721 function tokenURI(uint256 tokenId) public view override returns (string memory) { require( _exists(tokenId), 'ERC721Metadata: URI query for nonexistent token' ); return _render(tokenId, tokenSeed[tokenId]); } /// @notice ERC2981 support - 4% royalties sent to Sower /// @inheritdoc IERC2981Royalties function royaltyInfo(uint256, uint256 value) public view override returns (address receiver, uint256 royaltyAmount) { receiver = sower; royaltyAmount = (value * 400) / 10000; } /// @inheritdoc IVariety function getTokenSeed(uint256 tokenId) external view override returns (bytes32) { require(_exists(tokenId), 'TokenSeed query for nonexistent token'); return tokenSeed[tokenId]; } /// @inheritdoc IVariety function requestSeedChange(uint256 tokenId) external override { require(ownerOf(tokenId) == msg.sender, 'Not token owner.'); seedChangeRequests[tokenId] = true; emit SeedChangeRequest(tokenId, msg.sender); } /// @inheritdoc IVariety function changeSeedAfterRequest(uint256 tokenId) external override onlySower { require(seedChangeRequests[tokenId] == true, 'No request for token.'); seedChangeRequests[tokenId] = false; tokenSeed[tokenId] = keccak256( abi.encode( tokenSeed[tokenId], block.timestamp, block.difficulty, blockhash(block.number - 1) ) ); } /// @notice Function allowing an owner to set the seedling name /// User needs to be extra careful. Some characters might completly break the token. /// Since the metadata are generated in the contract. /// if this ever happens, you can simply reset the name to nothing or for something else /// @dev sender must be tokenId owner /// @param tokenId the token to name /// @param seedlingName the name function setName(uint256 tokenId, string memory seedlingName) external virtual { require(ownerOf(tokenId) == msg.sender, 'Not token owner.'); bytes32 byteName = keccak256(abi.encodePacked(seedlingName)); // if the name is not empty, verify it is not used if (bytes(seedlingName).length > 0) { require(usedNames[byteName] == false, 'Name already used'); usedNames[byteName] = true; } // if it already has a name, mark all name as unused string memory oldName = names[tokenId]; if (bytes(oldName).length > 0) { byteName = keccak256(abi.encodePacked(oldName)); usedNames[byteName] = false; } names[tokenId] = seedlingName; } /// @notice function to get a token name /// @dev token must exist /// @param tokenId the token to get the name of /// @return the token name function getName(uint256 tokenId) external view returns (string memory) { require(_exists(tokenId), 'Unknown token'); return _getName(tokenId); } /// @dev internal function to get the name. Should be overrode by actual Variety contract /// @param tokenId the token to get the name of /// @return the token name function _getName(uint256 tokenId) internal view virtual returns (string memory) { return bytes(names[tokenId]).length > 0 ? names[tokenId] : 'Variety'; } /// @notice Function allowing to check the rendering for a given seed /// This allows to know what a seed would render without minting /// @param seed the seed to render /// @return the json function renderSeed(bytes32 seed) public view returns (string memory) { return _render(0, seed); } /// @dev Rendering function; should be overrode by the actual seedling contract /// @param tokenId the tokenId /// @param seed the seed /// @return the json function _render(uint256 tokenId, bytes32 seed) internal view virtual returns (string memory) { seed; return string( abi.encodePacked( 'data:application/json;utf8,{"name":"', _getName(tokenId), '"}' ) ); } }
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import './Variety.sol'; /// @title VarietyRepot Contract /// @author Simon Fremaux (@dievardump) contract VarietyRepot is Variety { event SeedlingsRepoted(address user, uint256[] ids); // this is the address we will repot tokens from address public oldVariety; // during the first 3 days after the start of migration // we do not allow people to name, so people with names // in the old contract have time to migrate with theirs uint256 public disabledNamingUntil; /// @notice constructor /// @param name_ name of the contract (see ERC721) /// @param symbol_ symbol of the contract (see ERC721) /// @param contractURI_ The contract URI (containing its metadata) - can be empty "" /// @param openseaProxyRegistry_ OpenSea's proxy registry to allow gas-less listings - can be address(0) /// @param sower_ Sower contract constructor( string memory name_, string memory symbol_, string memory contractURI_, address openseaProxyRegistry_, address sower_, address oldVariety_ ) Variety(name_, symbol_, contractURI_, openseaProxyRegistry_, sower_) { sower = sower_; if (address(0) != oldVariety_) { oldVariety = oldVariety_; } // during 3 days, naming will be disabled as to give time to people to migrate from the old contract // to the new and keep their name disabledNamingUntil = block.timestamp + 3 days; } /// @inheritdoc Variety function plant(address, bytes32[] memory) external view override onlySower returns (uint256) { // this ensure that noone, even Sower, can directly mint tokens on this contract // they can only be created through the repoting method revert('No direct planting, only repot.'); } /// @notice Function allowing an owner to set the seedling name /// User needs to be extra careful. Some characters might completly break the token. /// Since the metadata are generated in the contract. /// if this ever happens, you can simply reset the name to nothing or for something else /// @dev sender must be tokenId owner /// @param tokenId the token to name /// @param seedlingName the name function setName(uint256 tokenId, string memory seedlingName) external override { require( block.timestamp > disabledNamingUntil, 'Naming feature disabled.' ); require(ownerOf(tokenId) == msg.sender, 'Not token owner.'); _setName(tokenId, seedlingName); } /// @notice Checks if the string is valid (0-9a-zA-Z,- ) with no leading, trailing or consecutives spaces /// This function is a modified version of the one in the Hashmasks contract /// @dev Explain to a developer any extra details /// @param str the name to validate /// @return if the name is valid function isNameValid(string memory str) public pure returns (bool) { bytes memory strBytes = bytes(str); if (strBytes.length < 1) return false; if (strBytes.length > 32) return false; // Cannot be longer than 32 characters if (strBytes[0] == 0x20) return false; // Leading space if (strBytes[strBytes.length - 1] == 0x20) return false; // Trailing space bytes1 lastChar; bytes1 char; uint8 charCode; for (uint256 i; i < strBytes.length; i++) { char = strBytes[i]; if (char == 0x20 && lastChar == 0x20) return false; // Cannot contain continous spaces charCode = uint8(char); if ( !(charCode >= 97 && charCode <= 122) && // a - z !(charCode >= 65 && charCode <= 90) && // A - Z !(charCode >= 48 && charCode <= 57) && // 0 - 9 !(charCode == 32) && // space !(charCode == 44) && // , !(charCode == 45) // - ) { return false; } lastChar = char; } return true; } /// @notice Slugify a name (tolower and replace all non 0-9az by -) /// @param str the string to keyIfy /// @return the key function slugify(string memory str) public pure returns (string memory) { bytes memory strBytes = bytes(str); bytes memory lowerCase = new bytes(strBytes.length); uint8 charCode; bytes1 char; for (uint256 i; i < strBytes.length; i++) { char = strBytes[i]; charCode = uint8(char); // if 0-9, a-z use the character if ( (charCode >= 48 && charCode <= 57) || (charCode >= 97 && charCode <= 122) ) { lowerCase[i] = char; } else if (charCode >= 65 && charCode <= 90) { // if A-Z, use lowercase lowerCase[i] = bytes1(charCode + 32); } else { // for all others, return a - lowerCase[i] = 0x2D; } } return string(lowerCase); } /// @notice repot (migrate and burn) the seedlings of `users` from the old variety contract to the new one /// to give them the exact same token id, seed and custom name if valid, on this contract /// The old token is burned (deleted) forever from the old contract /// @dev we do not need to check that `user` we transferFrom is not the current contract, because _safeMint /// would fail if we tried to mint the same tokenId twice /// @param users an array of users /// @param maxTokensAtOnce a limit of token to migrate at once, since a few users have strong hands function repotUsersSeedlings( address[] memory users, uint256 maxTokensAtOnce ) external { require( // only the contract owner msg.sender == owner() || // or someone trying to migrate their own tokens can call this function (users.length == 1 && users[0] == msg.sender), 'Not allowed to migrate.' ); Variety oldVariety_ = Variety(oldVariety); address me = address(this); address user; uint256 migrated; for (uint256 j; j < users.length && (migrated < maxTokensAtOnce); j++) { user = users[j]; uint256 userBalance = oldVariety_.balanceOf(user); if (userBalance == 0) continue; uint256 end = userBalance; // some users might have too many tokens to do that in one transaction if (userBalance > (maxTokensAtOnce - migrated)) { end = (maxTokensAtOnce - migrated); } uint256[] memory ids = new uint256[](end); uint256 tokenId; bytes32 seed; bytes32 slugBytes; string memory seedlingName; for (uint256 i; i < end; i++) { // get the last token id owned by the user // this is a bit cheaper than always getting index 0 // because when removing last there is no "reorg" in the EnumerableSet tokenId = oldVariety_.tokenOfOwnerByIndex( user, userBalance - (i + 1) // this takes the last id in the user list ); // get the token seed seed = oldVariety_.getTokenSeed(tokenId); // get the token name seedlingName = oldVariety_.getName(tokenId); // burn the old token first oldVariety_.burn(tokenId); // create the same token id in this contract for this user _safeMint(user, tokenId, ''); // set exact same seed tokenSeed[tokenId] = seed; // if the seedling had a name and the name is valid if ( bytes(seedlingName).length > 0 && isNameValid(seedlingName) ) { slugBytes = keccak256(bytes(slugify(seedlingName))); // and is not already used if (!usedNames[slugBytes]) { // then use it usedNames[slugBytes] = true; names[tokenId] = seedlingName; } } ids[i] = tokenId; } migrated += end; emit SeedlingsRepoted(user, ids); } } /// @dev allows to set a name internally. /// checks that the name is valid and not used, else throws /// @param tokenId the token to name /// @param seedlingName the name function _setName(uint256 tokenId, string memory seedlingName) internal { bytes32 slugBytes; // if the name is not empty, require that it's valid and not used if (bytes(seedlingName).length > 0) { require(isNameValid(seedlingName) == true, 'Invalid name.'); // also requires the name is not already used slugBytes = keccak256(bytes(slugify(seedlingName))); require(usedNames[slugBytes] == false, 'Name already used.'); // set as used usedNames[slugBytes] = true; } // if it already has a name, mark the old name as unused string memory oldName = names[tokenId]; if (bytes(oldName).length > 0) { slugBytes = keccak256(bytes(slugify(oldName))); usedNames[slugBytes] = false; } names[tokenId] = seedlingName; } }
{ "evmVersion": "istanbul", "libraries": {}, "metadata": { "bytecodeHash": "ipfs", "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 200 }, "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"string","name":"contractURI_","type":"string"},{"internalType":"address","name":"openseaProxyRegistry_","type":"address"},{"internalType":"address","name":"sower_","type":"address"},{"internalType":"address","name":"oldContract_","type":"address"}],"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":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"operator","type":"address"}],"name":"SeedChangeRequest","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"SeedlingsRepoted","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"},{"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":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"changeSeedAfterRequest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"disabledNamingUntil","outputs":[{"internalType":"uint256","name":"","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":"uint256","name":"tokenId","type":"uint256"}],"name":"getFeeBps","outputs":[{"internalType":"uint256[]","name":"fees","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getFeeRecipients","outputs":[{"internalType":"address payable[]","name":"recipients","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getName","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTokenSeed","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"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":[{"internalType":"string","name":"str","type":"string"}],"name":"isNameValid","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isOwnersOpenSeaProxy","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"names","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oldVariety","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"address","name":"","type":"address"},{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"name":"plant","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"seed","type":"bytes32"}],"name":"renderSeed","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"users","type":"address[]"},{"internalType":"uint256","name":"maxTokensAtOnce","type":"uint256"}],"name":"repotUsersSeedlings","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"requestSeedChange","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","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":"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":"string","name":"contractURI_","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"seedlingName","type":"string"}],"name":"setName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"str","type":"string"}],"name":"slugify","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"sower","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","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":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"usedNames","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b506040516200634838038062006348833981016040819052620000349162000311565b8585858585858585858585848484848383620000503362000132565b8151620000659060019060208501906200019b565b5080516200007b9060029060208401906200019b565b505082511590506200009257620000928262000182565b6001600160a01b03811615620000be57600c80546001600160a01b0319166001600160a01b0383161790555b5050600d80546001600160a01b0319166001600160a01b038b81169190911790915588161596506200010d9550505050505057601380546001600160a01b0319166001600160a01b0383161790555b6200011c426203f480620003d5565b601455506200044d9a5050505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516200019790600b9060208401906200019b565b5050565b828054620001a990620003fa565b90600052602060002090601f016020900481019282620001cd576000855562000218565b82601f10620001e857805160ff191683800117855562000218565b8280016001018555821562000218579182015b8281111562000218578251825591602001919060010190620001fb565b50620002269291506200022a565b5090565b5b808211156200022657600081556001016200022b565b80516001600160a01b03811681146200025957600080fd5b919050565b600082601f8301126200026f578081fd5b81516001600160401b03808211156200028c576200028c62000437565b604051601f8301601f19908116603f01168101908282118183101715620002b757620002b762000437565b81604052838152602092508683858801011115620002d3578485fd5b8491505b83821015620002f65785820183015181830184015290820190620002d7565b838211156200030757848385830101525b9695505050505050565b60008060008060008060c087890312156200032a578182fd5b86516001600160401b038082111562000341578384fd5b6200034f8a838b016200025e565b9750602089015191508082111562000365578384fd5b620003738a838b016200025e565b9650604089015191508082111562000389578384fd5b506200039889828a016200025e565b945050620003a96060880162000241565b9250620003b96080880162000241565b9150620003c960a0880162000241565b90509295509295509295565b60008219821115620003f557634e487b7160e01b81526011600452602481fd5b500190565b600181811c908216806200040f57607f821691505b602082108114156200043157634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b615eeb806200045d6000396000f3fe608060405234801561001057600080fd5b506004361061025e5760003560e01c8063715018a611610146578063bc36ff81116100c3578063e53ecfc911610087578063e53ecfc914610570578063e8a3d48514610579578063e985e9c514610581578063f2fde38b14610594578063f84ddf0b146105a7578063fe55932a146105b057600080fd5b8063bc36ff8114610511578063bf40e75c14610524578063c7a53af014610537578063c87b56dd1461054a578063e3c629c01461055d57600080fd5b806395d89b411161010a57806395d89b41146104b0578063a22cb465146104b8578063a5004d98146104cb578063b88d4fde146104de578063b9c4d9fb146104f157600080fd5b8063715018a61461044e578063750af3ab1461045657806385745fd7146104795780638da5cb5b1461048c578063938e3d7b1461049d57600080fd5b80632f745c59116101df5780635a4c1624116101a35780635a4c1624146103dc5780636102de98146103ef5780636352211e146104025780636b8ff574146104155780636cc462f91461042857806370a082311461043b57600080fd5b80632f745c591461037d57806342842e0e1461039057806342966c68146103a35780634622ab03146103b65780634f6ccce7146103c957600080fd5b8063095ea7b311610226578063095ea7b3146102f35780630ebd4c7f1461030657806318160ddd1461032657806323b872dd146103385780632a55205a1461034b57600080fd5b806301ffc9a71461026357806304d884961461028b57806305d430db146102a057806306fdde03146102b3578063081812fc146102c8575b600080fd5b610276610271366004614719565b6105c3565b60405190151581526020015b60405180910390f35b61029e6102993660046146e9565b6105d4565b005b6102766102ae36600461476d565b610672565b6102bb61086b565b6040516102829190615ac4565b6102db6102d63660046146e9565b6108fd565b6040516001600160a01b039091168152602001610282565b61029e61030136600461461c565b610985565b6103196103143660046146e9565b610a9b565b6040516102829190615ab1565b6009545b604051908152602001610282565b61029e610346366004614486565b610b09565b61035e610359366004614858565b610b3b565b604080516001600160a01b039093168352602083019190915201610282565b61032a61038b36600461461c565b610b6b565b61029e61039e366004614486565b610c01565b61029e6103b13660046146e9565b610c1c565b6102bb6103c43660046146e9565b610c96565b61032a6103d73660046146e9565b610d30565b61032a6103ea3660046146e9565b610dd1565b6102766103fd36600461444e565b610e49565b6102db6104103660046146e9565b610ef3565b6102bb6104233660046146e9565b610f6a565b6013546102db906001600160a01b031681565b61032a610449366004614432565b610fba565b61029e611041565b6102766104643660046146e9565b60116020526000908152604090205460ff1681565b61029e610487366004614647565b611077565b6000546001600160a01b03166102db565b61029e6104ab36600461476d565b6115c8565b6102bb6115fb565b61029e6104c63660046145eb565b61160a565b61032a6104d9366004614543565b6116cf565b61029e6104ec3660046144c6565b611761565b6105046104ff3660046146e9565b611799565b6040516102829190615a64565b6102bb61051f3660046146e9565b611820565b61029e6105323660046146e9565b61182d565b600d546102db906001600160a01b031681565b6102bb6105583660046146e9565b611945565b6102bb61056b36600461476d565b6119ce565b61032a60145481565b6102bb611b8d565b61027661058f36600461444e565b611b9c565b61029e6105a2366004614432565b611baf565b61032a600e5481565b61029e6105be366004614813565b611c47565b60006105ce82611cf9565b92915050565b336105de82610ef3565b6001600160a01b03161461062c5760405162461bcd60e51b815260206004820152601060248201526f2737ba103a37b5b2b71037bbb732b91760811b60448201526064015b60405180910390fd5b600081815260126020526040808220805460ff1916600117905551339183917f8832fb65003c6ac4dc53a073ae148a6464e937eb2f153567f4aca8f1d431a7469190a350565b60008082905060018151101561068b5750600092915050565b60208151111561069e5750600092915050565b806000815181106106bf57634e487b7160e01b600052603260045260246000fd5b6020910101516001600160f81b031916600160fd1b14156106e35750600092915050565b80600182516106f29190615d50565b8151811061071057634e487b7160e01b600052603260045260246000fd5b6020910101516001600160f81b031916600160fd1b14156107345750600092915050565b6000806000805b845181101561085e5784818151811061076457634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b0319169250600160fd1b831480156107955750600160fd1b6001600160f81b03198516145b156107a7575060009695505050505050565b60f883901c9150606182108015906107c35750607a8260ff1611155b1580156107e5575060418260ff16101580156107e35750605a8260ff1611155b155b8015610806575060308260ff1610158015610804575060398260ff1611155b155b801561081657508160ff16602014155b801561082657508160ff16602c14155b801561083657508160ff16602d14155b15610848575060009695505050505050565b829350808061085690615dea565b91505061073b565b5060019695505050505050565b60606001805461087a90615d93565b80601f01602080910402602001604051908101604052809291908181526020018280546108a690615d93565b80156108f35780601f106108c8576101008083540402835291602001916108f3565b820191906000526020600020905b8154815290600101906020018083116108d657829003601f168201915b5050505050905090565b600061090882611d13565b6109695760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610623565b506000908152600560205260409020546001600160a01b031690565b600061099082610ef3565b9050806001600160a01b0316836001600160a01b031614156109fe5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610623565b336001600160a01b0382161480610a1a5750610a1a8133611b9c565b610a8c5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610623565b610a968383611d30565b505050565b60606000610aab83612710610b3b565b9150508015610b035760408051600180825281830190925290602080830190803683370190505091508082600081518110610af657634e487b7160e01b600052603260045260246000fd5b6020026020010181815250505b50919050565b610b14335b82611d9e565b610b305760405162461bcd60e51b815260040161062390615b5e565b610a96838383611e60565b600d546001600160a01b03166000612710610b5884610190615ce5565b610b629190615ca7565b90509250929050565b6000610b7683610fba565b8210610bd85760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610623565b506001600160a01b03919091166000908152600760209081526040808320938352929052205490565b610a9683838360405180602001604052806000815250611761565b610c2533610b0e565b610c8a5760405162461bcd60e51b815260206004820152603060248201527f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760448201526f1b995c881b9bdc88185c1c1c9bdd995960821b6064820152608401610623565b610c938161200b565b50565b60106020526000908152604090208054610caf90615d93565b80601f0160208091040260200160405190810160405280929190818152602001828054610cdb90615d93565b8015610d285780601f10610cfd57610100808354040283529160200191610d28565b820191906000526020600020905b815481529060010190602001808311610d0b57829003601f168201915b505050505081565b6000610d3b60095490565b8210610d9e5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610623565b60098281548110610dbf57634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b6000610ddc82611d13565b610e365760405162461bcd60e51b815260206004820152602560248201527f546f6b656e5365656420717565727920666f72206e6f6e6578697374656e74206044820152643a37b5b2b760d91b6064820152608401610623565b506000908152600f602052604090205490565b600c546000906001600160a01b03168015801590610eeb575060405163c455279160e01b81526001600160a01b038581166004830152808516919083169063c45527919060240160206040518083038186803b158015610ea857600080fd5b505afa158015610ebc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ee09190614751565b6001600160a01b0316145b949350505050565b6000818152600360205260408120546001600160a01b0316806105ce5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610623565b6060610f7582611d13565b610fb15760405162461bcd60e51b815260206004820152600d60248201526c2ab735b737bbb7103a37b5b2b760991b6044820152606401610623565b6105ce826120b2565b60006001600160a01b0382166110255760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610623565b506001600160a01b031660009081526004602052604090205490565b6000546001600160a01b0316331461106b5760405162461bcd60e51b815260040161062390615b29565b6110756000612189565b565b6000546001600160a01b03163314806110d55750815160011480156110d55750336001600160a01b0316826000815181106110c257634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b0316145b6111215760405162461bcd60e51b815260206004820152601760248201527f4e6f7420616c6c6f77656420746f206d6967726174652e0000000000000000006044820152606401610623565b6013546001600160a01b031630600080805b86518110801561114257508582105b156115bf5786818151811061116757634e487b7160e01b600052603260045260246000fd5b60209081029190910101516040516370a0823160e01b81526001600160a01b0380831660048301529194506000918716906370a082319060240160206040518083038186803b1580156111b957600080fd5b505afa1580156111cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111f19190614701565b9050806111fe57506115ad565b806112098489615d50565b82111561121d5761121a8489615d50565b90505b60008167ffffffffffffffff81111561124657634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561126f578160200160208202803683370190505b5090506000806000606060005b8681101561155f576001600160a01b038d16632f745c598c61129f846001615c49565b6112a9908c615d50565b6040516001600160e01b031960e085901b1681526001600160a01b039092166004830152602482015260440160206040518083038186803b1580156112ed57600080fd5b505afa158015611301573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113259190614701565b604051631693058960e21b8152600481018290529095506001600160a01b038e1690635a4c16249060240160206040518083038186803b15801561136857600080fd5b505afa15801561137c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113a09190614701565b604051631ae3fd5d60e21b8152600481018790529094506001600160a01b038e1690636b8ff5749060240160006040518083038186803b1580156113e357600080fd5b505afa1580156113f7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261141f91908101906147a0565b604051630852cd8d60e31b8152600481018790529092506001600160a01b038e16906342966c6890602401600060405180830381600087803b15801561146457600080fd5b505af1158015611478573d6000803e3d6000fd5b505050506114968b86604051806020016040528060008152506121d9565b6000858152600f602052604090208490558151158015906114bb57506114bb82610672565b15611521576114c9826119ce565b80516020918201206000818152601190925260409091205490935060ff16611521576000838152601160209081526040808320805460ff1916600117905587835260108252909120835161151f92850190614315565b505b8486828151811061154257634e487b7160e01b600052603260045260246000fd5b60209081029190910101528061155781615dea565b91505061127c565b5061156a868a615c49565b98507f3154c2f0b66caa898b6d93281a0d16bbeeba8ed9f6ad8fa7cd628f587173c9628a8660405161159d929190615a40565b60405180910390a1505050505050505b806115b781615dea565b915050611133565b50505050505050565b6000546001600160a01b031633146115f25760405162461bcd60e51b815260040161062390615b29565b610c938161220c565b60606002805461087a90615d93565b6001600160a01b0382163314156116635760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610623565b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600d546000906001600160a01b031633146117195760405162461bcd60e51b815260206004820152600a6024820152692737ba1029b7bbb2b91760b11b6044820152606401610623565b60405162461bcd60e51b815260206004820152601f60248201527f4e6f2064697265637420706c616e74696e672c206f6e6c79207265706f742e006044820152606401610623565b61176b3383611d9e565b6117875760405162461bcd60e51b815260040161062390615b5e565b6117938484848461221f565b50505050565b60606000806117aa84612710610b3b565b915091508060001461181957604080516001808252818301909252906020808301908036833701905050925081836000815181106117f857634e487b7160e01b600052603260045260246000fd5b60200260200101906001600160a01b031690816001600160a01b0316815250505b5050919050565b60606105ce600083612252565b600d546001600160a01b031633146118745760405162461bcd60e51b815260206004820152600a6024820152692737ba1029b7bbb2b91760b11b6044820152606401610623565b60008181526012602052604090205460ff1615156001146118cf5760405162461bcd60e51b81526020600482015260156024820152742737903932b8bab2b9ba103337b9103a37b5b2b71760591b6044820152606401610623565b6000818152601260209081526040808320805460ff19169055600f90915290205442446118fd600143615d50565b604080516020810195909552840192909252606083015240608082015260a00160408051601f1981840301815291815281516020928301206000938452600f90925290912055565b606061195082611d13565b6119b45760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610623565b6000828152600f60205260409020546105ce908390612252565b606060008290506000815167ffffffffffffffff8111156119ff57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611a29576020820181803683370190505b50905060008060005b8451811015611b8257848181518110611a5b57634e487b7160e01b600052603260045260246000fd5b016020015160f881901c93506001600160f81b031916915060308310801590611a88575060398360ff1611155b80611aa6575060618360ff1610158015611aa65750607a8360ff1611155b15611ae85781848281518110611acc57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350611b70565b60418360ff1610158015611b005750605a8360ff1611155b15611b3357611b10836020615c61565b60f81b848281518110611acc57634e487b7160e01b600052603260045260246000fd5b602d60f81b848281518110611b5857634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053505b80611b7a81615dea565b915050611a32565b509195945050505050565b6060600b805461087a90615d93565b6000611ba88383612845565b9392505050565b6000546001600160a01b03163314611bd95760405162461bcd60e51b815260040161062390615b29565b6001600160a01b038116611c3e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610623565b610c9381612189565b6014544211611c985760405162461bcd60e51b815260206004820152601860248201527f4e616d696e6720666561747572652064697361626c65642e00000000000000006044820152606401610623565b33611ca283610ef3565b6001600160a01b031614611ceb5760405162461bcd60e51b815260206004820152601060248201526f2737ba103a37b5b2b71037bbb732b91760811b6044820152606401610623565b611cf5828261288c565b5050565b6000611d0482612a57565b806105ce57506105ce82612a7c565b6000908152600360205260409020546001600160a01b0316151590565b600081815260056020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611d6582610ef3565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000611da982611d13565b611e0a5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610623565b6000611e1583610ef3565b9050806001600160a01b0316846001600160a01b03161480611e505750836001600160a01b0316611e45846108fd565b6001600160a01b0316145b80610eeb5750610eeb8185611b9c565b826001600160a01b0316611e7382610ef3565b6001600160a01b031614611edb5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610623565b6001600160a01b038216611f3d5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610623565b611f48838383612ab2565b611f53600082611d30565b6001600160a01b0383166000908152600460205260408120805460019290611f7c908490615d50565b90915550506001600160a01b0382166000908152600460205260408120805460019290611faa908490615c49565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600061201682610ef3565b905061202481600084612ab2565b61202f600083611d30565b6001600160a01b0381166000908152600460205260408120805460019290612058908490615d50565b909155505060008281526003602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b60008181526010602052604090208054606091906120cf90615d93565b80601f01602080910402602001604051908101604052809291908181526020018280546120fb90615d93565b80156121485780601f1061211d57610100808354040283529160200191612148565b820191906000526020600020905b81548152906001019060200180831161212b57829003601f168201915b505050505090508051600014156121845761216282612abd565b604051602001612172919061534d565b60405160208183030381529060405290505b919050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6121e38383612bd7565b6121f06000848484612d16565b610a965760405162461bcd60e51b815260040161062390615ad7565b8051611cf590600b906020840190614315565b61222a848484611e60565b61223684848484612d16565b6117935760405162461bcd60e51b815260040161062390615ad7565b604080518082019091528181526000602082018190526060919061227882826064612e23565b604080516101e08101825260088082526020820152608c918101919091526028606082015260006080820181905260a0820181905260c0820181905291925060e0810160036122c986856064612e23565b108152602001600a6122de8660006064612e23565b108152602001600a6122f38660006064612e23565b10815260200160016123088660006064612e23565b108152602001605084111561232e57605a841115612327576002612331565b6001612331565b60005b600281111561235057634e487b7160e01b600052602160045260246000fd5b81526020018781526020018660001c815260200161236d85612f2b565b81525090508060e0015180156123a75750600181610160015160028111156123a557634e487b7160e01b600052602160045260246000fd5b145b156123d2576040805180820190915260078152660467272847072760cb1b60208201526101c0820151525b6123df8360006010612e23565b9150600182101561240857600380825260208201526092604082015261017d6060820152612469565b600382101561242857600480825260208201526101406060820152612469565b6007821015612447576006808252602082015260b46060820152612469565b600b821015612469576007808252602082015260926040820152605960608201525b600a8160400151600261247c9190615cbb565b6124869190615c86565b61ffff1660a08201526040810151600a906124a2906006615cbb565b6124ac9190615c86565b61ffff1660c082015260006124c0876120b2565b6124ca8386613380565b6124d48487613675565b6040516020016124e693929190615607565b60405160208183030381529060405290508061251683606001516104b061250d9190615d2d565b61ffff16612abd565b61252b84606001516104c461250d9190615d2d565b84610120015161254a5760405180602001604052806000815250612570565b6040518060400160405280600c81526020016b2066696c6c3d27236666662760a01b8152505b6125798b612abd565b60405160200161258d959493929190614d1d565b6040516020818303038152906040529050806040516020016125af91906149c4565b60408051601f19818403018152919052905080600083610160015160028111156125e957634e487b7160e01b600052602160045260246000fd5b1461266d576001836101600151600281111561261557634e487b7160e01b600052602160045260246000fd5b14612642576040518060400160405280600a815260200169233ab6361031b7b637b960b11b81525061268b565b6040518060400160405280600d81526020016c426c61636b202620576869746560981b81525061268b565b604051806040016040528060048152602001634175746f60e01b8152505b8361010001516126b95760405180604001604052806006815260200165139bdc9b585b60d21b8152506126d8565b604051806040016040528060058152602001642232b3b2b760d91b8152505b8461012001516127055760405180604001604052806005815260200164131a59da1d60da1b815250612723565b604051806040016040528060048152602001634461726b60e01b8152505b8560e001516127505760405180604001604052806006815260200165139bdc9b585b60d21b81525061276f565b6040518060400160405280600581526020016411da1bdcdd60da1b8152505b865161277d9060ff16612abd565b61278d886020015160ff16612abd565b60405160200161279e9291906151e4565b60408051601f19818403018152919052875160208901516127bf9190615d04565b60ff16886080015161ffff16146127e55760405180602001604052806000815250612814565b6040518060400160405280601581526020017416112137b73ab9911d11233ab636102137b0b9321160591b8152505b60405160200161282a9796959493929190614e36565b60405160208183030381529060405294505050505092915050565b60006128518383610e49565b1561285e575060016105ce565b6001600160a01b0380841660009081526006602090815260408083209386168352929052205460ff16611ba8565b8051600090156129635761289f82610672565b15156001146128e05760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b2103730b6b29760991b6044820152606401610623565b6128e9826119ce565b80516020918201206000818152601190925260409091205490915060ff16156129495760405162461bcd60e51b81526020600482015260126024820152712730b6b29030b63932b0b23c903ab9b2b21760711b6044820152606401610623565b6000818152601160205260409020805460ff191660011790555b6000838152601060205260408120805461297c90615d93565b80601f01602080910402602001604051908101604052809291908181526020018280546129a890615d93565b80156129f55780601f106129ca576101008083540402835291602001916129f5565b820191906000526020600020905b8154815290600101906020018083116129d857829003601f168201915b50505050509050600081511115612a3157612a0f816119ce565b8051602091820120600081815260119092526040909120805460ff1916905591505b60008481526010602090815260409091208451612a5092860190614315565b5050505050565b60006001600160e01b0319821663780e9d6360e01b14806105ce57506105ce82613c04565b60006001600160e01b0319821663152a902d60e11b14806105ce57506001600160e01b03198216632dde656160e21b1492915050565b610a96838383613c54565b606081612ae15750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612b0b5780612af581615dea565b9150612b049050600a83615ca7565b9150612ae5565b60008167ffffffffffffffff811115612b3457634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612b5e576020820181803683370190505b5090505b8415610eeb57612b73600183615d50565b9150612b80600a86615e05565b612b8b906030615c49565b60f81b818381518110612bae57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350612bd0600a86615ca7565b9450612b62565b6001600160a01b038216612c2d5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610623565b612c3681611d13565b15612c835760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610623565b612c8f60008383612ab2565b6001600160a01b0382166000908152600460205260408120805460019290612cb8908490615c49565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001600160a01b0384163b15612e1857604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612d5a903390899088908890600401615a03565b602060405180830381600087803b158015612d7457600080fd5b505af1925050508015612da4575060408051601f3d908101601f19168201909252612da191810190614735565b60015b612dfe573d808015612dd2576040519150601f19603f3d011682016040523d82523d6000602084013e612dd7565b606091505b508051612df65760405162461bcd60e51b815260040161062390615ad7565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610eeb565b506001949350505050565b82516020840151600091908290612e3b906003615c49565b90506004600f620fffff861115612e5a57506018905062ffffff612eb0565b61ffff861115612e72575060149050620fffff612eb0565b610fff861115612e8957506010905061ffff612eb0565b60ff861115612e9f5750600c9050610fff612eb0565b600f861115612eb057506008905060ff5b612ebc82610100615d50565b831115612eef57604080516020810186905260009450016040516020818303038152906040528051906020012060001c93505b83831c818116612eff8989615d50565b612f099082615e05565b612f13908a615c49565b958a5250505050602090950194909452509192915050565b612f33614399565b6000612f4183826006612e23565b905080612ff65750506040805160e081018252600760a08201818152662346384231393560c81b60c0840152825282518084018452818152660234636373238360cc1b60208281019190915280840191909152835180850185528281526608d0cc0d90ce0d60ca1b81830152838501528351808501855282815266119b219aa11ba160c91b81830152606084015283518085019094529083526608cccd4d50cdd160ca1b908301526080810191909152919050565b80600114156130ad5750506040805160e081018252600760a082018181526611989b99a31aa360c91b60c0840152825282518084018452818152661199181b199ca160c91b6020828101919091528084019190915283518085018552828152662333434145413360c81b818301528385015283518085018552828152662346364435354360c81b81830152606084015283518085019094529083526611a2a21a9a99a160c91b908301526080810191909152919050565b80600214156131645750506040805160e081018252600760a08201818152662341373232364560c81b60c0840152825282518084018452818152662345433230343960c81b6020828101919091528084019190915283518085018552828152660468c646c8466760cb1b8183015283850152835180850185528281526611a31ba2211a2360c91b8183015260608401528351808501909452908352662332463935393960c81b908301526080810191909152919050565b806003141561321b5750506040805160e081018252600760a08201818152660467272847072760cb1b60c08401528252825180840184528181526611a322a1a2a0a160c91b6020828101919091528084019190915283518085018552828152662346463834374360c81b8183015283850152835180850185528281526611a29c1a209aa360c91b818301526060840152835180850190945290835266119920999b19a160c91b908301526080810191909152919050565b80600414156132d25750506040805160e081018252600760a082018181526608d1919051105160ca1b60c08401528252825180840184528181526611a3222323211b60c91b602082810191909152808401919091528351808501855282815266119ca1231b232360c91b8183015283850152835180850185528281526611a1222119232360c91b81830152606084015283518085019094529083526611a323219b232360c91b908301526080810191909152919050565b50506040805160e081018252600760a082018181526611a2a09b1c9c2160c91b60c0840152825282518084018452818152662343303532393960c81b602082810191909152808401919091528351808501855282815266046726e668282760cb1b81830152838501528351808501855282815266119b221919a11b60c91b8183015260608401528351808501909452908352662335373130383960c81b908301526080810191909152919050565b606060008361010001516133955760006133a6565b600284604001516133a69190615c86565b61ffff1690506133ba846101a00151612abd565b6133d682866060015161ffff166133d19190615c49565b612abd565b6133ed83876060015161ffff166133d19190615c49565b6133fe876040015161ffff16612abd565b61340f886040015161ffff16612abd565b604051602001613423959493929190615382565b604051602081830303815290604052915081613446856040015161ffff16612abd565b613457866040015161ffff16612abd565b86610120015161348357604051806040016040528060048152602001630233030360e41b8152506134a1565b6040518060400160405280600481526020016311b3333360e11b8152505b6040516020016134b49493929190614f69565b604051602081830303815290604052915083610120015161354157816134de856101a00151612abd565b6134ef6133d1866000610168612e23565b6135056134ff87600a602d612e23565b87613d0c565b61351b61351588600a602d612e23565b88613d0c565b60405160200161352f959493929190614bc8565b60405160208183030381529060405291505b8184610120015161357e5761355a856101a00151612abd565b60405160200161356a91906154d1565b604051602081830303815290604052613598565b6040518060600160405280602f8152602001615e87602f91395b6135a9866060015161ffff16612abd565b6135ba876060015161ffff16612abd565b6135da886060015160026135ce9190615cbb565b61250d906104b0615d2d565b6135ee896060015160026135ce9190615cbb565b6135fc8a6101a00151612abd565b8a610120015161362857604051806040016040528060048152602001630233030360e41b815250613646565b6040518060400160405280600481526020016311b3333360e11b8152505b60405160200161365d989796959493929190615066565b60405160208183030381529060405291505092915050565b6040805160a081018252600080825260208201819052918101829052606081810183905260808201839052919060008560e001516136c257604051806020016040528060008152506136e9565b6101c0860151516040516136d99190602001615820565b6040516020818303038152906040525b6136fa876060015161ffff16612abd565b61370b886060015161ffff16612abd565b60405160200161371d93929190615943565b604051602081830303815290604052905060005b866020015160ff168161ffff161015613bd85760005b875160ff1661ffff82161015613bc55761376281838a613daa565b9350613788600089610140015161377a57601061377d565b600a5b89919060ff16612e23565b94506001851161381757826137d886600014156137d060028c60a001516137af9190615c86565b61ffff1660028d60c001516137c49190615c86565b8c919061ffff16612e23565b878c8c613e92565b6040516020016137e99291906148fb565b60408051601f1981840301815291905260808901805191945061380b82615dc8565b61ffff16905250613bb3565b6003851161389b5760006138468960a0015161ffff168a60c0015161ffff168a612e239092919063ffffffff16565b90508361385a876005141583888d8d613ef7565b60405160200161386b9291906148fb565b60408051601f1981840301815291905260808a01805191955061388d82615dc8565b61ffff16905250613bb39050565b84600414156138e357826138bb60018a60a0015161ffff16878c8c613ef7565b6138d160008b60c0015161ffff16888d8d613ef7565b6040516020016137e99392919061492a565b84600514156139b357600060028960c001516138ff9190615c86565b61ffff169050600061391360008a8c613f6c565b90508461397183886040015161ffff1661392d9190615d50565b84896060015161ffff166139419190615d50565b858a6040015161ffff166139559190615c49565b868b6060015161ffff166139699190615c49565b8660006140c0565b6040516020016139829291906148fb565b60408051601f1981840301815291905260808b0180519196506139a482615dc8565b61ffff16905250613bb3915050565b60088511613b2757600060078610156139dc5760028960c001516139d79190615c86565b6139ed565b60028960a001516139ed9190615c86565b61ffff16905060078610156000613a05818b8d613f6c565b905060608860081415613a2b57613a2860008d60c0015161ffff168a8f8f613ef7565b90505b8681613a87868b6040015161ffff16613a449190615d50565b878c6060015161ffff16613a589190615d50565b888d6040015161ffff16613a6c9190615c49565b898e6060015161ffff16613a809190615c49565b888a6140c0565b613ae1878c6040015161ffff16613a9e9190615c49565b888d6060015161ffff16613ab29190615d50565b898e6040015161ffff16613ac69190615d50565b8a8f6060015161ffff16613ada9190615c49565b898b6140c0565b604051602001613af4949392919061496d565b60408051601f1981840301815291905260808d018051919850613b1682615dc8565b61ffff16905250613bb39350505050565b600a851015613bb35782613b558660081460028b60c00151613b499190615c86565b61ffff16878c8c613e92565b613b77600160028c60a00151613b6b9190615c86565b61ffff16888d8d613e92565b604051602001613b899392919061492a565b60408051601f19818403018152919052608089018051919450613bab82615dc8565b61ffff169052505b80613bbd81615dc8565b915050613747565b5080613bd081615dc8565b915050613731565b5080604051602001613bea919061503e565b604051602081830303815290604052935050505092915050565b60006001600160e01b031982166380ac58cd60e01b1480613c3557506001600160e01b03198216635b5e139f60e01b145b806105ce57506301ffc9a760e01b6001600160e01b03198316146105ce565b6001600160a01b038316613caf57613caa81600980546000838152600a60205260408120829055600182018355919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0155565b613cd2565b816001600160a01b0316836001600160a01b031614613cd257613cd2838261415b565b6001600160a01b038216613ce957610a96816141f8565b826001600160a01b0316826001600160a01b031614610a9657610a9682826142d1565b6060613d1e6133d183600060ff612e23565b613d2e6133d18460006064612e23565b613d3e6133d18560286064612e23565b600a8610613d5b5760405180602001604052806000815250613d76565b604051806040016040528060018152602001600360fc1b8152505b613d7f87612abd565b604051602001613d9395949392919061554b565b604051602081830303815290604052905092915050565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091526000826040015185613de79190615cbb565b90506000836040015185613dfb9190615cbb565b90506040518060a001604052808361ffff1681526020018261ffff16815260200160028660400151613e2d9190615c86565b613e379085615c2c565b61ffff16815260200160028660400151613e519190615c86565b613e5b9084615c2c565b61ffff16815260200187866000015160ff1688613e789190615cbb565b613e829190615c2c565b61ffff1690529695505050505050565b6060613ea5846040015161ffff16612abd565b613eb6856060015161ffff16612abd565b613ebf87612abd565b613eca898688613f6c565b604051602001613edd9493929190615891565b604051602081830303815290604052905095945050505050565b6060613f1a613f07600287615ca7565b856040015161ffff166133d19190615d50565b613f3b613f28600288615ca7565b866060015161ffff166133d19190615d50565b613f4487612abd565b613f4d88612abd565b613f588a8789613f6c565b604051602001613edd959493929190615269565b60606000826101200151613f9c57604051806040016040528060048152602001630233030360e41b815250613fba565b6040518060400160405280600481526020016311b3333360e11b8152505b90508261016001516002811115613fe157634e487b7160e01b600052602160045260246000fd5b60011415801561402b5750826101600151600281111561401157634e487b7160e01b600052602160045260246000fd5b6002148061402b575060016140298560006005612e23565b105b15614069576101c08301516140438560006005612e23565b6005811061406157634e487b7160e01b600052603260045260246000fd5b602002015190505b84614096578060405160200161407f9190615220565b604051602081830303815290604052915050611ba8565b806040516020016140a79190615488565b6040516020818303038152906040529150509392505050565b60606140cb87612abd565b6140d487612abd565b6140dd87612abd565b6140e687612abd565b8686614101576040518060200160405280600081525061412b565b6040518060400160405280601081526020016f7374726f6b652d77696474683d27382760801b8152505b60405160200161414096959493929190615756565b60405160208183030381529060405290509695505050505050565b6000600161416884610fba565b6141729190615d50565b6000838152600860205260409020549091508082146141c5576001600160a01b03841660009081526007602090815260408083208584528252808320548484528184208190558352600890915290208190555b5060009182526008602090815260408084208490556001600160a01b039094168352600781528383209183525290812055565b60095460009061420a90600190615d50565b6000838152600a60205260408120546009805493945090928490811061424057634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050806009838154811061426f57634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255828152600a909152604080822084905585825281205560098054806142b557634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b60006142dc83610fba565b6001600160a01b039093166000908152600760209081526040808320868452825280832085905593825260089052919091209190915550565b82805461432190615d93565b90600052602060002090601f0160209004810192826143435760008555614389565b82601f1061435c57805160ff1916838001178555614389565b82800160010185558215614389579182015b8281111561438957825182559160200191906001019061436e565b506143959291506143c0565b5090565b6040518060a001604052806005905b60608152602001906001900390816143a85790505090565b5b8082111561439557600081556001016143c1565b60006143e86143e384615c04565b615baf565b90508281528383830111156143fc57600080fd5b828260208301376000602084830101529392505050565b600082601f830112614423578081fd5b611ba8838335602085016143d5565b600060208284031215614443578081fd5b8135611ba881615e5b565b60008060408385031215614460578081fd5b823561446b81615e5b565b9150602083013561447b81615e5b565b809150509250929050565b60008060006060848603121561449a578081fd5b83356144a581615e5b565b925060208401356144b581615e5b565b929592945050506040919091013590565b600080600080608085870312156144db578081fd5b84356144e681615e5b565b935060208501356144f681615e5b565b925060408501359150606085013567ffffffffffffffff811115614518578182fd5b8501601f81018713614528578182fd5b614537878235602084016143d5565b91505092959194509250565b60008060408385031215614555578182fd5b823561456081615e5b565b915060208381013567ffffffffffffffff81111561457c578283fd5b8401601f8101861361458c578283fd5b803561459a6143e382615be0565b80828252848201915084840189868560051b87010111156145b9578687fd5b8694505b838510156145db5780358352600194909401939185019185016145bd565b5080955050505050509250929050565b600080604083850312156145fd578182fd5b823561460881615e5b565b91506020830135801515811461447b578182fd5b6000806040838503121561462e578182fd5b823561463981615e5b565b946020939093013593505050565b60008060408385031215614659578182fd5b823567ffffffffffffffff81111561466f578283fd5b8301601f8101851361467f578283fd5b8035602061468f6143e383615be0565b80838252828201915082850189848660051b88010111156146ae578788fd5b8795505b848610156146d95780356146c581615e5b565b8352600195909501949183019183016146b2565b5098969091013596505050505050565b6000602082840312156146fa578081fd5b5035919050565b600060208284031215614712578081fd5b5051919050565b60006020828403121561472a578081fd5b8135611ba881615e70565b600060208284031215614746578081fd5b8151611ba881615e70565b600060208284031215614762578081fd5b8151611ba881615e5b565b60006020828403121561477e578081fd5b813567ffffffffffffffff811115614794578182fd5b610eeb84828501614413565b6000602082840312156147b1578081fd5b815167ffffffffffffffff8111156147c7578182fd5b8201601f810184136147d7578182fd5b80516147e56143e382615c04565b8181528560208385010111156147f9578384fd5b61480a826020830160208601615d67565b95945050505050565b60008060408385031215614825578182fd5b82359150602083013567ffffffffffffffff811115614842578182fd5b61484e85828601614413565b9150509250929050565b6000806040838503121561486a578182fd5b50508035926020909101359150565b6000815180845260208085019450808401835b838110156148a85781518752958201959082019060010161488c565b509495945050505050565b600081518084526148cb816020860160208601615d67565b601f01601f19169290920160200192915050565b600081516148f1818560208601615d67565b9290920192915050565b6000835161490d818460208801615d67565b835190830190614921818360208801615d67565b01949350505050565b6000845161493c818460208901615d67565b845190830190614950818360208901615d67565b8451910190614963818360208801615d67565b0195945050505050565b6000855161497f818460208a01615d67565b855190830190614993818360208a01615d67565b85519101906149a6818360208901615d67565b84519101906149b9818360208801615d67565b019695505050505050565b600082516149d6818460208701615d67565b7f2c226c6963656e7365223a2246756c6c206f776e6572736869702077697468209201918252507f756e6c696d6974656420636f6d6d65726369616c207269676874732e222c22636020820152743932b0ba37b9111d11203234b2bb30b9323ab6b81160591b60408201527f2c226465736372697074696f6e223a2247656e657369733a204120736565642c60558201526f081cdbdb59481b1bdd994b081d1a185d60821b607582015261277360f01b60858201527f616c6c2069742074616b65732e5c6e5c6e47656e65736973206973207468652060878201527f6669727374206f6620746865205b736f6c5d536565646c696e67732c20616e2060a78201527f6578706572696d656e74206f662061727420616e6420636f6c6c65637469626c60c78201527f65204e46547320313030252067656e657261746564207769746820536f6c696460e78201527f6974792e5c6e6279204064696576617264756d705c6e5c6e4c6963656e73653a6101078201527f2046756c6c206f776e657273686970207769746820756e6c696d6974656420636101278201527f6f6d6d65726369616c207269676874732e5c6e5c6e4d6f726520696e666f20616101478201527f742068747470733a2f2f736f6c536565646c696e67732e61727422000000000061016782015261018201919050565b60008651614bda818460208b01615d67565b80830190507f3c6c696e6561724772616469656e742069643d2767656e657369732d6772616481526469656e742d60d81b60208201528651614c23816025840160208b01615d67565b7f27206772616469656e745472616e73666f726d3d27726f746174652800000000602592909101918201528551614c61816041840160208a01615d67565b7f29273e3c73746f70206f66667365743d273025272073746f702d636f6c6f723d60419290910191820152602760f81b60618201528451614ca9816062840160208901615d67565b7f272f3e3c73746f70206f66667365743d2731303025272073746f702d636f6c6f6062929091019182015262723d2760e81b6082820152614d11614cf060858301866148df565b741390179f1e17b634b732b0b923b930b234b2b73a1f60591b815260150190565b98975050505050505050565b600086516020614d308285838c01615d67565b7f3c74657874207374796c653d27666f6e743a20626f6c6420313170782073616e9184019182527f732d73657269663b2720746578742d616e63686f723d27656e642720783d2700818301528751614d8e81603f85018b8501615d67565b642720793d2760d81b603f93909101928301528651614db38160448501848b01615d67565b602760f81b604493909101928301528551614dd48160458501848a01615d67565b613e2360f01b604593909101928301528451614df68160478501848901615d67565b614e28614e15604783860101661e17ba32bc3a1f60c91b815260070190565b661e17b9bb339f1160c91b815260070190565b9a9950505050505050505050565b60008851614e48818460208d01615d67565b7f2c2270726f70657274696573223a7b22436f6c6f7273223a22000000000000009083019081528851614e82816019840160208d01615d67565b6911161123b934b2111d1160b11b601992909101918201528751614ead816023840160208c01615d67565b6911161126b7b232911d1160b11b602392909101918201528651614ed881602d840160208b01615d67565b6e1116112932b73232b934b733911d1160891b602d92909101918201528551614f0881603c840160208a01615d67565b614f5a614f4c614f46614f39614f33603c868801016911161129b4bd32911d1160b11b8152600a0190565b8a6148df565b601160f91b815260010190565b876148df565b617d7d60f01b815260020190565b9b9a5050505050505050505050565b60008551614f7b818460208a01615d67565b6a01e3830ba3410321e93a6960ad1b9083019081528551614fa381600b840160208a01615d67565b6a010181026101810181018160ad1b600b92909101918201528451614fcf816016840160208901615d67565b75272066696c6c3d276e6f6e6527207374726f6b653d2760501b60169290910191820152835161500681602c840160208801615d67565b7f27207374726f6b652d77696474683d2734272f3e3c2f7061747465726e3e0000602c9290910191820152604a019695505050505050565b60008251615050818460208701615d67565b631e17b39f60e11b920191825250600401919050565b60008951615078818460208e01615d67565b80830190507f3c2f646566733e3c726563742077696474683d273130302527206865696768748152751e939898181293903334b6361e9391b333331390179f60511b602082015289516150d2816036840160208e01615d67565b683c7265637420783d2760b81b6036929091019182015288516150fc81603f840160208d01615d67565b642720793d2760d81b603f92909101918201528751615122816044840160208c01615d67565b68272077696474683d2760b81b60449290910191820152614f5a6151c36151bd6151a66151a061517761517161515b604d89018f6148df565b6927206865696768743d2760b01b8152600a0190565b8c6148df565b7f272066696c6c3d2775726c282367656e657369732d677269642d0000000000008152601a0190565b896148df565b6a2927207374726f6b653d2760a81b8152600b0190565b866148df565b74139039ba3937b5b296bbb4b23a341e939a1390179f60591b815260150190565b600083516151f6818460208801615d67565b601560f91b9083019081528351615214816001840160208801615d67565b01600101949350505050565b68207374726f6b653d2760b81b815260008251615244816009850160208701615d67565b6d013903334b6361e93b737b73293960951b6009939091019283015250601701919050565b683c7265637420783d2760b81b81526000865161528d816009850160208b01615d67565b642720793d2760d81b60099184019182015286516152b281600e840160208b01615d67565b68272077696474683d2760b81b600e929091019182015285516152dc816017840160208a01615d67565b6927206865696768743d2760b01b601792909101918201528451615307816021840160208901615d67565b602760f81b602192909101918201528351615329816022840160208801615d67565b61534060228284010161179f60f11b815260020190565b9998505050505050505050565b6c47656e657369732e736f6c202360981b81526000825161537581600d850160208701615d67565b91909101600d0192915050565b7f3c646566733e3c7061747465726e2069643d2767656e657369732d677269642d81526000602087516153ba81838601848c01615d67565b8084019050642720783d2760d81b8282015287516153de8160258401858c01615d67565b642720793d2760d81b60259290910191820152865161540381602a8401858b01615d67565b68272077696474683d2760b81b602a9290910191820152855161542c8160338401858a01615d67565b6927206865696768743d2760b01b60339290910191820152845161545681603d8401858901615d67565b614e28603d828401017f27207061747465726e556e6974733d277573657253706163654f6e557365273e815260200190565b662066696c6c3d2760c81b8152600082516154aa816007850160208701615d67565b6f0139039ba3937b5b29e93b737b73293960851b6007939091019283015250601701919050565b7f3c726563742077696474683d273130302527206865696768743d27313030252781527f2066696c6c3d2775726c282367656e657369732d6772616469656e742d00000060208201526000825161552f81603d850160208701615d67565b64149390179f60d91b603d939091019283015250604201919050565b640d0e6d8c2560db1b81526000865161556b816005850160208b01615d67565b600b60fa1b600591840191820152865161558c816006840160208b01615d67565b61094b60f21b6006929091019182015285516155af816008840160208a01615d67565b631296181760e11b6008929091019182015284516155d481600c840160208901615d67565b84519101906155ea81600c840160208801615d67565b602960f81b600c9290910191820152600d01979650505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b757466382c7b226e616d81526332911d1160e11b60208201526000845161564c816024850160208901615d67565b7f222c22696d616765223a22646174613a696d6167652f7376672b786d6c3b757460249184019182015262198e0b60ea1b60448201527f3c73766720786d6c6e733d27687474703a2f2f7777772e77332e6f72672f323060478201527f30302f7376672720786d6c6e733a786c696e6b3d27687474703a2f2f7777772e60678201527f77332e6f72672f313939392f786c696e6b272076696577426f783d273020302060878201527f313230302031323030272077696474683d273132303027206865696768743d2760a78201526518991818139f60d11b60c7820152845161573c8160cd840160208901615d67565b61574b60cd82840101866148df565b979650505050505050565b6a01e3830ba3410321e93a6960ad1b81526000875161577c81600b850160208c01615d67565b8083019050600160fd1b80600b830152885161579f81600c850160208d01615d67565b6201026160ed1b600c939091019283015287516157c381600f850160208c01615d67565b600f92019182015285516157de816010840160208a01615d67565b602760f81b601092909101918201528451615800816011840160208901615d67565b614e28615812601183850101876148df565b61179f60f11b815260020190565b7f7374796c653d2766696c7465723a2064726f702d736861646f772831367078208152690189b383c101918383c160b51b60208201526000825161586b81602a850160208701615d67565b6e2920696e7665727428383025293b2760881b602a939091019283015250603901919050565b6b3c636972636c652063783d2760a01b8152600085516158b881600c850160208a01615d67565b65272063793d2760d01b600c9184019182015285516158de816012840160208a01615d67565b642720723d2760d81b601292909101918201528451615904816017840160208901615d67565b602760f81b601792909101918201528351615926816018840160208801615d67565b61179f60f11b60189290910191820152601a019695505050505050565b6201e33960ed1b815260008451615961816003850160208901615d67565b7f207374726f6b652d77696474683d273427207374726f6b652d6c696e656361706003918401918201527f3d27726f756e6427207472616e73666f726d3d277472616e736c617465280000602382015284516159c4816041840160208901615d67565b600b60fa1b6041929091019182015283516159e6816042840160208801615d67565b6214939f60e91b6042929091019182015260450195945050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090615a36908301846148b3565b9695505050505050565b6001600160a01b0383168152604060208201819052600090610eeb90830184614879565b6020808252825182820181905260009190848201906040850190845b81811015615aa55783516001600160a01b031683529284019291840191600101615a80565b50909695505050505050565b602081526000611ba86020830184614879565b602081526000611ba860208301846148b3565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b604051601f8201601f1916810167ffffffffffffffff81118282101715615bd857615bd8615e45565b604052919050565b600067ffffffffffffffff821115615bfa57615bfa615e45565b5060051b60200190565b600067ffffffffffffffff821115615c1e57615c1e615e45565b50601f01601f191660200190565b600061ffff80831681851680830382111561492157614921615e19565b60008219821115615c5c57615c5c615e19565b500190565b600060ff821660ff84168060ff03821115615c7e57615c7e615e19565b019392505050565b600061ffff80841680615c9b57615c9b615e2f565b92169190910492915050565b600082615cb657615cb6615e2f565b500490565b600061ffff80831681851681830481118215151615615cdc57615cdc615e19565b02949350505050565b6000816000190483118215151615615cff57615cff615e19565b500290565b600060ff821660ff84168160ff0481118215151615615d2557615d25615e19565b029392505050565b600061ffff83811690831681811015615d4857615d48615e19565b039392505050565b600082821015615d6257615d62615e19565b500390565b60005b83811015615d82578181015183820152602001615d6a565b838111156117935750506000910152565b600181811c90821680615da757607f821691505b60208210811415610b0357634e487b7160e01b600052602260045260246000fd5b600061ffff80831681811415615de057615de0615e19565b6001019392505050565b6000600019821415615dfe57615dfe615e19565b5060010190565b600082615e1457615e14615e2f565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610c9357600080fd5b6001600160e01b031981168114610c9357600080fdfe3c726563742077696474683d273130302527206865696768743d2731303025272066696c6c3d272330303027202f3ea26469706673582212202fea4ac9474fec0db73fa174572e23f91dab9de4762ebf6159763c85a725611064736f6c6343000804003300000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c10000000000000000000000002b0f5a983316b4fc980500b3e973d58765770bd2000000000000000000000000e006b4f0f19ae4078dd02a1f8df7d256362c053b000000000000000000000000000000000000000000000000000000000000001c47656e657369732e736f6c202d205b736f6c5d536565646c696e677300000000000000000000000000000000000000000000000000000000000000000000000653534753233000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000047697066733a2f2f697066732f516d57513256324b69536a4451514a624b3468746b4152697742636d7456734761794e42717a57594b43486b74312f47656e657369732e6a736f6e00000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061025e5760003560e01c8063715018a611610146578063bc36ff81116100c3578063e53ecfc911610087578063e53ecfc914610570578063e8a3d48514610579578063e985e9c514610581578063f2fde38b14610594578063f84ddf0b146105a7578063fe55932a146105b057600080fd5b8063bc36ff8114610511578063bf40e75c14610524578063c7a53af014610537578063c87b56dd1461054a578063e3c629c01461055d57600080fd5b806395d89b411161010a57806395d89b41146104b0578063a22cb465146104b8578063a5004d98146104cb578063b88d4fde146104de578063b9c4d9fb146104f157600080fd5b8063715018a61461044e578063750af3ab1461045657806385745fd7146104795780638da5cb5b1461048c578063938e3d7b1461049d57600080fd5b80632f745c59116101df5780635a4c1624116101a35780635a4c1624146103dc5780636102de98146103ef5780636352211e146104025780636b8ff574146104155780636cc462f91461042857806370a082311461043b57600080fd5b80632f745c591461037d57806342842e0e1461039057806342966c68146103a35780634622ab03146103b65780634f6ccce7146103c957600080fd5b8063095ea7b311610226578063095ea7b3146102f35780630ebd4c7f1461030657806318160ddd1461032657806323b872dd146103385780632a55205a1461034b57600080fd5b806301ffc9a71461026357806304d884961461028b57806305d430db146102a057806306fdde03146102b3578063081812fc146102c8575b600080fd5b610276610271366004614719565b6105c3565b60405190151581526020015b60405180910390f35b61029e6102993660046146e9565b6105d4565b005b6102766102ae36600461476d565b610672565b6102bb61086b565b6040516102829190615ac4565b6102db6102d63660046146e9565b6108fd565b6040516001600160a01b039091168152602001610282565b61029e61030136600461461c565b610985565b6103196103143660046146e9565b610a9b565b6040516102829190615ab1565b6009545b604051908152602001610282565b61029e610346366004614486565b610b09565b61035e610359366004614858565b610b3b565b604080516001600160a01b039093168352602083019190915201610282565b61032a61038b36600461461c565b610b6b565b61029e61039e366004614486565b610c01565b61029e6103b13660046146e9565b610c1c565b6102bb6103c43660046146e9565b610c96565b61032a6103d73660046146e9565b610d30565b61032a6103ea3660046146e9565b610dd1565b6102766103fd36600461444e565b610e49565b6102db6104103660046146e9565b610ef3565b6102bb6104233660046146e9565b610f6a565b6013546102db906001600160a01b031681565b61032a610449366004614432565b610fba565b61029e611041565b6102766104643660046146e9565b60116020526000908152604090205460ff1681565b61029e610487366004614647565b611077565b6000546001600160a01b03166102db565b61029e6104ab36600461476d565b6115c8565b6102bb6115fb565b61029e6104c63660046145eb565b61160a565b61032a6104d9366004614543565b6116cf565b61029e6104ec3660046144c6565b611761565b6105046104ff3660046146e9565b611799565b6040516102829190615a64565b6102bb61051f3660046146e9565b611820565b61029e6105323660046146e9565b61182d565b600d546102db906001600160a01b031681565b6102bb6105583660046146e9565b611945565b6102bb61056b36600461476d565b6119ce565b61032a60145481565b6102bb611b8d565b61027661058f36600461444e565b611b9c565b61029e6105a2366004614432565b611baf565b61032a600e5481565b61029e6105be366004614813565b611c47565b60006105ce82611cf9565b92915050565b336105de82610ef3565b6001600160a01b03161461062c5760405162461bcd60e51b815260206004820152601060248201526f2737ba103a37b5b2b71037bbb732b91760811b60448201526064015b60405180910390fd5b600081815260126020526040808220805460ff1916600117905551339183917f8832fb65003c6ac4dc53a073ae148a6464e937eb2f153567f4aca8f1d431a7469190a350565b60008082905060018151101561068b5750600092915050565b60208151111561069e5750600092915050565b806000815181106106bf57634e487b7160e01b600052603260045260246000fd5b6020910101516001600160f81b031916600160fd1b14156106e35750600092915050565b80600182516106f29190615d50565b8151811061071057634e487b7160e01b600052603260045260246000fd5b6020910101516001600160f81b031916600160fd1b14156107345750600092915050565b6000806000805b845181101561085e5784818151811061076457634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b0319169250600160fd1b831480156107955750600160fd1b6001600160f81b03198516145b156107a7575060009695505050505050565b60f883901c9150606182108015906107c35750607a8260ff1611155b1580156107e5575060418260ff16101580156107e35750605a8260ff1611155b155b8015610806575060308260ff1610158015610804575060398260ff1611155b155b801561081657508160ff16602014155b801561082657508160ff16602c14155b801561083657508160ff16602d14155b15610848575060009695505050505050565b829350808061085690615dea565b91505061073b565b5060019695505050505050565b60606001805461087a90615d93565b80601f01602080910402602001604051908101604052809291908181526020018280546108a690615d93565b80156108f35780601f106108c8576101008083540402835291602001916108f3565b820191906000526020600020905b8154815290600101906020018083116108d657829003601f168201915b5050505050905090565b600061090882611d13565b6109695760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610623565b506000908152600560205260409020546001600160a01b031690565b600061099082610ef3565b9050806001600160a01b0316836001600160a01b031614156109fe5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610623565b336001600160a01b0382161480610a1a5750610a1a8133611b9c565b610a8c5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610623565b610a968383611d30565b505050565b60606000610aab83612710610b3b565b9150508015610b035760408051600180825281830190925290602080830190803683370190505091508082600081518110610af657634e487b7160e01b600052603260045260246000fd5b6020026020010181815250505b50919050565b610b14335b82611d9e565b610b305760405162461bcd60e51b815260040161062390615b5e565b610a96838383611e60565b600d546001600160a01b03166000612710610b5884610190615ce5565b610b629190615ca7565b90509250929050565b6000610b7683610fba565b8210610bd85760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610623565b506001600160a01b03919091166000908152600760209081526040808320938352929052205490565b610a9683838360405180602001604052806000815250611761565b610c2533610b0e565b610c8a5760405162461bcd60e51b815260206004820152603060248201527f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760448201526f1b995c881b9bdc88185c1c1c9bdd995960821b6064820152608401610623565b610c938161200b565b50565b60106020526000908152604090208054610caf90615d93565b80601f0160208091040260200160405190810160405280929190818152602001828054610cdb90615d93565b8015610d285780601f10610cfd57610100808354040283529160200191610d28565b820191906000526020600020905b815481529060010190602001808311610d0b57829003601f168201915b505050505081565b6000610d3b60095490565b8210610d9e5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610623565b60098281548110610dbf57634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b6000610ddc82611d13565b610e365760405162461bcd60e51b815260206004820152602560248201527f546f6b656e5365656420717565727920666f72206e6f6e6578697374656e74206044820152643a37b5b2b760d91b6064820152608401610623565b506000908152600f602052604090205490565b600c546000906001600160a01b03168015801590610eeb575060405163c455279160e01b81526001600160a01b038581166004830152808516919083169063c45527919060240160206040518083038186803b158015610ea857600080fd5b505afa158015610ebc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ee09190614751565b6001600160a01b0316145b949350505050565b6000818152600360205260408120546001600160a01b0316806105ce5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610623565b6060610f7582611d13565b610fb15760405162461bcd60e51b815260206004820152600d60248201526c2ab735b737bbb7103a37b5b2b760991b6044820152606401610623565b6105ce826120b2565b60006001600160a01b0382166110255760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610623565b506001600160a01b031660009081526004602052604090205490565b6000546001600160a01b0316331461106b5760405162461bcd60e51b815260040161062390615b29565b6110756000612189565b565b6000546001600160a01b03163314806110d55750815160011480156110d55750336001600160a01b0316826000815181106110c257634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b0316145b6111215760405162461bcd60e51b815260206004820152601760248201527f4e6f7420616c6c6f77656420746f206d6967726174652e0000000000000000006044820152606401610623565b6013546001600160a01b031630600080805b86518110801561114257508582105b156115bf5786818151811061116757634e487b7160e01b600052603260045260246000fd5b60209081029190910101516040516370a0823160e01b81526001600160a01b0380831660048301529194506000918716906370a082319060240160206040518083038186803b1580156111b957600080fd5b505afa1580156111cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111f19190614701565b9050806111fe57506115ad565b806112098489615d50565b82111561121d5761121a8489615d50565b90505b60008167ffffffffffffffff81111561124657634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561126f578160200160208202803683370190505b5090506000806000606060005b8681101561155f576001600160a01b038d16632f745c598c61129f846001615c49565b6112a9908c615d50565b6040516001600160e01b031960e085901b1681526001600160a01b039092166004830152602482015260440160206040518083038186803b1580156112ed57600080fd5b505afa158015611301573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113259190614701565b604051631693058960e21b8152600481018290529095506001600160a01b038e1690635a4c16249060240160206040518083038186803b15801561136857600080fd5b505afa15801561137c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113a09190614701565b604051631ae3fd5d60e21b8152600481018790529094506001600160a01b038e1690636b8ff5749060240160006040518083038186803b1580156113e357600080fd5b505afa1580156113f7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261141f91908101906147a0565b604051630852cd8d60e31b8152600481018790529092506001600160a01b038e16906342966c6890602401600060405180830381600087803b15801561146457600080fd5b505af1158015611478573d6000803e3d6000fd5b505050506114968b86604051806020016040528060008152506121d9565b6000858152600f602052604090208490558151158015906114bb57506114bb82610672565b15611521576114c9826119ce565b80516020918201206000818152601190925260409091205490935060ff16611521576000838152601160209081526040808320805460ff1916600117905587835260108252909120835161151f92850190614315565b505b8486828151811061154257634e487b7160e01b600052603260045260246000fd5b60209081029190910101528061155781615dea565b91505061127c565b5061156a868a615c49565b98507f3154c2f0b66caa898b6d93281a0d16bbeeba8ed9f6ad8fa7cd628f587173c9628a8660405161159d929190615a40565b60405180910390a1505050505050505b806115b781615dea565b915050611133565b50505050505050565b6000546001600160a01b031633146115f25760405162461bcd60e51b815260040161062390615b29565b610c938161220c565b60606002805461087a90615d93565b6001600160a01b0382163314156116635760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610623565b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600d546000906001600160a01b031633146117195760405162461bcd60e51b815260206004820152600a6024820152692737ba1029b7bbb2b91760b11b6044820152606401610623565b60405162461bcd60e51b815260206004820152601f60248201527f4e6f2064697265637420706c616e74696e672c206f6e6c79207265706f742e006044820152606401610623565b61176b3383611d9e565b6117875760405162461bcd60e51b815260040161062390615b5e565b6117938484848461221f565b50505050565b60606000806117aa84612710610b3b565b915091508060001461181957604080516001808252818301909252906020808301908036833701905050925081836000815181106117f857634e487b7160e01b600052603260045260246000fd5b60200260200101906001600160a01b031690816001600160a01b0316815250505b5050919050565b60606105ce600083612252565b600d546001600160a01b031633146118745760405162461bcd60e51b815260206004820152600a6024820152692737ba1029b7bbb2b91760b11b6044820152606401610623565b60008181526012602052604090205460ff1615156001146118cf5760405162461bcd60e51b81526020600482015260156024820152742737903932b8bab2b9ba103337b9103a37b5b2b71760591b6044820152606401610623565b6000818152601260209081526040808320805460ff19169055600f90915290205442446118fd600143615d50565b604080516020810195909552840192909252606083015240608082015260a00160408051601f1981840301815291815281516020928301206000938452600f90925290912055565b606061195082611d13565b6119b45760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610623565b6000828152600f60205260409020546105ce908390612252565b606060008290506000815167ffffffffffffffff8111156119ff57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611a29576020820181803683370190505b50905060008060005b8451811015611b8257848181518110611a5b57634e487b7160e01b600052603260045260246000fd5b016020015160f881901c93506001600160f81b031916915060308310801590611a88575060398360ff1611155b80611aa6575060618360ff1610158015611aa65750607a8360ff1611155b15611ae85781848281518110611acc57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350611b70565b60418360ff1610158015611b005750605a8360ff1611155b15611b3357611b10836020615c61565b60f81b848281518110611acc57634e487b7160e01b600052603260045260246000fd5b602d60f81b848281518110611b5857634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053505b80611b7a81615dea565b915050611a32565b509195945050505050565b6060600b805461087a90615d93565b6000611ba88383612845565b9392505050565b6000546001600160a01b03163314611bd95760405162461bcd60e51b815260040161062390615b29565b6001600160a01b038116611c3e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610623565b610c9381612189565b6014544211611c985760405162461bcd60e51b815260206004820152601860248201527f4e616d696e6720666561747572652064697361626c65642e00000000000000006044820152606401610623565b33611ca283610ef3565b6001600160a01b031614611ceb5760405162461bcd60e51b815260206004820152601060248201526f2737ba103a37b5b2b71037bbb732b91760811b6044820152606401610623565b611cf5828261288c565b5050565b6000611d0482612a57565b806105ce57506105ce82612a7c565b6000908152600360205260409020546001600160a01b0316151590565b600081815260056020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611d6582610ef3565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000611da982611d13565b611e0a5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610623565b6000611e1583610ef3565b9050806001600160a01b0316846001600160a01b03161480611e505750836001600160a01b0316611e45846108fd565b6001600160a01b0316145b80610eeb5750610eeb8185611b9c565b826001600160a01b0316611e7382610ef3565b6001600160a01b031614611edb5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610623565b6001600160a01b038216611f3d5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610623565b611f48838383612ab2565b611f53600082611d30565b6001600160a01b0383166000908152600460205260408120805460019290611f7c908490615d50565b90915550506001600160a01b0382166000908152600460205260408120805460019290611faa908490615c49565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600061201682610ef3565b905061202481600084612ab2565b61202f600083611d30565b6001600160a01b0381166000908152600460205260408120805460019290612058908490615d50565b909155505060008281526003602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b60008181526010602052604090208054606091906120cf90615d93565b80601f01602080910402602001604051908101604052809291908181526020018280546120fb90615d93565b80156121485780601f1061211d57610100808354040283529160200191612148565b820191906000526020600020905b81548152906001019060200180831161212b57829003601f168201915b505050505090508051600014156121845761216282612abd565b604051602001612172919061534d565b60405160208183030381529060405290505b919050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6121e38383612bd7565b6121f06000848484612d16565b610a965760405162461bcd60e51b815260040161062390615ad7565b8051611cf590600b906020840190614315565b61222a848484611e60565b61223684848484612d16565b6117935760405162461bcd60e51b815260040161062390615ad7565b604080518082019091528181526000602082018190526060919061227882826064612e23565b604080516101e08101825260088082526020820152608c918101919091526028606082015260006080820181905260a0820181905260c0820181905291925060e0810160036122c986856064612e23565b108152602001600a6122de8660006064612e23565b108152602001600a6122f38660006064612e23565b10815260200160016123088660006064612e23565b108152602001605084111561232e57605a841115612327576002612331565b6001612331565b60005b600281111561235057634e487b7160e01b600052602160045260246000fd5b81526020018781526020018660001c815260200161236d85612f2b565b81525090508060e0015180156123a75750600181610160015160028111156123a557634e487b7160e01b600052602160045260246000fd5b145b156123d2576040805180820190915260078152660467272847072760cb1b60208201526101c0820151525b6123df8360006010612e23565b9150600182101561240857600380825260208201526092604082015261017d6060820152612469565b600382101561242857600480825260208201526101406060820152612469565b6007821015612447576006808252602082015260b46060820152612469565b600b821015612469576007808252602082015260926040820152605960608201525b600a8160400151600261247c9190615cbb565b6124869190615c86565b61ffff1660a08201526040810151600a906124a2906006615cbb565b6124ac9190615c86565b61ffff1660c082015260006124c0876120b2565b6124ca8386613380565b6124d48487613675565b6040516020016124e693929190615607565b60405160208183030381529060405290508061251683606001516104b061250d9190615d2d565b61ffff16612abd565b61252b84606001516104c461250d9190615d2d565b84610120015161254a5760405180602001604052806000815250612570565b6040518060400160405280600c81526020016b2066696c6c3d27236666662760a01b8152505b6125798b612abd565b60405160200161258d959493929190614d1d565b6040516020818303038152906040529050806040516020016125af91906149c4565b60408051601f19818403018152919052905080600083610160015160028111156125e957634e487b7160e01b600052602160045260246000fd5b1461266d576001836101600151600281111561261557634e487b7160e01b600052602160045260246000fd5b14612642576040518060400160405280600a815260200169233ab6361031b7b637b960b11b81525061268b565b6040518060400160405280600d81526020016c426c61636b202620576869746560981b81525061268b565b604051806040016040528060048152602001634175746f60e01b8152505b8361010001516126b95760405180604001604052806006815260200165139bdc9b585b60d21b8152506126d8565b604051806040016040528060058152602001642232b3b2b760d91b8152505b8461012001516127055760405180604001604052806005815260200164131a59da1d60da1b815250612723565b604051806040016040528060048152602001634461726b60e01b8152505b8560e001516127505760405180604001604052806006815260200165139bdc9b585b60d21b81525061276f565b6040518060400160405280600581526020016411da1bdcdd60da1b8152505b865161277d9060ff16612abd565b61278d886020015160ff16612abd565b60405160200161279e9291906151e4565b60408051601f19818403018152919052875160208901516127bf9190615d04565b60ff16886080015161ffff16146127e55760405180602001604052806000815250612814565b6040518060400160405280601581526020017416112137b73ab9911d11233ab636102137b0b9321160591b8152505b60405160200161282a9796959493929190614e36565b60405160208183030381529060405294505050505092915050565b60006128518383610e49565b1561285e575060016105ce565b6001600160a01b0380841660009081526006602090815260408083209386168352929052205460ff16611ba8565b8051600090156129635761289f82610672565b15156001146128e05760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b2103730b6b29760991b6044820152606401610623565b6128e9826119ce565b80516020918201206000818152601190925260409091205490915060ff16156129495760405162461bcd60e51b81526020600482015260126024820152712730b6b29030b63932b0b23c903ab9b2b21760711b6044820152606401610623565b6000818152601160205260409020805460ff191660011790555b6000838152601060205260408120805461297c90615d93565b80601f01602080910402602001604051908101604052809291908181526020018280546129a890615d93565b80156129f55780601f106129ca576101008083540402835291602001916129f5565b820191906000526020600020905b8154815290600101906020018083116129d857829003601f168201915b50505050509050600081511115612a3157612a0f816119ce565b8051602091820120600081815260119092526040909120805460ff1916905591505b60008481526010602090815260409091208451612a5092860190614315565b5050505050565b60006001600160e01b0319821663780e9d6360e01b14806105ce57506105ce82613c04565b60006001600160e01b0319821663152a902d60e11b14806105ce57506001600160e01b03198216632dde656160e21b1492915050565b610a96838383613c54565b606081612ae15750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612b0b5780612af581615dea565b9150612b049050600a83615ca7565b9150612ae5565b60008167ffffffffffffffff811115612b3457634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612b5e576020820181803683370190505b5090505b8415610eeb57612b73600183615d50565b9150612b80600a86615e05565b612b8b906030615c49565b60f81b818381518110612bae57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350612bd0600a86615ca7565b9450612b62565b6001600160a01b038216612c2d5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610623565b612c3681611d13565b15612c835760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610623565b612c8f60008383612ab2565b6001600160a01b0382166000908152600460205260408120805460019290612cb8908490615c49565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001600160a01b0384163b15612e1857604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612d5a903390899088908890600401615a03565b602060405180830381600087803b158015612d7457600080fd5b505af1925050508015612da4575060408051601f3d908101601f19168201909252612da191810190614735565b60015b612dfe573d808015612dd2576040519150601f19603f3d011682016040523d82523d6000602084013e612dd7565b606091505b508051612df65760405162461bcd60e51b815260040161062390615ad7565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610eeb565b506001949350505050565b82516020840151600091908290612e3b906003615c49565b90506004600f620fffff861115612e5a57506018905062ffffff612eb0565b61ffff861115612e72575060149050620fffff612eb0565b610fff861115612e8957506010905061ffff612eb0565b60ff861115612e9f5750600c9050610fff612eb0565b600f861115612eb057506008905060ff5b612ebc82610100615d50565b831115612eef57604080516020810186905260009450016040516020818303038152906040528051906020012060001c93505b83831c818116612eff8989615d50565b612f099082615e05565b612f13908a615c49565b958a5250505050602090950194909452509192915050565b612f33614399565b6000612f4183826006612e23565b905080612ff65750506040805160e081018252600760a08201818152662346384231393560c81b60c0840152825282518084018452818152660234636373238360cc1b60208281019190915280840191909152835180850185528281526608d0cc0d90ce0d60ca1b81830152838501528351808501855282815266119b219aa11ba160c91b81830152606084015283518085019094529083526608cccd4d50cdd160ca1b908301526080810191909152919050565b80600114156130ad5750506040805160e081018252600760a082018181526611989b99a31aa360c91b60c0840152825282518084018452818152661199181b199ca160c91b6020828101919091528084019190915283518085018552828152662333434145413360c81b818301528385015283518085018552828152662346364435354360c81b81830152606084015283518085019094529083526611a2a21a9a99a160c91b908301526080810191909152919050565b80600214156131645750506040805160e081018252600760a08201818152662341373232364560c81b60c0840152825282518084018452818152662345433230343960c81b6020828101919091528084019190915283518085018552828152660468c646c8466760cb1b8183015283850152835180850185528281526611a31ba2211a2360c91b8183015260608401528351808501909452908352662332463935393960c81b908301526080810191909152919050565b806003141561321b5750506040805160e081018252600760a08201818152660467272847072760cb1b60c08401528252825180840184528181526611a322a1a2a0a160c91b6020828101919091528084019190915283518085018552828152662346463834374360c81b8183015283850152835180850185528281526611a29c1a209aa360c91b818301526060840152835180850190945290835266119920999b19a160c91b908301526080810191909152919050565b80600414156132d25750506040805160e081018252600760a082018181526608d1919051105160ca1b60c08401528252825180840184528181526611a3222323211b60c91b602082810191909152808401919091528351808501855282815266119ca1231b232360c91b8183015283850152835180850185528281526611a1222119232360c91b81830152606084015283518085019094529083526611a323219b232360c91b908301526080810191909152919050565b50506040805160e081018252600760a082018181526611a2a09b1c9c2160c91b60c0840152825282518084018452818152662343303532393960c81b602082810191909152808401919091528351808501855282815266046726e668282760cb1b81830152838501528351808501855282815266119b221919a11b60c91b8183015260608401528351808501909452908352662335373130383960c81b908301526080810191909152919050565b606060008361010001516133955760006133a6565b600284604001516133a69190615c86565b61ffff1690506133ba846101a00151612abd565b6133d682866060015161ffff166133d19190615c49565b612abd565b6133ed83876060015161ffff166133d19190615c49565b6133fe876040015161ffff16612abd565b61340f886040015161ffff16612abd565b604051602001613423959493929190615382565b604051602081830303815290604052915081613446856040015161ffff16612abd565b613457866040015161ffff16612abd565b86610120015161348357604051806040016040528060048152602001630233030360e41b8152506134a1565b6040518060400160405280600481526020016311b3333360e11b8152505b6040516020016134b49493929190614f69565b604051602081830303815290604052915083610120015161354157816134de856101a00151612abd565b6134ef6133d1866000610168612e23565b6135056134ff87600a602d612e23565b87613d0c565b61351b61351588600a602d612e23565b88613d0c565b60405160200161352f959493929190614bc8565b60405160208183030381529060405291505b8184610120015161357e5761355a856101a00151612abd565b60405160200161356a91906154d1565b604051602081830303815290604052613598565b6040518060600160405280602f8152602001615e87602f91395b6135a9866060015161ffff16612abd565b6135ba876060015161ffff16612abd565b6135da886060015160026135ce9190615cbb565b61250d906104b0615d2d565b6135ee896060015160026135ce9190615cbb565b6135fc8a6101a00151612abd565b8a610120015161362857604051806040016040528060048152602001630233030360e41b815250613646565b6040518060400160405280600481526020016311b3333360e11b8152505b60405160200161365d989796959493929190615066565b60405160208183030381529060405291505092915050565b6040805160a081018252600080825260208201819052918101829052606081810183905260808201839052919060008560e001516136c257604051806020016040528060008152506136e9565b6101c0860151516040516136d99190602001615820565b6040516020818303038152906040525b6136fa876060015161ffff16612abd565b61370b886060015161ffff16612abd565b60405160200161371d93929190615943565b604051602081830303815290604052905060005b866020015160ff168161ffff161015613bd85760005b875160ff1661ffff82161015613bc55761376281838a613daa565b9350613788600089610140015161377a57601061377d565b600a5b89919060ff16612e23565b94506001851161381757826137d886600014156137d060028c60a001516137af9190615c86565b61ffff1660028d60c001516137c49190615c86565b8c919061ffff16612e23565b878c8c613e92565b6040516020016137e99291906148fb565b60408051601f1981840301815291905260808901805191945061380b82615dc8565b61ffff16905250613bb3565b6003851161389b5760006138468960a0015161ffff168a60c0015161ffff168a612e239092919063ffffffff16565b90508361385a876005141583888d8d613ef7565b60405160200161386b9291906148fb565b60408051601f1981840301815291905260808a01805191955061388d82615dc8565b61ffff16905250613bb39050565b84600414156138e357826138bb60018a60a0015161ffff16878c8c613ef7565b6138d160008b60c0015161ffff16888d8d613ef7565b6040516020016137e99392919061492a565b84600514156139b357600060028960c001516138ff9190615c86565b61ffff169050600061391360008a8c613f6c565b90508461397183886040015161ffff1661392d9190615d50565b84896060015161ffff166139419190615d50565b858a6040015161ffff166139559190615c49565b868b6060015161ffff166139699190615c49565b8660006140c0565b6040516020016139829291906148fb565b60408051601f1981840301815291905260808b0180519196506139a482615dc8565b61ffff16905250613bb3915050565b60088511613b2757600060078610156139dc5760028960c001516139d79190615c86565b6139ed565b60028960a001516139ed9190615c86565b61ffff16905060078610156000613a05818b8d613f6c565b905060608860081415613a2b57613a2860008d60c0015161ffff168a8f8f613ef7565b90505b8681613a87868b6040015161ffff16613a449190615d50565b878c6060015161ffff16613a589190615d50565b888d6040015161ffff16613a6c9190615c49565b898e6060015161ffff16613a809190615c49565b888a6140c0565b613ae1878c6040015161ffff16613a9e9190615c49565b888d6060015161ffff16613ab29190615d50565b898e6040015161ffff16613ac69190615d50565b8a8f6060015161ffff16613ada9190615c49565b898b6140c0565b604051602001613af4949392919061496d565b60408051601f1981840301815291905260808d018051919850613b1682615dc8565b61ffff16905250613bb39350505050565b600a851015613bb35782613b558660081460028b60c00151613b499190615c86565b61ffff16878c8c613e92565b613b77600160028c60a00151613b6b9190615c86565b61ffff16888d8d613e92565b604051602001613b899392919061492a565b60408051601f19818403018152919052608089018051919450613bab82615dc8565b61ffff169052505b80613bbd81615dc8565b915050613747565b5080613bd081615dc8565b915050613731565b5080604051602001613bea919061503e565b604051602081830303815290604052935050505092915050565b60006001600160e01b031982166380ac58cd60e01b1480613c3557506001600160e01b03198216635b5e139f60e01b145b806105ce57506301ffc9a760e01b6001600160e01b03198316146105ce565b6001600160a01b038316613caf57613caa81600980546000838152600a60205260408120829055600182018355919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0155565b613cd2565b816001600160a01b0316836001600160a01b031614613cd257613cd2838261415b565b6001600160a01b038216613ce957610a96816141f8565b826001600160a01b0316826001600160a01b031614610a9657610a9682826142d1565b6060613d1e6133d183600060ff612e23565b613d2e6133d18460006064612e23565b613d3e6133d18560286064612e23565b600a8610613d5b5760405180602001604052806000815250613d76565b604051806040016040528060018152602001600360fc1b8152505b613d7f87612abd565b604051602001613d9395949392919061554b565b604051602081830303815290604052905092915050565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091526000826040015185613de79190615cbb565b90506000836040015185613dfb9190615cbb565b90506040518060a001604052808361ffff1681526020018261ffff16815260200160028660400151613e2d9190615c86565b613e379085615c2c565b61ffff16815260200160028660400151613e519190615c86565b613e5b9084615c2c565b61ffff16815260200187866000015160ff1688613e789190615cbb565b613e829190615c2c565b61ffff1690529695505050505050565b6060613ea5846040015161ffff16612abd565b613eb6856060015161ffff16612abd565b613ebf87612abd565b613eca898688613f6c565b604051602001613edd9493929190615891565b604051602081830303815290604052905095945050505050565b6060613f1a613f07600287615ca7565b856040015161ffff166133d19190615d50565b613f3b613f28600288615ca7565b866060015161ffff166133d19190615d50565b613f4487612abd565b613f4d88612abd565b613f588a8789613f6c565b604051602001613edd959493929190615269565b60606000826101200151613f9c57604051806040016040528060048152602001630233030360e41b815250613fba565b6040518060400160405280600481526020016311b3333360e11b8152505b90508261016001516002811115613fe157634e487b7160e01b600052602160045260246000fd5b60011415801561402b5750826101600151600281111561401157634e487b7160e01b600052602160045260246000fd5b6002148061402b575060016140298560006005612e23565b105b15614069576101c08301516140438560006005612e23565b6005811061406157634e487b7160e01b600052603260045260246000fd5b602002015190505b84614096578060405160200161407f9190615220565b604051602081830303815290604052915050611ba8565b806040516020016140a79190615488565b6040516020818303038152906040529150509392505050565b60606140cb87612abd565b6140d487612abd565b6140dd87612abd565b6140e687612abd565b8686614101576040518060200160405280600081525061412b565b6040518060400160405280601081526020016f7374726f6b652d77696474683d27382760801b8152505b60405160200161414096959493929190615756565b60405160208183030381529060405290509695505050505050565b6000600161416884610fba565b6141729190615d50565b6000838152600860205260409020549091508082146141c5576001600160a01b03841660009081526007602090815260408083208584528252808320548484528184208190558352600890915290208190555b5060009182526008602090815260408084208490556001600160a01b039094168352600781528383209183525290812055565b60095460009061420a90600190615d50565b6000838152600a60205260408120546009805493945090928490811061424057634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050806009838154811061426f57634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255828152600a909152604080822084905585825281205560098054806142b557634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b60006142dc83610fba565b6001600160a01b039093166000908152600760209081526040808320868452825280832085905593825260089052919091209190915550565b82805461432190615d93565b90600052602060002090601f0160209004810192826143435760008555614389565b82601f1061435c57805160ff1916838001178555614389565b82800160010185558215614389579182015b8281111561438957825182559160200191906001019061436e565b506143959291506143c0565b5090565b6040518060a001604052806005905b60608152602001906001900390816143a85790505090565b5b8082111561439557600081556001016143c1565b60006143e86143e384615c04565b615baf565b90508281528383830111156143fc57600080fd5b828260208301376000602084830101529392505050565b600082601f830112614423578081fd5b611ba8838335602085016143d5565b600060208284031215614443578081fd5b8135611ba881615e5b565b60008060408385031215614460578081fd5b823561446b81615e5b565b9150602083013561447b81615e5b565b809150509250929050565b60008060006060848603121561449a578081fd5b83356144a581615e5b565b925060208401356144b581615e5b565b929592945050506040919091013590565b600080600080608085870312156144db578081fd5b84356144e681615e5b565b935060208501356144f681615e5b565b925060408501359150606085013567ffffffffffffffff811115614518578182fd5b8501601f81018713614528578182fd5b614537878235602084016143d5565b91505092959194509250565b60008060408385031215614555578182fd5b823561456081615e5b565b915060208381013567ffffffffffffffff81111561457c578283fd5b8401601f8101861361458c578283fd5b803561459a6143e382615be0565b80828252848201915084840189868560051b87010111156145b9578687fd5b8694505b838510156145db5780358352600194909401939185019185016145bd565b5080955050505050509250929050565b600080604083850312156145fd578182fd5b823561460881615e5b565b91506020830135801515811461447b578182fd5b6000806040838503121561462e578182fd5b823561463981615e5b565b946020939093013593505050565b60008060408385031215614659578182fd5b823567ffffffffffffffff81111561466f578283fd5b8301601f8101851361467f578283fd5b8035602061468f6143e383615be0565b80838252828201915082850189848660051b88010111156146ae578788fd5b8795505b848610156146d95780356146c581615e5b565b8352600195909501949183019183016146b2565b5098969091013596505050505050565b6000602082840312156146fa578081fd5b5035919050565b600060208284031215614712578081fd5b5051919050565b60006020828403121561472a578081fd5b8135611ba881615e70565b600060208284031215614746578081fd5b8151611ba881615e70565b600060208284031215614762578081fd5b8151611ba881615e5b565b60006020828403121561477e578081fd5b813567ffffffffffffffff811115614794578182fd5b610eeb84828501614413565b6000602082840312156147b1578081fd5b815167ffffffffffffffff8111156147c7578182fd5b8201601f810184136147d7578182fd5b80516147e56143e382615c04565b8181528560208385010111156147f9578384fd5b61480a826020830160208601615d67565b95945050505050565b60008060408385031215614825578182fd5b82359150602083013567ffffffffffffffff811115614842578182fd5b61484e85828601614413565b9150509250929050565b6000806040838503121561486a578182fd5b50508035926020909101359150565b6000815180845260208085019450808401835b838110156148a85781518752958201959082019060010161488c565b509495945050505050565b600081518084526148cb816020860160208601615d67565b601f01601f19169290920160200192915050565b600081516148f1818560208601615d67565b9290920192915050565b6000835161490d818460208801615d67565b835190830190614921818360208801615d67565b01949350505050565b6000845161493c818460208901615d67565b845190830190614950818360208901615d67565b8451910190614963818360208801615d67565b0195945050505050565b6000855161497f818460208a01615d67565b855190830190614993818360208a01615d67565b85519101906149a6818360208901615d67565b84519101906149b9818360208801615d67565b019695505050505050565b600082516149d6818460208701615d67565b7f2c226c6963656e7365223a2246756c6c206f776e6572736869702077697468209201918252507f756e6c696d6974656420636f6d6d65726369616c207269676874732e222c22636020820152743932b0ba37b9111d11203234b2bb30b9323ab6b81160591b60408201527f2c226465736372697074696f6e223a2247656e657369733a204120736565642c60558201526f081cdbdb59481b1bdd994b081d1a185d60821b607582015261277360f01b60858201527f616c6c2069742074616b65732e5c6e5c6e47656e65736973206973207468652060878201527f6669727374206f6620746865205b736f6c5d536565646c696e67732c20616e2060a78201527f6578706572696d656e74206f662061727420616e6420636f6c6c65637469626c60c78201527f65204e46547320313030252067656e657261746564207769746820536f6c696460e78201527f6974792e5c6e6279204064696576617264756d705c6e5c6e4c6963656e73653a6101078201527f2046756c6c206f776e657273686970207769746820756e6c696d6974656420636101278201527f6f6d6d65726369616c207269676874732e5c6e5c6e4d6f726520696e666f20616101478201527f742068747470733a2f2f736f6c536565646c696e67732e61727422000000000061016782015261018201919050565b60008651614bda818460208b01615d67565b80830190507f3c6c696e6561724772616469656e742069643d2767656e657369732d6772616481526469656e742d60d81b60208201528651614c23816025840160208b01615d67565b7f27206772616469656e745472616e73666f726d3d27726f746174652800000000602592909101918201528551614c61816041840160208a01615d67565b7f29273e3c73746f70206f66667365743d273025272073746f702d636f6c6f723d60419290910191820152602760f81b60618201528451614ca9816062840160208901615d67565b7f272f3e3c73746f70206f66667365743d2731303025272073746f702d636f6c6f6062929091019182015262723d2760e81b6082820152614d11614cf060858301866148df565b741390179f1e17b634b732b0b923b930b234b2b73a1f60591b815260150190565b98975050505050505050565b600086516020614d308285838c01615d67565b7f3c74657874207374796c653d27666f6e743a20626f6c6420313170782073616e9184019182527f732d73657269663b2720746578742d616e63686f723d27656e642720783d2700818301528751614d8e81603f85018b8501615d67565b642720793d2760d81b603f93909101928301528651614db38160448501848b01615d67565b602760f81b604493909101928301528551614dd48160458501848a01615d67565b613e2360f01b604593909101928301528451614df68160478501848901615d67565b614e28614e15604783860101661e17ba32bc3a1f60c91b815260070190565b661e17b9bb339f1160c91b815260070190565b9a9950505050505050505050565b60008851614e48818460208d01615d67565b7f2c2270726f70657274696573223a7b22436f6c6f7273223a22000000000000009083019081528851614e82816019840160208d01615d67565b6911161123b934b2111d1160b11b601992909101918201528751614ead816023840160208c01615d67565b6911161126b7b232911d1160b11b602392909101918201528651614ed881602d840160208b01615d67565b6e1116112932b73232b934b733911d1160891b602d92909101918201528551614f0881603c840160208a01615d67565b614f5a614f4c614f46614f39614f33603c868801016911161129b4bd32911d1160b11b8152600a0190565b8a6148df565b601160f91b815260010190565b876148df565b617d7d60f01b815260020190565b9b9a5050505050505050505050565b60008551614f7b818460208a01615d67565b6a01e3830ba3410321e93a6960ad1b9083019081528551614fa381600b840160208a01615d67565b6a010181026101810181018160ad1b600b92909101918201528451614fcf816016840160208901615d67565b75272066696c6c3d276e6f6e6527207374726f6b653d2760501b60169290910191820152835161500681602c840160208801615d67565b7f27207374726f6b652d77696474683d2734272f3e3c2f7061747465726e3e0000602c9290910191820152604a019695505050505050565b60008251615050818460208701615d67565b631e17b39f60e11b920191825250600401919050565b60008951615078818460208e01615d67565b80830190507f3c2f646566733e3c726563742077696474683d273130302527206865696768748152751e939898181293903334b6361e9391b333331390179f60511b602082015289516150d2816036840160208e01615d67565b683c7265637420783d2760b81b6036929091019182015288516150fc81603f840160208d01615d67565b642720793d2760d81b603f92909101918201528751615122816044840160208c01615d67565b68272077696474683d2760b81b60449290910191820152614f5a6151c36151bd6151a66151a061517761517161515b604d89018f6148df565b6927206865696768743d2760b01b8152600a0190565b8c6148df565b7f272066696c6c3d2775726c282367656e657369732d677269642d0000000000008152601a0190565b896148df565b6a2927207374726f6b653d2760a81b8152600b0190565b866148df565b74139039ba3937b5b296bbb4b23a341e939a1390179f60591b815260150190565b600083516151f6818460208801615d67565b601560f91b9083019081528351615214816001840160208801615d67565b01600101949350505050565b68207374726f6b653d2760b81b815260008251615244816009850160208701615d67565b6d013903334b6361e93b737b73293960951b6009939091019283015250601701919050565b683c7265637420783d2760b81b81526000865161528d816009850160208b01615d67565b642720793d2760d81b60099184019182015286516152b281600e840160208b01615d67565b68272077696474683d2760b81b600e929091019182015285516152dc816017840160208a01615d67565b6927206865696768743d2760b01b601792909101918201528451615307816021840160208901615d67565b602760f81b602192909101918201528351615329816022840160208801615d67565b61534060228284010161179f60f11b815260020190565b9998505050505050505050565b6c47656e657369732e736f6c202360981b81526000825161537581600d850160208701615d67565b91909101600d0192915050565b7f3c646566733e3c7061747465726e2069643d2767656e657369732d677269642d81526000602087516153ba81838601848c01615d67565b8084019050642720783d2760d81b8282015287516153de8160258401858c01615d67565b642720793d2760d81b60259290910191820152865161540381602a8401858b01615d67565b68272077696474683d2760b81b602a9290910191820152855161542c8160338401858a01615d67565b6927206865696768743d2760b01b60339290910191820152845161545681603d8401858901615d67565b614e28603d828401017f27207061747465726e556e6974733d277573657253706163654f6e557365273e815260200190565b662066696c6c3d2760c81b8152600082516154aa816007850160208701615d67565b6f0139039ba3937b5b29e93b737b73293960851b6007939091019283015250601701919050565b7f3c726563742077696474683d273130302527206865696768743d27313030252781527f2066696c6c3d2775726c282367656e657369732d6772616469656e742d00000060208201526000825161552f81603d850160208701615d67565b64149390179f60d91b603d939091019283015250604201919050565b640d0e6d8c2560db1b81526000865161556b816005850160208b01615d67565b600b60fa1b600591840191820152865161558c816006840160208b01615d67565b61094b60f21b6006929091019182015285516155af816008840160208a01615d67565b631296181760e11b6008929091019182015284516155d481600c840160208901615d67565b84519101906155ea81600c840160208801615d67565b602960f81b600c9290910191820152600d01979650505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b757466382c7b226e616d81526332911d1160e11b60208201526000845161564c816024850160208901615d67565b7f222c22696d616765223a22646174613a696d6167652f7376672b786d6c3b757460249184019182015262198e0b60ea1b60448201527f3c73766720786d6c6e733d27687474703a2f2f7777772e77332e6f72672f323060478201527f30302f7376672720786d6c6e733a786c696e6b3d27687474703a2f2f7777772e60678201527f77332e6f72672f313939392f786c696e6b272076696577426f783d273020302060878201527f313230302031323030272077696474683d273132303027206865696768743d2760a78201526518991818139f60d11b60c7820152845161573c8160cd840160208901615d67565b61574b60cd82840101866148df565b979650505050505050565b6a01e3830ba3410321e93a6960ad1b81526000875161577c81600b850160208c01615d67565b8083019050600160fd1b80600b830152885161579f81600c850160208d01615d67565b6201026160ed1b600c939091019283015287516157c381600f850160208c01615d67565b600f92019182015285516157de816010840160208a01615d67565b602760f81b601092909101918201528451615800816011840160208901615d67565b614e28615812601183850101876148df565b61179f60f11b815260020190565b7f7374796c653d2766696c7465723a2064726f702d736861646f772831367078208152690189b383c101918383c160b51b60208201526000825161586b81602a850160208701615d67565b6e2920696e7665727428383025293b2760881b602a939091019283015250603901919050565b6b3c636972636c652063783d2760a01b8152600085516158b881600c850160208a01615d67565b65272063793d2760d01b600c9184019182015285516158de816012840160208a01615d67565b642720723d2760d81b601292909101918201528451615904816017840160208901615d67565b602760f81b601792909101918201528351615926816018840160208801615d67565b61179f60f11b60189290910191820152601a019695505050505050565b6201e33960ed1b815260008451615961816003850160208901615d67565b7f207374726f6b652d77696474683d273427207374726f6b652d6c696e656361706003918401918201527f3d27726f756e6427207472616e73666f726d3d277472616e736c617465280000602382015284516159c4816041840160208901615d67565b600b60fa1b6041929091019182015283516159e6816042840160208801615d67565b6214939f60e91b6042929091019182015260450195945050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090615a36908301846148b3565b9695505050505050565b6001600160a01b0383168152604060208201819052600090610eeb90830184614879565b6020808252825182820181905260009190848201906040850190845b81811015615aa55783516001600160a01b031683529284019291840191600101615a80565b50909695505050505050565b602081526000611ba86020830184614879565b602081526000611ba860208301846148b3565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b604051601f8201601f1916810167ffffffffffffffff81118282101715615bd857615bd8615e45565b604052919050565b600067ffffffffffffffff821115615bfa57615bfa615e45565b5060051b60200190565b600067ffffffffffffffff821115615c1e57615c1e615e45565b50601f01601f191660200190565b600061ffff80831681851680830382111561492157614921615e19565b60008219821115615c5c57615c5c615e19565b500190565b600060ff821660ff84168060ff03821115615c7e57615c7e615e19565b019392505050565b600061ffff80841680615c9b57615c9b615e2f565b92169190910492915050565b600082615cb657615cb6615e2f565b500490565b600061ffff80831681851681830481118215151615615cdc57615cdc615e19565b02949350505050565b6000816000190483118215151615615cff57615cff615e19565b500290565b600060ff821660ff84168160ff0481118215151615615d2557615d25615e19565b029392505050565b600061ffff83811690831681811015615d4857615d48615e19565b039392505050565b600082821015615d6257615d62615e19565b500390565b60005b83811015615d82578181015183820152602001615d6a565b838111156117935750506000910152565b600181811c90821680615da757607f821691505b60208210811415610b0357634e487b7160e01b600052602260045260246000fd5b600061ffff80831681811415615de057615de0615e19565b6001019392505050565b6000600019821415615dfe57615dfe615e19565b5060010190565b600082615e1457615e14615e2f565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610c9357600080fd5b6001600160e01b031981168114610c9357600080fdfe3c726563742077696474683d273130302527206865696768743d2731303025272066696c6c3d272330303027202f3ea26469706673582212202fea4ac9474fec0db73fa174572e23f91dab9de4762ebf6159763c85a725611064736f6c63430008040033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c10000000000000000000000002b0f5a983316b4fc980500b3e973d58765770bd2000000000000000000000000e006b4f0f19ae4078dd02a1f8df7d256362c053b000000000000000000000000000000000000000000000000000000000000001c47656e657369732e736f6c202d205b736f6c5d536565646c696e677300000000000000000000000000000000000000000000000000000000000000000000000653534753233000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000047697066733a2f2f697066732f516d57513256324b69536a4451514a624b3468746b4152697742636d7456734761794e42717a57594b43486b74312f47656e657369732e6a736f6e00000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : name_ (string): Genesis.sol - [sol]Seedlings
Arg [1] : symbol_ (string): SSGS#0
Arg [2] : contractURI_ (string): ipfs://ipfs/QmWQ2V2KiSjDQQJbK4htkARiwBcmtVsGayNBqzWYKCHkt1/Genesis.json
Arg [3] : openseaProxyRegistry_ (address): 0xa5409ec958C83C3f309868babACA7c86DCB077c1
Arg [4] : sower_ (address): 0x2B0F5A983316b4Fc980500b3e973D58765770BD2
Arg [5] : oldContract_ (address): 0xe006B4f0f19Ae4078DD02a1F8Df7D256362C053b
-----Encoded View---------------
14 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [3] : 000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1
Arg [4] : 0000000000000000000000002b0f5a983316b4fc980500b3e973d58765770bd2
Arg [5] : 000000000000000000000000e006b4f0f19ae4078dd02a1f8df7d256362c053b
Arg [6] : 000000000000000000000000000000000000000000000000000000000000001c
Arg [7] : 47656e657369732e736f6c202d205b736f6c5d536565646c696e677300000000
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [9] : 5353475323300000000000000000000000000000000000000000000000000000
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000047
Arg [11] : 697066733a2f2f697066732f516d57513256324b69536a4451514a624b346874
Arg [12] : 6b4152697742636d7456734761794e42717a57594b43486b74312f47656e6573
Arg [13] : 69732e6a736f6e00000000000000000000000000000000000000000000000000
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.