Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Multichain Info
No addresses found
Latest 25 from a total of 490 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Set Approval For... | 21813435 | 64 days ago | IN | 0 ETH | 0.00003131 | ||||
Set Approval For... | 21813432 | 64 days ago | IN | 0 ETH | 0.00006126 | ||||
Set Approval For... | 18939988 | 466 days ago | IN | 0 ETH | 0.00040481 | ||||
Set Approval For... | 18848705 | 479 days ago | IN | 0 ETH | 0.00069666 | ||||
Set Approval For... | 18800180 | 485 days ago | IN | 0 ETH | 0.00108422 | ||||
Set Approval For... | 18480949 | 530 days ago | IN | 0 ETH | 0.00067958 | ||||
Set Approval For... | 17014687 | 736 days ago | IN | 0 ETH | 0.00046037 | ||||
Set Approval For... | 15992648 | 879 days ago | IN | 0 ETH | 0.00035105 | ||||
Set Approval For... | 15897416 | 893 days ago | IN | 0 ETH | 0.00081877 | ||||
Set Approval For... | 15700524 | 920 days ago | IN | 0 ETH | 0.00011618 | ||||
Safe Transfer Fr... | 15452097 | 957 days ago | IN | 0 ETH | 0.00101863 | ||||
Set Approval For... | 14244278 | 1149 days ago | IN | 0 ETH | 0.00189673 | ||||
Set Approval For... | 14241775 | 1150 days ago | IN | 0 ETH | 0.00113512 | ||||
Set Approval For... | 14240420 | 1150 days ago | IN | 0 ETH | 0.00119912 | ||||
Set Approval For... | 14172347 | 1161 days ago | IN | 0 ETH | 0.00342727 | ||||
Set Approval For... | 14172307 | 1161 days ago | IN | 0 ETH | 0.00346091 | ||||
Transfer From | 14172299 | 1161 days ago | IN | 0 ETH | 0.00543374 | ||||
Transfer From | 14172299 | 1161 days ago | IN | 0 ETH | 0.00543374 | ||||
Set Approval For... | 14159996 | 1163 days ago | IN | 0 ETH | 0.00399745 | ||||
Set Approval For... | 13979106 | 1190 days ago | IN | 0 ETH | 0.01639828 | ||||
Set Approval For... | 13850682 | 1210 days ago | IN | 0 ETH | 0.00176589 | ||||
Set Approval For... | 13197571 | 1313 days ago | IN | 0 ETH | 0.00310168 | ||||
Set Approval For... | 13139632 | 1322 days ago | IN | 0 ETH | 0.00194037 | ||||
Set Approval For... | 13136369 | 1322 days ago | IN | 0 ETH | 0.00790063 | ||||
Set Approval For... | 13118738 | 1325 days ago | IN | 0 ETH | 0.00247417 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
Genesis
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 '../Variety.sol'; import '../../Randomize.sol'; /// @title Genesis /// @author Simon Fremaux (@dievardump) contract Genesis is Variety { 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 constructor( string memory name_, string memory symbol_, string memory contractURI_, address openseaProxyRegistry_, address sower_ ) Variety(name_, symbol_, contractURI_, openseaProxyRegistry_, sower_) {} /// @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 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 { 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), '"}' ) ); } }
{ "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
Contract ABI
API[{"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"}],"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":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":[{"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":"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":"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":"to","type":"address"},{"internalType":"bytes32[]","name":"seeds","type":"bytes32[]"}],"name":"plant","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","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":"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":[],"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
60806040523480156200001157600080fd5b5060405162005784380380620057848339810160408190526200003491620002cc565b84848484848484848483836200004a33620000ed565b81516200005f90600190602085019062000156565b5080516200007590600290602084019062000156565b505082511590506200008c576200008c826200013d565b6001600160a01b03811615620000b857600c80546001600160a01b0319166001600160a01b0383161790555b5050600d80546001600160a01b0319166001600160a01b03949094169390931790925550620003d29950505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516200015290600b90602084019062000156565b5050565b82805462000164906200037f565b90600052602060002090601f016020900481019282620001885760008555620001d3565b82601f10620001a357805160ff1916838001178555620001d3565b82800160010185558215620001d3579182015b82811115620001d3578251825591602001919060010190620001b6565b50620001e1929150620001e5565b5090565b5b80821115620001e15760008155600101620001e6565b80516001600160a01b03811681146200021457600080fd5b919050565b600082601f8301126200022a578081fd5b81516001600160401b0380821115620002475762000247620003bc565b604051601f8301601f19908116603f01168101908282118183101715620002725762000272620003bc565b816040528381526020925086838588010111156200028e578485fd5b8491505b83821015620002b1578582018301518183018401529082019062000292565b83821115620002c257848385830101525b9695505050505050565b600080600080600060a08688031215620002e4578081fd5b85516001600160401b0380821115620002fb578283fd5b6200030989838a0162000219565b965060208801519150808211156200031f578283fd5b6200032d89838a0162000219565b9550604088015191508082111562000343578283fd5b50620003528882890162000219565b9350506200036360608701620001fc565b91506200037360808701620001fc565b90509295509295909350565b600181811c908216806200039457607f821691505b60208210811415620003b657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b6153a280620003e26000396000f3fe608060405234801561001057600080fd5b50600436106102275760003560e01c806370a0823111610130578063b9c4d9fb116100b8578063e8a3d4851161007c578063e8a3d485146104ed578063e985e9c5146104f5578063f2fde38b14610508578063f84ddf0b1461051b578063fe55932a1461052457600080fd5b8063b9c4d9fb14610481578063bc36ff81146104a1578063bf40e75c146104b4578063c7a53af0146104c7578063c87b56dd146104da57600080fd5b8063938e3d7b116100ff578063938e3d7b1461042d57806395d89b4114610440578063a22cb46514610448578063a5004d981461045b578063b88d4fde1461046e57600080fd5b806370a08231146103de578063715018a6146103f1578063750af3ab146103f95780638da5cb5b1461041c57600080fd5b80632f745c59116101b35780634f6ccce7116101825780634f6ccce71461037f5780635a4c1624146103925780636102de98146103a55780636352211e146103b85780636b8ff574146103cb57600080fd5b80632f745c591461033357806342842e0e1461034657806342966c68146103595780634622ab031461036c57600080fd5b8063095ea7b3116101fa578063095ea7b3146102a95780630ebd4c7f146102bc57806318160ddd146102dc57806323b872dd146102ee5780632a55205a1461030157600080fd5b806301ffc9a71461022c57806304d884961461025457806306fdde0314610269578063081812fc1461027e575b600080fd5b61023f61023a366004613cd1565b610537565b60405190151581526020015b60405180910390f35b610267610262366004613cb9565b610548565b005b6102716105e6565b60405161024b9190614fec565b61029161028c366004613cb9565b610678565b6040516001600160a01b03909116815260200161024b565b6102676102b7366004613c8e565b610700565b6102cf6102ca366004613cb9565b610816565b60405161024b9190614fb4565b6009545b60405190815260200161024b565b6102676102fc366004613ae3565b610884565b61031461030f366004613d9d565b6108b6565b604080516001600160a01b03909316835260208301919091520161024b565b6102e0610341366004613c8e565b6108e6565b610267610354366004613ae3565b61097c565b610267610367366004613cb9565b610997565b61027161037a366004613cb9565b610a11565b6102e061038d366004613cb9565b610aab565b6102e06103a0366004613cb9565b610b4c565b61023f6103b3366004613aab565b610bc4565b6102916103c6366004613cb9565b610c6e565b6102716103d9366004613cb9565b610ce5565b6102e06103ec366004613a8f565b610d35565b610267610dbc565b61023f610407366004613cb9565b60116020526000908152604090205460ff1681565b6000546001600160a01b0316610291565b61026761043b366004613d25565b610df2565b610271610e25565b610267610456366004613c5d565b610e34565b6102e0610469366004613ba0565b610ef9565b61026761047c366004613b23565b610fc4565b61049461048f366004613cb9565b610ffc565b60405161024b9190614f67565b6102716104af366004613cb9565b611083565b6102676104c2366004613cb9565b611090565b600d54610291906001600160a01b031681565b6102716104e8366004613cb9565b6111a8565b610271611231565b61023f610503366004613aab565b611240565b610267610516366004613a8f565b611253565b6102e0600e5481565b610267610532366004613d58565b6112eb565b6000610542826114e9565b92915050565b3361055282610c6e565b6001600160a01b0316146105a05760405162461bcd60e51b815260206004820152601060248201526f2737ba103a37b5b2b71037bbb732b91760811b60448201526064015b60405180910390fd5b600081815260126020526040808220805460ff1916600117905551339183917f8832fb65003c6ac4dc53a073ae148a6464e937eb2f153567f4aca8f1d431a7469190a350565b6060600180546105f59061524a565b80601f01602080910402602001604051908101604052809291908181526020018280546106219061524a565b801561066e5780601f106106435761010080835404028352916020019161066e565b820191906000526020600020905b81548152906001019060200180831161065157829003601f168201915b5050505050905090565b600061068382611503565b6106e45760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610597565b506000908152600560205260409020546001600160a01b031690565b600061070b82610c6e565b9050806001600160a01b0316836001600160a01b031614156107795760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610597565b336001600160a01b038216148061079557506107958133611240565b6108075760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610597565b6108118383611520565b505050565b60606000610826836127106108b6565b915050801561087e576040805160018082528183019092529060208083019080368337019050509150808260008151811061087157634e487b7160e01b600052603260045260246000fd5b6020026020010181815250505b50919050565b61088f335b8261158e565b6108ab5760405162461bcd60e51b815260040161059790615086565b610811838383611650565b600d546001600160a01b031660006127106108d38461019061519c565b6108dd919061515e565b90509250929050565b60006108f183610d35565b82106109535760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610597565b506001600160a01b03919091166000908152600760209081526040808320938352929052205490565b61081183838360405180602001604052806000815250610fc4565b6109a033610889565b610a055760405162461bcd60e51b815260206004820152603060248201527f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760448201526f1b995c881b9bdc88185c1c1c9bdd995960821b6064820152608401610597565b610a0e816117fb565b50565b60106020526000908152604090208054610a2a9061524a565b80601f0160208091040260200160405190810160405280929190818152602001828054610a569061524a565b8015610aa35780601f10610a7857610100808354040283529160200191610aa3565b820191906000526020600020905b815481529060010190602001808311610a8657829003601f168201915b505050505081565b6000610ab660095490565b8210610b195760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610597565b60098281548110610b3a57634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b6000610b5782611503565b610bb15760405162461bcd60e51b815260206004820152602560248201527f546f6b656e5365656420717565727920666f72206e6f6e6578697374656e74206044820152643a37b5b2b760d91b6064820152608401610597565b506000908152600f602052604090205490565b600c546000906001600160a01b03168015801590610c66575060405163c455279160e01b81526001600160a01b038581166004830152808516919083169063c45527919060240160206040518083038186803b158015610c2357600080fd5b505afa158015610c37573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c5b9190613d09565b6001600160a01b0316145b949350505050565b6000818152600360205260408120546001600160a01b0316806105425760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610597565b6060610cf082611503565b610d2c5760405162461bcd60e51b815260206004820152600d60248201526c2ab735b737bbb7103a37b5b2b760991b6044820152606401610597565b610542826118a2565b60006001600160a01b038216610da05760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610597565b506001600160a01b031660009081526004602052604090205490565b6000546001600160a01b03163314610de65760405162461bcd60e51b815260040161059790615051565b610df06000611979565b565b6000546001600160a01b03163314610e1c5760405162461bcd60e51b815260040161059790615051565b610a0e816119c9565b6060600280546105f59061524a565b6001600160a01b038216331415610e8d5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610597565b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600d546000906001600160a01b03163314610f435760405162461bcd60e51b815260206004820152600a6024820152692737ba1029b7bbb2b91760b11b6044820152606401610597565b600e5460005b8351811015610fb75781610f5c816152a1565b925050610f6985836119e0565b838181518110610f8957634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516000848152600f90925260409091205580610faf816152a1565b915050610f49565b50600e8190559392505050565b610fce338361158e565b610fea5760405162461bcd60e51b815260040161059790615086565b610ff6848484846119fa565b50505050565b606060008061100d846127106108b6565b915091508060001461107c576040805160018082528183019092529060208083019080368337019050509250818360008151811061105b57634e487b7160e01b600052603260045260246000fd5b60200260200101906001600160a01b031690816001600160a01b0316815250505b5050919050565b6060610542600083611a2d565b600d546001600160a01b031633146110d75760405162461bcd60e51b815260206004820152600a6024820152692737ba1029b7bbb2b91760b11b6044820152606401610597565b60008181526012602052604090205460ff1615156001146111325760405162461bcd60e51b81526020600482015260156024820152742737903932b8bab2b9ba103337b9103a37b5b2b71760591b6044820152606401610597565b6000818152601260209081526040808320805460ff19169055600f9091529020544244611160600143615207565b604080516020810195909552840192909252606083015240608082015260a00160408051601f1981840301815291815281516020928301206000938452600f90925290912055565b60606111b382611503565b6112175760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610597565b6000828152600f6020526040902054610542908390611a2d565b6060600b80546105f59061524a565b600061124c8383612020565b9392505050565b6000546001600160a01b0316331461127d5760405162461bcd60e51b815260040161059790615051565b6001600160a01b0381166112e25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610597565b610a0e81611979565b336112f583610c6e565b6001600160a01b03161461133e5760405162461bcd60e51b815260206004820152601060248201526f2737ba103a37b5b2b71037bbb732b91760811b6044820152606401610597565b60008160405160200161135191906146ef565b6040516020818303038152906040528051906020012090506000825111156113e05760008181526011602052604090205460ff16156113c65760405162461bcd60e51b815260206004820152601160248201527013985b5948185b1c9958591e481d5cd959607a1b6044820152606401610597565b6000818152601160205260409020805460ff191660011790555b600083815260106020526040812080546113f99061524a565b80601f01602080910402602001604051908101604052809291908181526020018280546114259061524a565b80156114725780601f1061144757610100808354040283529160200191611472565b820191906000526020600020905b81548152906001019060200180831161145557829003601f168201915b505050505090506000815111156114c3578060405160200161149491906146ef565b60408051601f198184030181529181528151602092830120600081815260119093529120805460ff1916905591505b600084815260106020908152604090912084516114e292860190613958565b5050505050565b60006114f482612067565b8061054257506105428261208c565b6000908152600360205260409020546001600160a01b0316151590565b600081815260056020526040902080546001600160a01b0319166001600160a01b038416908117909155819061155582610c6e565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600061159982611503565b6115fa5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610597565b600061160583610c6e565b9050806001600160a01b0316846001600160a01b031614806116405750836001600160a01b031661163584610678565b6001600160a01b0316145b80610c665750610c668185611240565b826001600160a01b031661166382610c6e565b6001600160a01b0316146116cb5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610597565b6001600160a01b03821661172d5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610597565b6117388383836120c2565b611743600082611520565b6001600160a01b038316600090815260046020526040812080546001929061176c908490615207565b90915550506001600160a01b038216600090815260046020526040812080546001929061179a908490615125565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600061180682610c6e565b9050611814816000846120c2565b61181f600083611520565b6001600160a01b0381166000908152600460205260408120805460019290611848908490615207565b909155505060008281526003602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b60008181526010602052604090208054606091906118bf9061524a565b80601f01602080910402602001604051908101604052809291908181526020018280546118eb9061524a565b80156119385780601f1061190d57610100808354040283529160200191611938565b820191906000526020600020905b81548152906001019060200180831161191b57829003601f168201915b5050505050905080516000141561197457611952826120cd565b6040516020016119629190614874565b60405160208183030381529060405290505b919050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516119dc90600b906020840190613958565b5050565b6119dc8282604051806020016040528060008152506121e7565b611a05848484611650565b611a118484848461221a565b610ff65760405162461bcd60e51b815260040161059790614fff565b6040805180820190915281815260006020820181905260609190611a5382826064612327565b604080516101e08101825260088082526020820152608c918101919091526028606082015260006080820181905260a0820181905260c0820181905291925060e081016003611aa486856064612327565b108152602001600a611ab98660006064612327565b108152602001600a611ace8660006064612327565b1081526020016001611ae38660006064612327565b1081526020016050841115611b0957605a841115611b02576002611b0c565b6001611b0c565b60005b6002811115611b2b57634e487b7160e01b600052602160045260246000fd5b81526020018781526020018660001c8152602001611b488561242f565b81525090508060e001518015611b82575060018161016001516002811115611b8057634e487b7160e01b600052602160045260246000fd5b145b15611bad576040805180820190915260078152660467272847072760cb1b60208201526101c0820151525b611bba8360006010612327565b91506001821015611be357600380825260208201526092604082015261017d6060820152611c44565b6003821015611c0357600480825260208201526101406060820152611c44565b6007821015611c22576006808252602082015260b46060820152611c44565b600b821015611c44576007808252602082015260926040820152605960608201525b600a81604001516002611c579190615172565b611c61919061513d565b61ffff1660a08201526040810151600a90611c7d906006615172565b611c87919061513d565b61ffff1660c08201526000611c9b876118a2565b611ca58386612884565b611caf8487612b79565b604051602001611cc193929190614b2e565b604051602081830303815290604052905080611cf183606001516104b0611ce891906151e4565b61ffff166120cd565b611d0684606001516104c4611ce891906151e4565b846101200151611d255760405180602001604052806000815250611d4b565b6040518060400160405280600c81526020016b2066696c6c3d27236666662760a01b8152505b611d548b6120cd565b604051602001611d68959493929190614228565b604051602081830303815290604052905080604051602001611d8a9190613ecf565b60408051601f1981840301815291905290508060008361016001516002811115611dc457634e487b7160e01b600052602160045260246000fd5b14611e485760018361016001516002811115611df057634e487b7160e01b600052602160045260246000fd5b14611e1d576040518060400160405280600a815260200169233ab6361031b7b637b960b11b815250611e66565b6040518060400160405280600d81526020016c426c61636b202620576869746560981b815250611e66565b604051806040016040528060048152602001634175746f60e01b8152505b836101000151611e945760405180604001604052806006815260200165139bdc9b585b60d21b815250611eb3565b604051806040016040528060058152602001642232b3b2b760d91b8152505b846101200151611ee05760405180604001604052806005815260200164131a59da1d60da1b815250611efe565b604051806040016040528060048152602001634461726b60e01b8152505b8560e00151611f2b5760405180604001604052806006815260200165139bdc9b585b60d21b815250611f4a565b6040518060400160405280600581526020016411da1bdcdd60da1b8152505b8651611f589060ff166120cd565b611f68886020015160ff166120cd565b604051602001611f7992919061470b565b60408051601f1981840301815291905287516020890151611f9a91906151bb565b60ff16886080015161ffff1614611fc05760405180602001604052806000815250611fef565b6040518060400160405280601581526020017416112137b73ab9911d11233ab636102137b0b9321160591b8152505b6040516020016120059796959493929190614341565b60405160208183030381529060405294505050505092915050565b600061202c8383610bc4565b1561203957506001610542565b6001600160a01b0380841660009081526006602090815260408083209386168352929052205460ff1661124c565b60006001600160e01b0319821663780e9d6360e01b1480610542575061054282613108565b60006001600160e01b0319821663152a902d60e11b148061054257506001600160e01b03198216632dde656160e21b1492915050565b610811838383613158565b6060816120f15750506040805180820190915260018152600360fc1b602082015290565b8160005b811561211b5780612105816152a1565b91506121149050600a8361515e565b91506120f5565b60008167ffffffffffffffff81111561214457634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f19166020018201604052801561216e576020820181803683370190505b5090505b8415610c6657612183600183615207565b9150612190600a866152bc565b61219b906030615125565b60f81b8183815181106121be57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506121e0600a8661515e565b9450612172565b6121f18383613210565b6121fe600084848461221a565b6108115760405162461bcd60e51b815260040161059790614fff565b60006001600160a01b0384163b1561231c57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061225e903390899088908890600401614f2a565b602060405180830381600087803b15801561227857600080fd5b505af19250505080156122a8575060408051601f3d908101601f191682019092526122a591810190613ced565b60015b612302573d8080156122d6576040519150601f19603f3d011682016040523d82523d6000602084013e6122db565b606091505b5080516122fa5760405162461bcd60e51b815260040161059790614fff565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610c66565b506001949350505050565b8251602084015160009190829061233f906003615125565b90506004600f620fffff86111561235e57506018905062ffffff6123b4565b61ffff861115612376575060149050620fffff6123b4565b610fff86111561238d57506010905061ffff6123b4565b60ff8611156123a35750600c9050610fff6123b4565b600f8611156123b457506008905060ff5b6123c082610100615207565b8311156123f357604080516020810186905260009450016040516020818303038152906040528051906020012060001c93505b83831c8181166124038989615207565b61240d90826152bc565b612417908a615125565b958a5250505050602090950194909452509192915050565b6124376139dc565b600061244583826006612327565b9050806124fa5750506040805160e081018252600760a08201818152662346384231393560c81b60c0840152825282518084018452818152660234636373238360cc1b60208281019190915280840191909152835180850185528281526608d0cc0d90ce0d60ca1b81830152838501528351808501855282815266119b219aa11ba160c91b81830152606084015283518085019094529083526608cccd4d50cdd160ca1b908301526080810191909152919050565b80600114156125b15750506040805160e081018252600760a082018181526611989b99a31aa360c91b60c0840152825282518084018452818152661199181b199ca160c91b6020828101919091528084019190915283518085018552828152662333434145413360c81b818301528385015283518085018552828152662346364435354360c81b81830152606084015283518085019094529083526611a2a21a9a99a160c91b908301526080810191909152919050565b80600214156126685750506040805160e081018252600760a08201818152662341373232364560c81b60c0840152825282518084018452818152662345433230343960c81b6020828101919091528084019190915283518085018552828152660468c646c8466760cb1b8183015283850152835180850185528281526611a31ba2211a2360c91b8183015260608401528351808501909452908352662332463935393960c81b908301526080810191909152919050565b806003141561271f5750506040805160e081018252600760a08201818152660467272847072760cb1b60c08401528252825180840184528181526611a322a1a2a0a160c91b6020828101919091528084019190915283518085018552828152662346463834374360c81b8183015283850152835180850185528281526611a29c1a209aa360c91b818301526060840152835180850190945290835266119920999b19a160c91b908301526080810191909152919050565b80600414156127d65750506040805160e081018252600760a082018181526608d1919051105160ca1b60c08401528252825180840184528181526611a3222323211b60c91b602082810191909152808401919091528351808501855282815266119ca1231b232360c91b8183015283850152835180850185528281526611a1222119232360c91b81830152606084015283518085019094529083526611a323219b232360c91b908301526080810191909152919050565b50506040805160e081018252600760a082018181526611a2a09b1c9c2160c91b60c0840152825282518084018452818152662343303532393960c81b602082810191909152808401919091528351808501855282815266046726e668282760cb1b81830152838501528351808501855282815266119b221919a11b60c91b8183015260608401528351808501909452908352662335373130383960c81b908301526080810191909152919050565b606060008361010001516128995760006128aa565b600284604001516128aa919061513d565b61ffff1690506128be846101a001516120cd565b6128da82866060015161ffff166128d59190615125565b6120cd565b6128f183876060015161ffff166128d59190615125565b612902876040015161ffff166120cd565b612913886040015161ffff166120cd565b6040516020016129279594939291906148a9565b60405160208183030381529060405291508161294a856040015161ffff166120cd565b61295b866040015161ffff166120cd565b86610120015161298757604051806040016040528060048152602001630233030360e41b8152506129a5565b6040518060400160405280600481526020016311b3333360e11b8152505b6040516020016129b89493929190614474565b6040516020818303038152906040529150836101200151612a4557816129e2856101a001516120cd565b6129f36128d5866000610168612327565b612a09612a0387600a602d612327565b8761334f565b612a1f612a1988600a602d612327565b8861334f565b604051602001612a339594939291906140d3565b60405160208183030381529060405291505b81846101200151612a8257612a5e856101a001516120cd565b604051602001612a6e91906149f8565b604051602081830303815290604052612a9c565b6040518060600160405280602f815260200161533e602f91395b612aad866060015161ffff166120cd565b612abe876060015161ffff166120cd565b612ade88606001516002612ad29190615172565b611ce8906104b06151e4565b612af289606001516002612ad29190615172565b612b008a6101a001516120cd565b8a6101200151612b2c57604051806040016040528060048152602001630233030360e41b815250612b4a565b6040518060400160405280600481526020016311b3333360e11b8152505b604051602001612b61989796959493929190614571565b60405160208183030381529060405291505092915050565b6040805160a081018252600080825260208201819052918101829052606081810183905260808201839052919060008560e00151612bc65760405180602001604052806000815250612bed565b6101c086015151604051612bdd9190602001614d47565b6040516020818303038152906040525b612bfe876060015161ffff166120cd565b612c0f886060015161ffff166120cd565b604051602001612c2193929190614e6a565b604051602081830303815290604052905060005b866020015160ff168161ffff1610156130dc5760005b875160ff1661ffff821610156130c957612c6681838a6133ed565b9350612c8c6000896101400151612c7e576010612c81565b600a5b89919060ff16612327565b945060018511612d1b5782612cdc8660001415612cd460028c60a00151612cb3919061513d565b61ffff1660028d60c00151612cc8919061513d565b8c919061ffff16612327565b878c8c6134d5565b604051602001612ced929190613e06565b60408051601f19818403018152919052608089018051919450612d0f8261527f565b61ffff169052506130b7565b60038511612d9f576000612d4a8960a0015161ffff168a60c0015161ffff168a6123279092919063ffffffff16565b905083612d5e876005141583888d8d61353a565b604051602001612d6f929190613e06565b60408051601f1981840301815291905260808a018051919550612d918261527f565b61ffff169052506130b79050565b8460041415612de75782612dbf60018a60a0015161ffff16878c8c61353a565b612dd560008b60c0015161ffff16888d8d61353a565b604051602001612ced93929190613e35565b8460051415612eb757600060028960c00151612e03919061513d565b61ffff1690506000612e1760008a8c6135af565b905084612e7583886040015161ffff16612e319190615207565b84896060015161ffff16612e459190615207565b858a6040015161ffff16612e599190615125565b868b6060015161ffff16612e6d9190615125565b866000613703565b604051602001612e86929190613e06565b60408051601f1981840301815291905260808b018051919650612ea88261527f565b61ffff169052506130b7915050565b6008851161302b5760006007861015612ee05760028960c00151612edb919061513d565b612ef1565b60028960a00151612ef1919061513d565b61ffff16905060078610156000612f09818b8d6135af565b905060608860081415612f2f57612f2c60008d60c0015161ffff168a8f8f61353a565b90505b8681612f8b868b6040015161ffff16612f489190615207565b878c6060015161ffff16612f5c9190615207565b888d6040015161ffff16612f709190615125565b898e6060015161ffff16612f849190615125565b888a613703565b612fe5878c6040015161ffff16612fa29190615125565b888d6060015161ffff16612fb69190615207565b898e6040015161ffff16612fca9190615207565b8a8f6060015161ffff16612fde9190615125565b898b613703565b604051602001612ff89493929190613e78565b60408051601f1981840301815291905260808d01805191985061301a8261527f565b61ffff169052506130b79350505050565b600a8510156130b757826130598660081460028b60c0015161304d919061513d565b61ffff16878c8c6134d5565b61307b600160028c60a0015161306f919061513d565b61ffff16888d8d6134d5565b60405160200161308d93929190613e35565b60408051601f198184030181529190526080890180519194506130af8261527f565b61ffff169052505b806130c18161527f565b915050612c4b565b50806130d48161527f565b915050612c35565b50806040516020016130ee9190614549565b604051602081830303815290604052935050505092915050565b60006001600160e01b031982166380ac58cd60e01b148061313957506001600160e01b03198216635b5e139f60e01b145b8061054257506301ffc9a760e01b6001600160e01b0319831614610542565b6001600160a01b0383166131b3576131ae81600980546000838152600a60205260408120829055600182018355919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0155565b6131d6565b816001600160a01b0316836001600160a01b0316146131d6576131d6838261379e565b6001600160a01b0382166131ed576108118161383b565b826001600160a01b0316826001600160a01b031614610811576108118282613914565b6001600160a01b0382166132665760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610597565b61326f81611503565b156132bc5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610597565b6132c8600083836120c2565b6001600160a01b03821660009081526004602052604081208054600192906132f1908490615125565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60606133616128d583600060ff612327565b6133716128d58460006064612327565b6133816128d58560286064612327565b600a861061339e57604051806020016040528060008152506133b9565b604051806040016040528060018152602001600360fc1b8152505b6133c2876120cd565b6040516020016133d6959493929190614a72565b604051602081830303815290604052905092915050565b6040805160a081018252600080825260208201819052918101829052606081018290526080810191909152600082604001518561342a9190615172565b9050600083604001518561343e9190615172565b90506040518060a001604052808361ffff1681526020018261ffff16815260200160028660400151613470919061513d565b61347a9085615108565b61ffff16815260200160028660400151613494919061513d565b61349e9084615108565b61ffff16815260200187866000015160ff16886134bb9190615172565b6134c59190615108565b61ffff1690529695505050505050565b60606134e8846040015161ffff166120cd565b6134f9856060015161ffff166120cd565b613502876120cd565b61350d8986886135af565b6040516020016135209493929190614db8565b604051602081830303815290604052905095945050505050565b606061355d61354a60028761515e565b856040015161ffff166128d59190615207565b61357e61356b60028861515e565b866060015161ffff166128d59190615207565b613587876120cd565b613590886120cd565b61359b8a87896135af565b604051602001613520959493929190614790565b606060008261012001516135df57604051806040016040528060048152602001630233030360e41b8152506135fd565b6040518060400160405280600481526020016311b3333360e11b8152505b9050826101600151600281111561362457634e487b7160e01b600052602160045260246000fd5b60011415801561366e5750826101600151600281111561365457634e487b7160e01b600052602160045260246000fd5b6002148061366e5750600161366c8560006005612327565b105b156136ac576101c08301516136868560006005612327565b600581106136a457634e487b7160e01b600052603260045260246000fd5b602002015190505b846136d957806040516020016136c29190614747565b60405160208183030381529060405291505061124c565b806040516020016136ea91906149af565b6040516020818303038152906040529150509392505050565b606061370e876120cd565b613717876120cd565b613720876120cd565b613729876120cd565b8686613744576040518060200160405280600081525061376e565b6040518060400160405280601081526020016f7374726f6b652d77696474683d27382760801b8152505b60405160200161378396959493929190614c7d565b60405160208183030381529060405290509695505050505050565b600060016137ab84610d35565b6137b59190615207565b600083815260086020526040902054909150808214613808576001600160a01b03841660009081526007602090815260408083208584528252808320548484528184208190558352600890915290208190555b5060009182526008602090815260408084208490556001600160a01b039094168352600781528383209183525290812055565b60095460009061384d90600190615207565b6000838152600a60205260408120546009805493945090928490811061388357634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905080600983815481106138b257634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255828152600a909152604080822084905585825281205560098054806138f857634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b600061391f83610d35565b6001600160a01b039093166000908152600760209081526040808320868452825280832085905593825260089052919091209190915550565b8280546139649061524a565b90600052602060002090601f01602090048101928261398657600085556139cc565b82601f1061399f57805160ff19168380011785556139cc565b828001600101855582156139cc579182015b828111156139cc5782518255916020019190600101906139b1565b506139d8929150613a03565b5090565b6040518060a001604052806005905b60608152602001906001900390816139eb5790505090565b5b808211156139d85760008155600101613a04565b600067ffffffffffffffff831115613a3257613a326152fc565b613a45601f8401601f19166020016150d7565b9050828152838383011115613a5957600080fd5b828260208301376000602084830101529392505050565b600082601f830112613a80578081fd5b61124c83833560208501613a18565b600060208284031215613aa0578081fd5b813561124c81615312565b60008060408385031215613abd578081fd5b8235613ac881615312565b91506020830135613ad881615312565b809150509250929050565b600080600060608486031215613af7578081fd5b8335613b0281615312565b92506020840135613b1281615312565b929592945050506040919091013590565b60008060008060808587031215613b38578081fd5b8435613b4381615312565b93506020850135613b5381615312565b925060408501359150606085013567ffffffffffffffff811115613b75578182fd5b8501601f81018713613b85578182fd5b613b9487823560208401613a18565b91505092959194509250565b60008060408385031215613bb2578182fd5b8235613bbd81615312565b915060208381013567ffffffffffffffff80821115613bda578384fd5b818601915086601f830112613bed578384fd5b813581811115613bff57613bff6152fc565b8060051b9150613c108483016150d7565b8181528481019084860184860187018b1015613c2a578788fd5b8795505b83861015613c4c578035835260019590950194918601918601613c2e565b508096505050505050509250929050565b60008060408385031215613c6f578182fd5b8235613c7a81615312565b915060208301358015158114613ad8578182fd5b60008060408385031215613ca0578182fd5b8235613cab81615312565b946020939093013593505050565b600060208284031215613cca578081fd5b5035919050565b600060208284031215613ce2578081fd5b813561124c81615327565b600060208284031215613cfe578081fd5b815161124c81615327565b600060208284031215613d1a578081fd5b815161124c81615312565b600060208284031215613d36578081fd5b813567ffffffffffffffff811115613d4c578182fd5b610c6684828501613a70565b60008060408385031215613d6a578182fd5b82359150602083013567ffffffffffffffff811115613d87578182fd5b613d9385828601613a70565b9150509250929050565b60008060408385031215613daf578182fd5b50508035926020909101359150565b60008151808452613dd681602086016020860161521e565b601f01601f19169290920160200192915050565b60008151613dfc81856020860161521e565b9290920192915050565b60008351613e1881846020880161521e565b835190830190613e2c81836020880161521e565b01949350505050565b60008451613e4781846020890161521e565b845190830190613e5b81836020890161521e565b8451910190613e6e81836020880161521e565b0195945050505050565b60008551613e8a818460208a0161521e565b855190830190613e9e818360208a0161521e565b8551910190613eb181836020890161521e565b8451910190613ec481836020880161521e565b019695505050505050565b60008251613ee181846020870161521e565b7f2c226c6963656e7365223a2246756c6c206f776e6572736869702077697468209201918252507f756e6c696d6974656420636f6d6d65726369616c207269676874732e222c22636020820152743932b0ba37b9111d11203234b2bb30b9323ab6b81160591b60408201527f2c226465736372697074696f6e223a2247656e657369733a204120736565642c60558201526f081cdbdb59481b1bdd994b081d1a185d60821b607582015261277360f01b60858201527f616c6c2069742074616b65732e5c6e5c6e47656e65736973206973207468652060878201527f6669727374206f6620746865205b736f6c5d536565646c696e67732c20616e2060a78201527f6578706572696d656e74206f662061727420616e6420636f6c6c65637469626c60c78201527f65204e46547320313030252067656e657261746564207769746820536f6c696460e78201527f6974792e5c6e6279204064696576617264756d705c6e5c6e4c6963656e73653a6101078201527f2046756c6c206f776e657273686970207769746820756e6c696d6974656420636101278201527f6f6d6d65726369616c207269676874732e5c6e5c6e4d6f726520696e666f20616101478201527f742068747470733a2f2f736f6c536565646c696e67732e61727422000000000061016782015261018201919050565b600086516140e5818460208b0161521e565b80830190507f3c6c696e6561724772616469656e742069643d2767656e657369732d6772616481526469656e742d60d81b6020820152865161412e816025840160208b0161521e565b7f27206772616469656e745472616e73666f726d3d27726f74617465280000000060259290910191820152855161416c816041840160208a0161521e565b7f29273e3c73746f70206f66667365743d273025272073746f702d636f6c6f723d60419290910191820152602760f81b606182015284516141b481606284016020890161521e565b7f272f3e3c73746f70206f66667365743d2731303025272073746f702d636f6c6f6062929091019182015262723d2760e81b608282015261421c6141fb6085830186613dea565b741390179f1e17b634b732b0b923b930b234b2b73a1f60591b815260150190565b98975050505050505050565b60008651602061423b8285838c0161521e565b7f3c74657874207374796c653d27666f6e743a20626f6c6420313170782073616e9184019182527f732d73657269663b2720746578742d616e63686f723d27656e642720783d270081830152875161429981603f85018b850161521e565b642720793d2760d81b603f939091019283015286516142be8160448501848b0161521e565b602760f81b6044939091019283015285516142df8160458501848a0161521e565b613e2360f01b604593909101928301528451614301816047850184890161521e565b614333614320604783860101661e17ba32bc3a1f60c91b815260070190565b661e17b9bb339f1160c91b815260070190565b9a9950505050505050505050565b60008851614353818460208d0161521e565b7f2c2270726f70657274696573223a7b22436f6c6f7273223a2200000000000000908301908152885161438d816019840160208d0161521e565b6911161123b934b2111d1160b11b6019929091019182015287516143b8816023840160208c0161521e565b6911161126b7b232911d1160b11b6023929091019182015286516143e381602d840160208b0161521e565b6e1116112932b73232b934b733911d1160891b602d9290910191820152855161441381603c840160208a0161521e565b61446561445761445161444461443e603c868801016911161129b4bd32911d1160b11b8152600a0190565b8a613dea565b601160f91b815260010190565b87613dea565b617d7d60f01b815260020190565b9b9a5050505050505050505050565b60008551614486818460208a0161521e565b6a01e3830ba3410321e93a6960ad1b90830190815285516144ae81600b840160208a0161521e565b6a010181026101810181018160ad1b600b929091019182015284516144da81601684016020890161521e565b75272066696c6c3d276e6f6e6527207374726f6b653d2760501b60169290910191820152835161451181602c84016020880161521e565b7f27207374726f6b652d77696474683d2734272f3e3c2f7061747465726e3e0000602c9290910191820152604a019695505050505050565b6000825161455b81846020870161521e565b631e17b39f60e11b920191825250600401919050565b60008951614583818460208e0161521e565b80830190507f3c2f646566733e3c726563742077696474683d273130302527206865696768748152751e939898181293903334b6361e9391b333331390179f60511b602082015289516145dd816036840160208e0161521e565b683c7265637420783d2760b81b60369290910191820152885161460781603f840160208d0161521e565b642720793d2760d81b603f9290910191820152875161462d816044840160208c0161521e565b68272077696474683d2760b81b604492909101918201526144656146ce6146c86146b16146ab61468261467c614666604d89018f613dea565b6927206865696768743d2760b01b8152600a0190565b8c613dea565b7f272066696c6c3d2775726c282367656e657369732d677269642d0000000000008152601a0190565b89613dea565b6a2927207374726f6b653d2760a81b8152600b0190565b86613dea565b74139039ba3937b5b296bbb4b23a341e939a1390179f60591b815260150190565b6000825161470181846020870161521e565b9190910192915050565b6000835161471d81846020880161521e565b601560f91b908301908152835161473b81600184016020880161521e565b01600101949350505050565b68207374726f6b653d2760b81b81526000825161476b81600985016020870161521e565b6d013903334b6361e93b737b73293960951b6009939091019283015250601701919050565b683c7265637420783d2760b81b8152600086516147b4816009850160208b0161521e565b642720793d2760d81b60099184019182015286516147d981600e840160208b0161521e565b68272077696474683d2760b81b600e92909101918201528551614803816017840160208a0161521e565b6927206865696768743d2760b01b60179290910191820152845161482e81602184016020890161521e565b602760f81b60219290910191820152835161485081602284016020880161521e565b61486760228284010161179f60f11b815260020190565b9998505050505050505050565b6c47656e657369732e736f6c202360981b81526000825161489c81600d85016020870161521e565b91909101600d0192915050565b7f3c646566733e3c7061747465726e2069643d2767656e657369732d677269642d81526000602087516148e181838601848c0161521e565b8084019050642720783d2760d81b8282015287516149058160258401858c0161521e565b642720793d2760d81b60259290910191820152865161492a81602a8401858b0161521e565b68272077696474683d2760b81b602a929091019182015285516149538160338401858a0161521e565b6927206865696768743d2760b01b60339290910191820152845161497d81603d840185890161521e565b614333603d828401017f27207061747465726e556e6974733d277573657253706163654f6e557365273e815260200190565b662066696c6c3d2760c81b8152600082516149d181600785016020870161521e565b6f0139039ba3937b5b29e93b737b73293960851b6007939091019283015250601701919050565b7f3c726563742077696474683d273130302527206865696768743d27313030252781527f2066696c6c3d2775726c282367656e657369732d6772616469656e742d000000602082015260008251614a5681603d85016020870161521e565b64149390179f60d91b603d939091019283015250604201919050565b640d0e6d8c2560db1b815260008651614a92816005850160208b0161521e565b600b60fa1b6005918401918201528651614ab3816006840160208b0161521e565b61094b60f21b600692909101918201528551614ad6816008840160208a0161521e565b631296181760e11b600892909101918201528451614afb81600c84016020890161521e565b8451910190614b1181600c84016020880161521e565b602960f81b600c9290910191820152600d01979650505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b757466382c7b226e616d81526332911d1160e11b602082015260008451614b7381602485016020890161521e565b7f222c22696d616765223a22646174613a696d6167652f7376672b786d6c3b757460249184019182015262198e0b60ea1b60448201527f3c73766720786d6c6e733d27687474703a2f2f7777772e77332e6f72672f323060478201527f30302f7376672720786d6c6e733a786c696e6b3d27687474703a2f2f7777772e60678201527f77332e6f72672f313939392f786c696e6b272076696577426f783d273020302060878201527f313230302031323030272077696474683d273132303027206865696768743d2760a78201526518991818139f60d11b60c78201528451614c638160cd84016020890161521e565b614c7260cd8284010186613dea565b979650505050505050565b6a01e3830ba3410321e93a6960ad1b815260008751614ca381600b850160208c0161521e565b8083019050600160fd1b80600b8301528851614cc681600c850160208d0161521e565b6201026160ed1b600c93909101928301528751614cea81600f850160208c0161521e565b600f9201918201528551614d05816010840160208a0161521e565b602760f81b601092909101918201528451614d2781601184016020890161521e565b614333614d3960118385010187613dea565b61179f60f11b815260020190565b7f7374796c653d2766696c7465723a2064726f702d736861646f772831367078208152690189b383c101918383c160b51b602082015260008251614d9281602a85016020870161521e565b6e2920696e7665727428383025293b2760881b602a939091019283015250603901919050565b6b3c636972636c652063783d2760a01b815260008551614ddf81600c850160208a0161521e565b65272063793d2760d01b600c918401918201528551614e05816012840160208a0161521e565b642720723d2760d81b601292909101918201528451614e2b81601784016020890161521e565b602760f81b601792909101918201528351614e4d81601884016020880161521e565b61179f60f11b60189290910191820152601a019695505050505050565b6201e33960ed1b815260008451614e8881600385016020890161521e565b7f207374726f6b652d77696474683d273427207374726f6b652d6c696e656361706003918401918201527f3d27726f756e6427207472616e73666f726d3d277472616e736c61746528000060238201528451614eeb81604184016020890161521e565b600b60fa1b604192909101918201528351614f0d81604284016020880161521e565b6214939f60e91b6042929091019182015260450195945050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090614f5d90830184613dbe565b9695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015614fa85783516001600160a01b031683529284019291840191600101614f83565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015614fa857835183529284019291840191600101614fd0565b60208152600061124c6020830184613dbe565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b604051601f8201601f1916810167ffffffffffffffff81118282101715615100576151006152fc565b604052919050565b600061ffff808316818516808303821115613e2c57613e2c6152d0565b60008219821115615138576151386152d0565b500190565b600061ffff80841680615152576151526152e6565b92169190910492915050565b60008261516d5761516d6152e6565b500490565b600061ffff80831681851681830481118215151615615193576151936152d0565b02949350505050565b60008160001904831182151516156151b6576151b66152d0565b500290565b600060ff821660ff84168160ff04811182151516156151dc576151dc6152d0565b029392505050565b600061ffff838116908316818110156151ff576151ff6152d0565b039392505050565b600082821015615219576152196152d0565b500390565b60005b83811015615239578181015183820152602001615221565b83811115610ff65750506000910152565b600181811c9082168061525e57607f821691505b6020821081141561087e57634e487b7160e01b600052602260045260246000fd5b600061ffff80831681811415615297576152976152d0565b6001019392505050565b60006000198214156152b5576152b56152d0565b5060010190565b6000826152cb576152cb6152e6565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610a0e57600080fd5b6001600160e01b031981168114610a0e57600080fdfe3c726563742077696474683d273130302527206865696768743d2731303025272066696c6c3d272330303027202f3ea2646970667358221220b8877e17e2b2e81d0823ff200e5c452a140e9691a88185214b4cc565389017b164736f6c6343000804003300000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c10000000000000000000000002b0f5a983316b4fc980500b3e973d58765770bd2000000000000000000000000000000000000000000000000000000000000001847656e65736973202d205b736f6c5d536565646c696e67730000000000000000000000000000000000000000000000000000000000000000000000000000000653534753233000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000047697066733a2f2f697066732f516d57513256324b69536a4451514a624b3468746b4152697742636d7456734761794e42717a57594b43486b74312f47656e657369732e6a736f6e00000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102275760003560e01c806370a0823111610130578063b9c4d9fb116100b8578063e8a3d4851161007c578063e8a3d485146104ed578063e985e9c5146104f5578063f2fde38b14610508578063f84ddf0b1461051b578063fe55932a1461052457600080fd5b8063b9c4d9fb14610481578063bc36ff81146104a1578063bf40e75c146104b4578063c7a53af0146104c7578063c87b56dd146104da57600080fd5b8063938e3d7b116100ff578063938e3d7b1461042d57806395d89b4114610440578063a22cb46514610448578063a5004d981461045b578063b88d4fde1461046e57600080fd5b806370a08231146103de578063715018a6146103f1578063750af3ab146103f95780638da5cb5b1461041c57600080fd5b80632f745c59116101b35780634f6ccce7116101825780634f6ccce71461037f5780635a4c1624146103925780636102de98146103a55780636352211e146103b85780636b8ff574146103cb57600080fd5b80632f745c591461033357806342842e0e1461034657806342966c68146103595780634622ab031461036c57600080fd5b8063095ea7b3116101fa578063095ea7b3146102a95780630ebd4c7f146102bc57806318160ddd146102dc57806323b872dd146102ee5780632a55205a1461030157600080fd5b806301ffc9a71461022c57806304d884961461025457806306fdde0314610269578063081812fc1461027e575b600080fd5b61023f61023a366004613cd1565b610537565b60405190151581526020015b60405180910390f35b610267610262366004613cb9565b610548565b005b6102716105e6565b60405161024b9190614fec565b61029161028c366004613cb9565b610678565b6040516001600160a01b03909116815260200161024b565b6102676102b7366004613c8e565b610700565b6102cf6102ca366004613cb9565b610816565b60405161024b9190614fb4565b6009545b60405190815260200161024b565b6102676102fc366004613ae3565b610884565b61031461030f366004613d9d565b6108b6565b604080516001600160a01b03909316835260208301919091520161024b565b6102e0610341366004613c8e565b6108e6565b610267610354366004613ae3565b61097c565b610267610367366004613cb9565b610997565b61027161037a366004613cb9565b610a11565b6102e061038d366004613cb9565b610aab565b6102e06103a0366004613cb9565b610b4c565b61023f6103b3366004613aab565b610bc4565b6102916103c6366004613cb9565b610c6e565b6102716103d9366004613cb9565b610ce5565b6102e06103ec366004613a8f565b610d35565b610267610dbc565b61023f610407366004613cb9565b60116020526000908152604090205460ff1681565b6000546001600160a01b0316610291565b61026761043b366004613d25565b610df2565b610271610e25565b610267610456366004613c5d565b610e34565b6102e0610469366004613ba0565b610ef9565b61026761047c366004613b23565b610fc4565b61049461048f366004613cb9565b610ffc565b60405161024b9190614f67565b6102716104af366004613cb9565b611083565b6102676104c2366004613cb9565b611090565b600d54610291906001600160a01b031681565b6102716104e8366004613cb9565b6111a8565b610271611231565b61023f610503366004613aab565b611240565b610267610516366004613a8f565b611253565b6102e0600e5481565b610267610532366004613d58565b6112eb565b6000610542826114e9565b92915050565b3361055282610c6e565b6001600160a01b0316146105a05760405162461bcd60e51b815260206004820152601060248201526f2737ba103a37b5b2b71037bbb732b91760811b60448201526064015b60405180910390fd5b600081815260126020526040808220805460ff1916600117905551339183917f8832fb65003c6ac4dc53a073ae148a6464e937eb2f153567f4aca8f1d431a7469190a350565b6060600180546105f59061524a565b80601f01602080910402602001604051908101604052809291908181526020018280546106219061524a565b801561066e5780601f106106435761010080835404028352916020019161066e565b820191906000526020600020905b81548152906001019060200180831161065157829003601f168201915b5050505050905090565b600061068382611503565b6106e45760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610597565b506000908152600560205260409020546001600160a01b031690565b600061070b82610c6e565b9050806001600160a01b0316836001600160a01b031614156107795760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610597565b336001600160a01b038216148061079557506107958133611240565b6108075760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610597565b6108118383611520565b505050565b60606000610826836127106108b6565b915050801561087e576040805160018082528183019092529060208083019080368337019050509150808260008151811061087157634e487b7160e01b600052603260045260246000fd5b6020026020010181815250505b50919050565b61088f335b8261158e565b6108ab5760405162461bcd60e51b815260040161059790615086565b610811838383611650565b600d546001600160a01b031660006127106108d38461019061519c565b6108dd919061515e565b90509250929050565b60006108f183610d35565b82106109535760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610597565b506001600160a01b03919091166000908152600760209081526040808320938352929052205490565b61081183838360405180602001604052806000815250610fc4565b6109a033610889565b610a055760405162461bcd60e51b815260206004820152603060248201527f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760448201526f1b995c881b9bdc88185c1c1c9bdd995960821b6064820152608401610597565b610a0e816117fb565b50565b60106020526000908152604090208054610a2a9061524a565b80601f0160208091040260200160405190810160405280929190818152602001828054610a569061524a565b8015610aa35780601f10610a7857610100808354040283529160200191610aa3565b820191906000526020600020905b815481529060010190602001808311610a8657829003601f168201915b505050505081565b6000610ab660095490565b8210610b195760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610597565b60098281548110610b3a57634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b6000610b5782611503565b610bb15760405162461bcd60e51b815260206004820152602560248201527f546f6b656e5365656420717565727920666f72206e6f6e6578697374656e74206044820152643a37b5b2b760d91b6064820152608401610597565b506000908152600f602052604090205490565b600c546000906001600160a01b03168015801590610c66575060405163c455279160e01b81526001600160a01b038581166004830152808516919083169063c45527919060240160206040518083038186803b158015610c2357600080fd5b505afa158015610c37573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c5b9190613d09565b6001600160a01b0316145b949350505050565b6000818152600360205260408120546001600160a01b0316806105425760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610597565b6060610cf082611503565b610d2c5760405162461bcd60e51b815260206004820152600d60248201526c2ab735b737bbb7103a37b5b2b760991b6044820152606401610597565b610542826118a2565b60006001600160a01b038216610da05760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610597565b506001600160a01b031660009081526004602052604090205490565b6000546001600160a01b03163314610de65760405162461bcd60e51b815260040161059790615051565b610df06000611979565b565b6000546001600160a01b03163314610e1c5760405162461bcd60e51b815260040161059790615051565b610a0e816119c9565b6060600280546105f59061524a565b6001600160a01b038216331415610e8d5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610597565b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600d546000906001600160a01b03163314610f435760405162461bcd60e51b815260206004820152600a6024820152692737ba1029b7bbb2b91760b11b6044820152606401610597565b600e5460005b8351811015610fb75781610f5c816152a1565b925050610f6985836119e0565b838181518110610f8957634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516000848152600f90925260409091205580610faf816152a1565b915050610f49565b50600e8190559392505050565b610fce338361158e565b610fea5760405162461bcd60e51b815260040161059790615086565b610ff6848484846119fa565b50505050565b606060008061100d846127106108b6565b915091508060001461107c576040805160018082528183019092529060208083019080368337019050509250818360008151811061105b57634e487b7160e01b600052603260045260246000fd5b60200260200101906001600160a01b031690816001600160a01b0316815250505b5050919050565b6060610542600083611a2d565b600d546001600160a01b031633146110d75760405162461bcd60e51b815260206004820152600a6024820152692737ba1029b7bbb2b91760b11b6044820152606401610597565b60008181526012602052604090205460ff1615156001146111325760405162461bcd60e51b81526020600482015260156024820152742737903932b8bab2b9ba103337b9103a37b5b2b71760591b6044820152606401610597565b6000818152601260209081526040808320805460ff19169055600f9091529020544244611160600143615207565b604080516020810195909552840192909252606083015240608082015260a00160408051601f1981840301815291815281516020928301206000938452600f90925290912055565b60606111b382611503565b6112175760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610597565b6000828152600f6020526040902054610542908390611a2d565b6060600b80546105f59061524a565b600061124c8383612020565b9392505050565b6000546001600160a01b0316331461127d5760405162461bcd60e51b815260040161059790615051565b6001600160a01b0381166112e25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610597565b610a0e81611979565b336112f583610c6e565b6001600160a01b03161461133e5760405162461bcd60e51b815260206004820152601060248201526f2737ba103a37b5b2b71037bbb732b91760811b6044820152606401610597565b60008160405160200161135191906146ef565b6040516020818303038152906040528051906020012090506000825111156113e05760008181526011602052604090205460ff16156113c65760405162461bcd60e51b815260206004820152601160248201527013985b5948185b1c9958591e481d5cd959607a1b6044820152606401610597565b6000818152601160205260409020805460ff191660011790555b600083815260106020526040812080546113f99061524a565b80601f01602080910402602001604051908101604052809291908181526020018280546114259061524a565b80156114725780601f1061144757610100808354040283529160200191611472565b820191906000526020600020905b81548152906001019060200180831161145557829003601f168201915b505050505090506000815111156114c3578060405160200161149491906146ef565b60408051601f198184030181529181528151602092830120600081815260119093529120805460ff1916905591505b600084815260106020908152604090912084516114e292860190613958565b5050505050565b60006114f482612067565b8061054257506105428261208c565b6000908152600360205260409020546001600160a01b0316151590565b600081815260056020526040902080546001600160a01b0319166001600160a01b038416908117909155819061155582610c6e565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600061159982611503565b6115fa5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610597565b600061160583610c6e565b9050806001600160a01b0316846001600160a01b031614806116405750836001600160a01b031661163584610678565b6001600160a01b0316145b80610c665750610c668185611240565b826001600160a01b031661166382610c6e565b6001600160a01b0316146116cb5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610597565b6001600160a01b03821661172d5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610597565b6117388383836120c2565b611743600082611520565b6001600160a01b038316600090815260046020526040812080546001929061176c908490615207565b90915550506001600160a01b038216600090815260046020526040812080546001929061179a908490615125565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600061180682610c6e565b9050611814816000846120c2565b61181f600083611520565b6001600160a01b0381166000908152600460205260408120805460019290611848908490615207565b909155505060008281526003602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b60008181526010602052604090208054606091906118bf9061524a565b80601f01602080910402602001604051908101604052809291908181526020018280546118eb9061524a565b80156119385780601f1061190d57610100808354040283529160200191611938565b820191906000526020600020905b81548152906001019060200180831161191b57829003601f168201915b5050505050905080516000141561197457611952826120cd565b6040516020016119629190614874565b60405160208183030381529060405290505b919050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516119dc90600b906020840190613958565b5050565b6119dc8282604051806020016040528060008152506121e7565b611a05848484611650565b611a118484848461221a565b610ff65760405162461bcd60e51b815260040161059790614fff565b6040805180820190915281815260006020820181905260609190611a5382826064612327565b604080516101e08101825260088082526020820152608c918101919091526028606082015260006080820181905260a0820181905260c0820181905291925060e081016003611aa486856064612327565b108152602001600a611ab98660006064612327565b108152602001600a611ace8660006064612327565b1081526020016001611ae38660006064612327565b1081526020016050841115611b0957605a841115611b02576002611b0c565b6001611b0c565b60005b6002811115611b2b57634e487b7160e01b600052602160045260246000fd5b81526020018781526020018660001c8152602001611b488561242f565b81525090508060e001518015611b82575060018161016001516002811115611b8057634e487b7160e01b600052602160045260246000fd5b145b15611bad576040805180820190915260078152660467272847072760cb1b60208201526101c0820151525b611bba8360006010612327565b91506001821015611be357600380825260208201526092604082015261017d6060820152611c44565b6003821015611c0357600480825260208201526101406060820152611c44565b6007821015611c22576006808252602082015260b46060820152611c44565b600b821015611c44576007808252602082015260926040820152605960608201525b600a81604001516002611c579190615172565b611c61919061513d565b61ffff1660a08201526040810151600a90611c7d906006615172565b611c87919061513d565b61ffff1660c08201526000611c9b876118a2565b611ca58386612884565b611caf8487612b79565b604051602001611cc193929190614b2e565b604051602081830303815290604052905080611cf183606001516104b0611ce891906151e4565b61ffff166120cd565b611d0684606001516104c4611ce891906151e4565b846101200151611d255760405180602001604052806000815250611d4b565b6040518060400160405280600c81526020016b2066696c6c3d27236666662760a01b8152505b611d548b6120cd565b604051602001611d68959493929190614228565b604051602081830303815290604052905080604051602001611d8a9190613ecf565b60408051601f1981840301815291905290508060008361016001516002811115611dc457634e487b7160e01b600052602160045260246000fd5b14611e485760018361016001516002811115611df057634e487b7160e01b600052602160045260246000fd5b14611e1d576040518060400160405280600a815260200169233ab6361031b7b637b960b11b815250611e66565b6040518060400160405280600d81526020016c426c61636b202620576869746560981b815250611e66565b604051806040016040528060048152602001634175746f60e01b8152505b836101000151611e945760405180604001604052806006815260200165139bdc9b585b60d21b815250611eb3565b604051806040016040528060058152602001642232b3b2b760d91b8152505b846101200151611ee05760405180604001604052806005815260200164131a59da1d60da1b815250611efe565b604051806040016040528060048152602001634461726b60e01b8152505b8560e00151611f2b5760405180604001604052806006815260200165139bdc9b585b60d21b815250611f4a565b6040518060400160405280600581526020016411da1bdcdd60da1b8152505b8651611f589060ff166120cd565b611f68886020015160ff166120cd565b604051602001611f7992919061470b565b60408051601f1981840301815291905287516020890151611f9a91906151bb565b60ff16886080015161ffff1614611fc05760405180602001604052806000815250611fef565b6040518060400160405280601581526020017416112137b73ab9911d11233ab636102137b0b9321160591b8152505b6040516020016120059796959493929190614341565b60405160208183030381529060405294505050505092915050565b600061202c8383610bc4565b1561203957506001610542565b6001600160a01b0380841660009081526006602090815260408083209386168352929052205460ff1661124c565b60006001600160e01b0319821663780e9d6360e01b1480610542575061054282613108565b60006001600160e01b0319821663152a902d60e11b148061054257506001600160e01b03198216632dde656160e21b1492915050565b610811838383613158565b6060816120f15750506040805180820190915260018152600360fc1b602082015290565b8160005b811561211b5780612105816152a1565b91506121149050600a8361515e565b91506120f5565b60008167ffffffffffffffff81111561214457634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f19166020018201604052801561216e576020820181803683370190505b5090505b8415610c6657612183600183615207565b9150612190600a866152bc565b61219b906030615125565b60f81b8183815181106121be57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506121e0600a8661515e565b9450612172565b6121f18383613210565b6121fe600084848461221a565b6108115760405162461bcd60e51b815260040161059790614fff565b60006001600160a01b0384163b1561231c57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061225e903390899088908890600401614f2a565b602060405180830381600087803b15801561227857600080fd5b505af19250505080156122a8575060408051601f3d908101601f191682019092526122a591810190613ced565b60015b612302573d8080156122d6576040519150601f19603f3d011682016040523d82523d6000602084013e6122db565b606091505b5080516122fa5760405162461bcd60e51b815260040161059790614fff565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610c66565b506001949350505050565b8251602084015160009190829061233f906003615125565b90506004600f620fffff86111561235e57506018905062ffffff6123b4565b61ffff861115612376575060149050620fffff6123b4565b610fff86111561238d57506010905061ffff6123b4565b60ff8611156123a35750600c9050610fff6123b4565b600f8611156123b457506008905060ff5b6123c082610100615207565b8311156123f357604080516020810186905260009450016040516020818303038152906040528051906020012060001c93505b83831c8181166124038989615207565b61240d90826152bc565b612417908a615125565b958a5250505050602090950194909452509192915050565b6124376139dc565b600061244583826006612327565b9050806124fa5750506040805160e081018252600760a08201818152662346384231393560c81b60c0840152825282518084018452818152660234636373238360cc1b60208281019190915280840191909152835180850185528281526608d0cc0d90ce0d60ca1b81830152838501528351808501855282815266119b219aa11ba160c91b81830152606084015283518085019094529083526608cccd4d50cdd160ca1b908301526080810191909152919050565b80600114156125b15750506040805160e081018252600760a082018181526611989b99a31aa360c91b60c0840152825282518084018452818152661199181b199ca160c91b6020828101919091528084019190915283518085018552828152662333434145413360c81b818301528385015283518085018552828152662346364435354360c81b81830152606084015283518085019094529083526611a2a21a9a99a160c91b908301526080810191909152919050565b80600214156126685750506040805160e081018252600760a08201818152662341373232364560c81b60c0840152825282518084018452818152662345433230343960c81b6020828101919091528084019190915283518085018552828152660468c646c8466760cb1b8183015283850152835180850185528281526611a31ba2211a2360c91b8183015260608401528351808501909452908352662332463935393960c81b908301526080810191909152919050565b806003141561271f5750506040805160e081018252600760a08201818152660467272847072760cb1b60c08401528252825180840184528181526611a322a1a2a0a160c91b6020828101919091528084019190915283518085018552828152662346463834374360c81b8183015283850152835180850185528281526611a29c1a209aa360c91b818301526060840152835180850190945290835266119920999b19a160c91b908301526080810191909152919050565b80600414156127d65750506040805160e081018252600760a082018181526608d1919051105160ca1b60c08401528252825180840184528181526611a3222323211b60c91b602082810191909152808401919091528351808501855282815266119ca1231b232360c91b8183015283850152835180850185528281526611a1222119232360c91b81830152606084015283518085019094529083526611a323219b232360c91b908301526080810191909152919050565b50506040805160e081018252600760a082018181526611a2a09b1c9c2160c91b60c0840152825282518084018452818152662343303532393960c81b602082810191909152808401919091528351808501855282815266046726e668282760cb1b81830152838501528351808501855282815266119b221919a11b60c91b8183015260608401528351808501909452908352662335373130383960c81b908301526080810191909152919050565b606060008361010001516128995760006128aa565b600284604001516128aa919061513d565b61ffff1690506128be846101a001516120cd565b6128da82866060015161ffff166128d59190615125565b6120cd565b6128f183876060015161ffff166128d59190615125565b612902876040015161ffff166120cd565b612913886040015161ffff166120cd565b6040516020016129279594939291906148a9565b60405160208183030381529060405291508161294a856040015161ffff166120cd565b61295b866040015161ffff166120cd565b86610120015161298757604051806040016040528060048152602001630233030360e41b8152506129a5565b6040518060400160405280600481526020016311b3333360e11b8152505b6040516020016129b89493929190614474565b6040516020818303038152906040529150836101200151612a4557816129e2856101a001516120cd565b6129f36128d5866000610168612327565b612a09612a0387600a602d612327565b8761334f565b612a1f612a1988600a602d612327565b8861334f565b604051602001612a339594939291906140d3565b60405160208183030381529060405291505b81846101200151612a8257612a5e856101a001516120cd565b604051602001612a6e91906149f8565b604051602081830303815290604052612a9c565b6040518060600160405280602f815260200161533e602f91395b612aad866060015161ffff166120cd565b612abe876060015161ffff166120cd565b612ade88606001516002612ad29190615172565b611ce8906104b06151e4565b612af289606001516002612ad29190615172565b612b008a6101a001516120cd565b8a6101200151612b2c57604051806040016040528060048152602001630233030360e41b815250612b4a565b6040518060400160405280600481526020016311b3333360e11b8152505b604051602001612b61989796959493929190614571565b60405160208183030381529060405291505092915050565b6040805160a081018252600080825260208201819052918101829052606081810183905260808201839052919060008560e00151612bc65760405180602001604052806000815250612bed565b6101c086015151604051612bdd9190602001614d47565b6040516020818303038152906040525b612bfe876060015161ffff166120cd565b612c0f886060015161ffff166120cd565b604051602001612c2193929190614e6a565b604051602081830303815290604052905060005b866020015160ff168161ffff1610156130dc5760005b875160ff1661ffff821610156130c957612c6681838a6133ed565b9350612c8c6000896101400151612c7e576010612c81565b600a5b89919060ff16612327565b945060018511612d1b5782612cdc8660001415612cd460028c60a00151612cb3919061513d565b61ffff1660028d60c00151612cc8919061513d565b8c919061ffff16612327565b878c8c6134d5565b604051602001612ced929190613e06565b60408051601f19818403018152919052608089018051919450612d0f8261527f565b61ffff169052506130b7565b60038511612d9f576000612d4a8960a0015161ffff168a60c0015161ffff168a6123279092919063ffffffff16565b905083612d5e876005141583888d8d61353a565b604051602001612d6f929190613e06565b60408051601f1981840301815291905260808a018051919550612d918261527f565b61ffff169052506130b79050565b8460041415612de75782612dbf60018a60a0015161ffff16878c8c61353a565b612dd560008b60c0015161ffff16888d8d61353a565b604051602001612ced93929190613e35565b8460051415612eb757600060028960c00151612e03919061513d565b61ffff1690506000612e1760008a8c6135af565b905084612e7583886040015161ffff16612e319190615207565b84896060015161ffff16612e459190615207565b858a6040015161ffff16612e599190615125565b868b6060015161ffff16612e6d9190615125565b866000613703565b604051602001612e86929190613e06565b60408051601f1981840301815291905260808b018051919650612ea88261527f565b61ffff169052506130b7915050565b6008851161302b5760006007861015612ee05760028960c00151612edb919061513d565b612ef1565b60028960a00151612ef1919061513d565b61ffff16905060078610156000612f09818b8d6135af565b905060608860081415612f2f57612f2c60008d60c0015161ffff168a8f8f61353a565b90505b8681612f8b868b6040015161ffff16612f489190615207565b878c6060015161ffff16612f5c9190615207565b888d6040015161ffff16612f709190615125565b898e6060015161ffff16612f849190615125565b888a613703565b612fe5878c6040015161ffff16612fa29190615125565b888d6060015161ffff16612fb69190615207565b898e6040015161ffff16612fca9190615207565b8a8f6060015161ffff16612fde9190615125565b898b613703565b604051602001612ff89493929190613e78565b60408051601f1981840301815291905260808d01805191985061301a8261527f565b61ffff169052506130b79350505050565b600a8510156130b757826130598660081460028b60c0015161304d919061513d565b61ffff16878c8c6134d5565b61307b600160028c60a0015161306f919061513d565b61ffff16888d8d6134d5565b60405160200161308d93929190613e35565b60408051601f198184030181529190526080890180519194506130af8261527f565b61ffff169052505b806130c18161527f565b915050612c4b565b50806130d48161527f565b915050612c35565b50806040516020016130ee9190614549565b604051602081830303815290604052935050505092915050565b60006001600160e01b031982166380ac58cd60e01b148061313957506001600160e01b03198216635b5e139f60e01b145b8061054257506301ffc9a760e01b6001600160e01b0319831614610542565b6001600160a01b0383166131b3576131ae81600980546000838152600a60205260408120829055600182018355919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0155565b6131d6565b816001600160a01b0316836001600160a01b0316146131d6576131d6838261379e565b6001600160a01b0382166131ed576108118161383b565b826001600160a01b0316826001600160a01b031614610811576108118282613914565b6001600160a01b0382166132665760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610597565b61326f81611503565b156132bc5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610597565b6132c8600083836120c2565b6001600160a01b03821660009081526004602052604081208054600192906132f1908490615125565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60606133616128d583600060ff612327565b6133716128d58460006064612327565b6133816128d58560286064612327565b600a861061339e57604051806020016040528060008152506133b9565b604051806040016040528060018152602001600360fc1b8152505b6133c2876120cd565b6040516020016133d6959493929190614a72565b604051602081830303815290604052905092915050565b6040805160a081018252600080825260208201819052918101829052606081018290526080810191909152600082604001518561342a9190615172565b9050600083604001518561343e9190615172565b90506040518060a001604052808361ffff1681526020018261ffff16815260200160028660400151613470919061513d565b61347a9085615108565b61ffff16815260200160028660400151613494919061513d565b61349e9084615108565b61ffff16815260200187866000015160ff16886134bb9190615172565b6134c59190615108565b61ffff1690529695505050505050565b60606134e8846040015161ffff166120cd565b6134f9856060015161ffff166120cd565b613502876120cd565b61350d8986886135af565b6040516020016135209493929190614db8565b604051602081830303815290604052905095945050505050565b606061355d61354a60028761515e565b856040015161ffff166128d59190615207565b61357e61356b60028861515e565b866060015161ffff166128d59190615207565b613587876120cd565b613590886120cd565b61359b8a87896135af565b604051602001613520959493929190614790565b606060008261012001516135df57604051806040016040528060048152602001630233030360e41b8152506135fd565b6040518060400160405280600481526020016311b3333360e11b8152505b9050826101600151600281111561362457634e487b7160e01b600052602160045260246000fd5b60011415801561366e5750826101600151600281111561365457634e487b7160e01b600052602160045260246000fd5b6002148061366e5750600161366c8560006005612327565b105b156136ac576101c08301516136868560006005612327565b600581106136a457634e487b7160e01b600052603260045260246000fd5b602002015190505b846136d957806040516020016136c29190614747565b60405160208183030381529060405291505061124c565b806040516020016136ea91906149af565b6040516020818303038152906040529150509392505050565b606061370e876120cd565b613717876120cd565b613720876120cd565b613729876120cd565b8686613744576040518060200160405280600081525061376e565b6040518060400160405280601081526020016f7374726f6b652d77696474683d27382760801b8152505b60405160200161378396959493929190614c7d565b60405160208183030381529060405290509695505050505050565b600060016137ab84610d35565b6137b59190615207565b600083815260086020526040902054909150808214613808576001600160a01b03841660009081526007602090815260408083208584528252808320548484528184208190558352600890915290208190555b5060009182526008602090815260408084208490556001600160a01b039094168352600781528383209183525290812055565b60095460009061384d90600190615207565b6000838152600a60205260408120546009805493945090928490811061388357634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905080600983815481106138b257634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255828152600a909152604080822084905585825281205560098054806138f857634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b600061391f83610d35565b6001600160a01b039093166000908152600760209081526040808320868452825280832085905593825260089052919091209190915550565b8280546139649061524a565b90600052602060002090601f01602090048101928261398657600085556139cc565b82601f1061399f57805160ff19168380011785556139cc565b828001600101855582156139cc579182015b828111156139cc5782518255916020019190600101906139b1565b506139d8929150613a03565b5090565b6040518060a001604052806005905b60608152602001906001900390816139eb5790505090565b5b808211156139d85760008155600101613a04565b600067ffffffffffffffff831115613a3257613a326152fc565b613a45601f8401601f19166020016150d7565b9050828152838383011115613a5957600080fd5b828260208301376000602084830101529392505050565b600082601f830112613a80578081fd5b61124c83833560208501613a18565b600060208284031215613aa0578081fd5b813561124c81615312565b60008060408385031215613abd578081fd5b8235613ac881615312565b91506020830135613ad881615312565b809150509250929050565b600080600060608486031215613af7578081fd5b8335613b0281615312565b92506020840135613b1281615312565b929592945050506040919091013590565b60008060008060808587031215613b38578081fd5b8435613b4381615312565b93506020850135613b5381615312565b925060408501359150606085013567ffffffffffffffff811115613b75578182fd5b8501601f81018713613b85578182fd5b613b9487823560208401613a18565b91505092959194509250565b60008060408385031215613bb2578182fd5b8235613bbd81615312565b915060208381013567ffffffffffffffff80821115613bda578384fd5b818601915086601f830112613bed578384fd5b813581811115613bff57613bff6152fc565b8060051b9150613c108483016150d7565b8181528481019084860184860187018b1015613c2a578788fd5b8795505b83861015613c4c578035835260019590950194918601918601613c2e565b508096505050505050509250929050565b60008060408385031215613c6f578182fd5b8235613c7a81615312565b915060208301358015158114613ad8578182fd5b60008060408385031215613ca0578182fd5b8235613cab81615312565b946020939093013593505050565b600060208284031215613cca578081fd5b5035919050565b600060208284031215613ce2578081fd5b813561124c81615327565b600060208284031215613cfe578081fd5b815161124c81615327565b600060208284031215613d1a578081fd5b815161124c81615312565b600060208284031215613d36578081fd5b813567ffffffffffffffff811115613d4c578182fd5b610c6684828501613a70565b60008060408385031215613d6a578182fd5b82359150602083013567ffffffffffffffff811115613d87578182fd5b613d9385828601613a70565b9150509250929050565b60008060408385031215613daf578182fd5b50508035926020909101359150565b60008151808452613dd681602086016020860161521e565b601f01601f19169290920160200192915050565b60008151613dfc81856020860161521e565b9290920192915050565b60008351613e1881846020880161521e565b835190830190613e2c81836020880161521e565b01949350505050565b60008451613e4781846020890161521e565b845190830190613e5b81836020890161521e565b8451910190613e6e81836020880161521e565b0195945050505050565b60008551613e8a818460208a0161521e565b855190830190613e9e818360208a0161521e565b8551910190613eb181836020890161521e565b8451910190613ec481836020880161521e565b019695505050505050565b60008251613ee181846020870161521e565b7f2c226c6963656e7365223a2246756c6c206f776e6572736869702077697468209201918252507f756e6c696d6974656420636f6d6d65726369616c207269676874732e222c22636020820152743932b0ba37b9111d11203234b2bb30b9323ab6b81160591b60408201527f2c226465736372697074696f6e223a2247656e657369733a204120736565642c60558201526f081cdbdb59481b1bdd994b081d1a185d60821b607582015261277360f01b60858201527f616c6c2069742074616b65732e5c6e5c6e47656e65736973206973207468652060878201527f6669727374206f6620746865205b736f6c5d536565646c696e67732c20616e2060a78201527f6578706572696d656e74206f662061727420616e6420636f6c6c65637469626c60c78201527f65204e46547320313030252067656e657261746564207769746820536f6c696460e78201527f6974792e5c6e6279204064696576617264756d705c6e5c6e4c6963656e73653a6101078201527f2046756c6c206f776e657273686970207769746820756e6c696d6974656420636101278201527f6f6d6d65726369616c207269676874732e5c6e5c6e4d6f726520696e666f20616101478201527f742068747470733a2f2f736f6c536565646c696e67732e61727422000000000061016782015261018201919050565b600086516140e5818460208b0161521e565b80830190507f3c6c696e6561724772616469656e742069643d2767656e657369732d6772616481526469656e742d60d81b6020820152865161412e816025840160208b0161521e565b7f27206772616469656e745472616e73666f726d3d27726f74617465280000000060259290910191820152855161416c816041840160208a0161521e565b7f29273e3c73746f70206f66667365743d273025272073746f702d636f6c6f723d60419290910191820152602760f81b606182015284516141b481606284016020890161521e565b7f272f3e3c73746f70206f66667365743d2731303025272073746f702d636f6c6f6062929091019182015262723d2760e81b608282015261421c6141fb6085830186613dea565b741390179f1e17b634b732b0b923b930b234b2b73a1f60591b815260150190565b98975050505050505050565b60008651602061423b8285838c0161521e565b7f3c74657874207374796c653d27666f6e743a20626f6c6420313170782073616e9184019182527f732d73657269663b2720746578742d616e63686f723d27656e642720783d270081830152875161429981603f85018b850161521e565b642720793d2760d81b603f939091019283015286516142be8160448501848b0161521e565b602760f81b6044939091019283015285516142df8160458501848a0161521e565b613e2360f01b604593909101928301528451614301816047850184890161521e565b614333614320604783860101661e17ba32bc3a1f60c91b815260070190565b661e17b9bb339f1160c91b815260070190565b9a9950505050505050505050565b60008851614353818460208d0161521e565b7f2c2270726f70657274696573223a7b22436f6c6f7273223a2200000000000000908301908152885161438d816019840160208d0161521e565b6911161123b934b2111d1160b11b6019929091019182015287516143b8816023840160208c0161521e565b6911161126b7b232911d1160b11b6023929091019182015286516143e381602d840160208b0161521e565b6e1116112932b73232b934b733911d1160891b602d9290910191820152855161441381603c840160208a0161521e565b61446561445761445161444461443e603c868801016911161129b4bd32911d1160b11b8152600a0190565b8a613dea565b601160f91b815260010190565b87613dea565b617d7d60f01b815260020190565b9b9a5050505050505050505050565b60008551614486818460208a0161521e565b6a01e3830ba3410321e93a6960ad1b90830190815285516144ae81600b840160208a0161521e565b6a010181026101810181018160ad1b600b929091019182015284516144da81601684016020890161521e565b75272066696c6c3d276e6f6e6527207374726f6b653d2760501b60169290910191820152835161451181602c84016020880161521e565b7f27207374726f6b652d77696474683d2734272f3e3c2f7061747465726e3e0000602c9290910191820152604a019695505050505050565b6000825161455b81846020870161521e565b631e17b39f60e11b920191825250600401919050565b60008951614583818460208e0161521e565b80830190507f3c2f646566733e3c726563742077696474683d273130302527206865696768748152751e939898181293903334b6361e9391b333331390179f60511b602082015289516145dd816036840160208e0161521e565b683c7265637420783d2760b81b60369290910191820152885161460781603f840160208d0161521e565b642720793d2760d81b603f9290910191820152875161462d816044840160208c0161521e565b68272077696474683d2760b81b604492909101918201526144656146ce6146c86146b16146ab61468261467c614666604d89018f613dea565b6927206865696768743d2760b01b8152600a0190565b8c613dea565b7f272066696c6c3d2775726c282367656e657369732d677269642d0000000000008152601a0190565b89613dea565b6a2927207374726f6b653d2760a81b8152600b0190565b86613dea565b74139039ba3937b5b296bbb4b23a341e939a1390179f60591b815260150190565b6000825161470181846020870161521e565b9190910192915050565b6000835161471d81846020880161521e565b601560f91b908301908152835161473b81600184016020880161521e565b01600101949350505050565b68207374726f6b653d2760b81b81526000825161476b81600985016020870161521e565b6d013903334b6361e93b737b73293960951b6009939091019283015250601701919050565b683c7265637420783d2760b81b8152600086516147b4816009850160208b0161521e565b642720793d2760d81b60099184019182015286516147d981600e840160208b0161521e565b68272077696474683d2760b81b600e92909101918201528551614803816017840160208a0161521e565b6927206865696768743d2760b01b60179290910191820152845161482e81602184016020890161521e565b602760f81b60219290910191820152835161485081602284016020880161521e565b61486760228284010161179f60f11b815260020190565b9998505050505050505050565b6c47656e657369732e736f6c202360981b81526000825161489c81600d85016020870161521e565b91909101600d0192915050565b7f3c646566733e3c7061747465726e2069643d2767656e657369732d677269642d81526000602087516148e181838601848c0161521e565b8084019050642720783d2760d81b8282015287516149058160258401858c0161521e565b642720793d2760d81b60259290910191820152865161492a81602a8401858b0161521e565b68272077696474683d2760b81b602a929091019182015285516149538160338401858a0161521e565b6927206865696768743d2760b01b60339290910191820152845161497d81603d840185890161521e565b614333603d828401017f27207061747465726e556e6974733d277573657253706163654f6e557365273e815260200190565b662066696c6c3d2760c81b8152600082516149d181600785016020870161521e565b6f0139039ba3937b5b29e93b737b73293960851b6007939091019283015250601701919050565b7f3c726563742077696474683d273130302527206865696768743d27313030252781527f2066696c6c3d2775726c282367656e657369732d6772616469656e742d000000602082015260008251614a5681603d85016020870161521e565b64149390179f60d91b603d939091019283015250604201919050565b640d0e6d8c2560db1b815260008651614a92816005850160208b0161521e565b600b60fa1b6005918401918201528651614ab3816006840160208b0161521e565b61094b60f21b600692909101918201528551614ad6816008840160208a0161521e565b631296181760e11b600892909101918201528451614afb81600c84016020890161521e565b8451910190614b1181600c84016020880161521e565b602960f81b600c9290910191820152600d01979650505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b757466382c7b226e616d81526332911d1160e11b602082015260008451614b7381602485016020890161521e565b7f222c22696d616765223a22646174613a696d6167652f7376672b786d6c3b757460249184019182015262198e0b60ea1b60448201527f3c73766720786d6c6e733d27687474703a2f2f7777772e77332e6f72672f323060478201527f30302f7376672720786d6c6e733a786c696e6b3d27687474703a2f2f7777772e60678201527f77332e6f72672f313939392f786c696e6b272076696577426f783d273020302060878201527f313230302031323030272077696474683d273132303027206865696768743d2760a78201526518991818139f60d11b60c78201528451614c638160cd84016020890161521e565b614c7260cd8284010186613dea565b979650505050505050565b6a01e3830ba3410321e93a6960ad1b815260008751614ca381600b850160208c0161521e565b8083019050600160fd1b80600b8301528851614cc681600c850160208d0161521e565b6201026160ed1b600c93909101928301528751614cea81600f850160208c0161521e565b600f9201918201528551614d05816010840160208a0161521e565b602760f81b601092909101918201528451614d2781601184016020890161521e565b614333614d3960118385010187613dea565b61179f60f11b815260020190565b7f7374796c653d2766696c7465723a2064726f702d736861646f772831367078208152690189b383c101918383c160b51b602082015260008251614d9281602a85016020870161521e565b6e2920696e7665727428383025293b2760881b602a939091019283015250603901919050565b6b3c636972636c652063783d2760a01b815260008551614ddf81600c850160208a0161521e565b65272063793d2760d01b600c918401918201528551614e05816012840160208a0161521e565b642720723d2760d81b601292909101918201528451614e2b81601784016020890161521e565b602760f81b601792909101918201528351614e4d81601884016020880161521e565b61179f60f11b60189290910191820152601a019695505050505050565b6201e33960ed1b815260008451614e8881600385016020890161521e565b7f207374726f6b652d77696474683d273427207374726f6b652d6c696e656361706003918401918201527f3d27726f756e6427207472616e73666f726d3d277472616e736c61746528000060238201528451614eeb81604184016020890161521e565b600b60fa1b604192909101918201528351614f0d81604284016020880161521e565b6214939f60e91b6042929091019182015260450195945050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090614f5d90830184613dbe565b9695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015614fa85783516001600160a01b031683529284019291840191600101614f83565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015614fa857835183529284019291840191600101614fd0565b60208152600061124c6020830184613dbe565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b604051601f8201601f1916810167ffffffffffffffff81118282101715615100576151006152fc565b604052919050565b600061ffff808316818516808303821115613e2c57613e2c6152d0565b60008219821115615138576151386152d0565b500190565b600061ffff80841680615152576151526152e6565b92169190910492915050565b60008261516d5761516d6152e6565b500490565b600061ffff80831681851681830481118215151615615193576151936152d0565b02949350505050565b60008160001904831182151516156151b6576151b66152d0565b500290565b600060ff821660ff84168160ff04811182151516156151dc576151dc6152d0565b029392505050565b600061ffff838116908316818110156151ff576151ff6152d0565b039392505050565b600082821015615219576152196152d0565b500390565b60005b83811015615239578181015183820152602001615221565b83811115610ff65750506000910152565b600181811c9082168061525e57607f821691505b6020821081141561087e57634e487b7160e01b600052602260045260246000fd5b600061ffff80831681811415615297576152976152d0565b6001019392505050565b60006000198214156152b5576152b56152d0565b5060010190565b6000826152cb576152cb6152e6565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610a0e57600080fd5b6001600160e01b031981168114610a0e57600080fdfe3c726563742077696474683d273130302527206865696768743d2731303025272066696c6c3d272330303027202f3ea2646970667358221220b8877e17e2b2e81d0823ff200e5c452a140e9691a88185214b4cc565389017b164736f6c63430008040033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c10000000000000000000000002b0f5a983316b4fc980500b3e973d58765770bd2000000000000000000000000000000000000000000000000000000000000001847656e65736973202d205b736f6c5d536565646c696e67730000000000000000000000000000000000000000000000000000000000000000000000000000000653534753233000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000047697066733a2f2f697066732f516d57513256324b69536a4451514a624b3468746b4152697742636d7456734761794e42717a57594b43486b74312f47656e657369732e6a736f6e00000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : name_ (string): Genesis - [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
-----Encoded View---------------
13 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [3] : 000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1
Arg [4] : 0000000000000000000000002b0f5a983316b4fc980500b3e973d58765770bd2
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000018
Arg [6] : 47656e65736973202d205b736f6c5d536565646c696e67730000000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [8] : 5353475323300000000000000000000000000000000000000000000000000000
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000047
Arg [10] : 697066733a2f2f697066732f516d57513256324b69536a4451514a624b346874
Arg [11] : 6b4152697742636d7456734761794e42717a57594b43486b74312f47656e6573
Arg [12] : 69732e6a736f6e00000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.