Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Multichain Info
No addresses found
Latest 24 from a total of 24 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw Funds | 21911036 | 25 days ago | IN | 0 ETH | 0.00004563 | ||||
Buy Snake | 20458150 | 228 days ago | IN | 0.032 ETH | 0.0003562 | ||||
Withdraw Funds | 20023414 | 289 days ago | IN | 0 ETH | 0.00018243 | ||||
Buy Snake | 20023408 | 289 days ago | IN | 0.032 ETH | 0.00056292 | ||||
Buy Snake | 20023401 | 289 days ago | IN | 0.032 ETH | 0.00053532 | ||||
Buy Snake | 20023387 | 289 days ago | IN | 0.032 ETH | 0.00052299 | ||||
Buy Snake | 20023381 | 289 days ago | IN | 0.032 ETH | 0.00044813 | ||||
Withdraw Funds | 20023299 | 289 days ago | IN | 0 ETH | 0.00017372 | ||||
Buy Snake | 20023291 | 289 days ago | IN | 0.032 ETH | 0.00053951 | ||||
Buy Snake | 15746139 | 889 days ago | IN | 0.04 ETH | 0.00154115 | ||||
Buy Snake | 15745790 | 889 days ago | IN | 0.04 ETH | 0.00163845 | ||||
Buy Snake | 15745365 | 889 days ago | IN | 0.04 ETH | 0.00157871 | ||||
Set Front End | 15697370 | 896 days ago | IN | 0 ETH | 0.00080037 | ||||
Withdraw Funds | 14989534 | 1006 days ago | IN | 0 ETH | 0.00069642 | ||||
Set Approval For... | 14854124 | 1029 days ago | IN | 0 ETH | 0.00124884 | ||||
Buy Snake | 14854092 | 1029 days ago | IN | 0.04 ETH | 0.0042879 | ||||
Buy Snake | 14768361 | 1043 days ago | IN | 0.04 ETH | 0.00856955 | ||||
Set Front End | 14733761 | 1048 days ago | IN | 0 ETH | 0.00086767 | ||||
Set Front End | 14732848 | 1048 days ago | IN | 0 ETH | 0.00138571 | ||||
Buy Snake | 14732367 | 1048 days ago | IN | 0.04 ETH | 0.00296509 | ||||
Withdraw Funds | 14728144 | 1049 days ago | IN | 0 ETH | 0.00096337 | ||||
Buy Snake | 14728137 | 1049 days ago | IN | 0.032 ETH | 0.0028632 | ||||
Buy Snake | 14728099 | 1049 days ago | IN | 0.032 ETH | 0.00288871 | ||||
Buy Snake | 14716384 | 1051 days ago | IN | 0.032 ETH | 0.00365709 |
Loading...
Loading
Contract Name:
Snake
Compiler Version
v0.8.7+commit.e28d00a7
Optimization Enabled:
Yes with 100 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // ,--. ,--. // // .--.--. ,--.'| ,---, ,--/ /| ,---,. // // / / '. ,--,: : | ' .' \ ,---,': / ' ,' .' | // // | : /`. / ,`--.'`| ' : / ; '. : : '/ / ,---.' | // // ; | |--` | : : | | : : \ | ' , | | .' // // | : ;_ : | \ | : : | /\ \ ' | / : : |-, // // \ \ `. | : ' '; | | : ' ;. : | ; ; : | ;/| // // `----. \ ' ' ;. ; | | ;/ \ \ : ' \ | : .' // // __ \ \ | | | | \ | ' : | \ \ ,' | | ' | | |-, // // / /`--' / ' : | ; .' | | ' '--' ' : |. \ ' : ;/| // // '--'. / | | '`--' | : : | | '_\.' | | | // // `--'---' ' : | | | ,' ' : | | : .' // // ; |.' `--'' ; |,' | | ,' // // '---' '---' `----' // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // pragma solidity 0.8.7; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "./SnakeLib.sol"; import "./ICalculator.sol"; contract Snake is ERC721, ERC2981, Ownable { using Counters for Counters.Counter; Counters.Counter private tokenSupply; uint public price = 0.04 ether; uint public maxSupply = 10_000; string public frontEnd = "TBD"; ICalculator public calculator = ICalculator(0xC3B88A12D8Cda6b9802C30be4bb18BDd1828b317); uint public CalcOwnerMultiplier; mapping(uint => SnakeLib.ColorScheme) internal colorIdToScheme; mapping(uint => uint) internal idToSchemeIndex; event TokenMint(address purchaser, uint mints); constructor() ERC721("Snake", "SNAKE") { _setDefaultRoyalty(address(this), 250); setDiscount(80); colorIdToScheme[1] = SnakeLib.ColorScheme( "a612de", "a612de", "a612de", "a612de", "a612de", "EBDEF0", "ffe599", "27AE60", "FF5D3B" ); colorIdToScheme[2] = SnakeLib.ColorScheme( "227c9d", "227c9d", "227c9d", "227c9d", "227c9d", "fef9ef", "17c3b2", "fe6d73", "ffcb77" ); colorIdToScheme[3] = SnakeLib.ColorScheme( "2c6e49", "4c956c", "4c956c", "4c956c", "4c956c", "ffc9b9", "fefee3", "ffc9b9", "4c956c" ); colorIdToScheme[4] = SnakeLib.ColorScheme( "0b090a", "0b090a", "0b090a", "0b090a", "0b090a", "ba181b", "b1a7a6", "ba181b", "0b090a" ); colorIdToScheme[5] = SnakeLib.ColorScheme( "fee440", "fee440", "f15bb5", "f15bb5", "fee440", "9b5de5", "00f5d4", "f15bb5", "fee440" ); } /* * Takes an array of numbers between 1-5 * length of schemeIds is the number of tokens to mint. Max amount is 5 */ function buySnake(uint[] memory schemeIds) public payable { uint totalMints = schemeIds.length; require(msg.value == getFinalPrice(totalMints, msg.sender), "wrong price"); require(totalMints <= 5 && totalMints > 0, "incorrect number"); require(tokenSupply.current() + totalMints <= maxSupply, "exceeds max supply"); for(uint i=0; i<totalMints; i++) { require(schemeIds[i] > 0 && schemeIds[i]<=5, "color doesn't exist"); tokenSupply.increment(); uint256 newItemId = tokenSupply.current(); idToSchemeIndex[newItemId] = schemeIds[i]; _safeMint(msg.sender, newItemId); } emit TokenMint(msg.sender, totalMints); } function totalSupply() public view returns(uint) { return tokenSupply.current(); } function getFinalPrice(uint amount, address user) public view returns (uint) { uint finalPrice = price * amount; if(calculator.balanceOf(user) > 0) { finalPrice = (finalPrice * CalcOwnerMultiplier) / 100; } return finalPrice; } function tokenURI(uint id) public view override returns (string memory) { address owner = ownerOf(id); require(_exists(id), "does not exist"); uint schemeIndex = idToSchemeIndex[id]; SnakeLib.ColorScheme memory scheme = colorIdToScheme[schemeIndex]; SnakeLib.SnakeParams memory snakeParams = SnakeLib.SnakeParams({ _owner: owner, _id: id, _schemeIndex: schemeIndex, _scheme: scheme, _frontEnd: frontEnd }); return SnakeLib.generateTokenURI(snakeParams); } // OWNER FUNCTIONS function withdrawFunds() public onlyOwner { uint amount = address(this).balance; Address.sendValue(payable(owner()), amount); } function setFrontEnd(string memory _frontEnd) public onlyOwner { frontEnd = _frontEnd; } function setDiscount(uint multiplier) public onlyOwner { require(multiplier < 100); CalcOwnerMultiplier = multiplier; } // REQUIRED OVERRIDES: function supportsInterface(bytes4 interfaceId) public view override(ERC721,ERC2981) returns (bool) { return super.supportsInterface(interfaceId); } function _burn(uint256 tokenId) internal virtual override { super._burn(tokenId); _resetTokenRoyalty(tokenId); } }
pragma solidity 0.8.7; interface ICalculator { function balanceOf(address owner) external view returns (uint256 balance); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.7; pragma experimental ABIEncoderV2; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/Base64.sol"; library SnakeLib { struct ColorScheme { string metadata; string title; string start; string directions; string score; string background; string map; string food; string snake; } struct SnakeParams { address _owner; uint _id; uint _schemeIndex; ColorScheme _scheme; string _frontEnd; } string internal constant svgStart = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 1000 1000">'; string internal constant svgMid = '<g stroke="#000" > <rect class="background" x="0" y="0" rx="15" width="1000" height="1000"/> <rect class="map" x="200" y="200" width="600" height="600"/> </g> <text y="120" x="50%" text-anchor="middle" class="title">snake</text> <text id="startText" x="50%" y="600" text-anchor="middle" class="start" ></text> <text id="directions" x="50%" y="650" text-anchor="middle" class="directions" ></text> <text x="900" y="250" text-anchor="middle" class="score" > Score:</text> <text id="scoreCounter" x="830" y="300" class="score" ></text> <text x="900" y="550" text-anchor="middle" class="highScore" > high scores:</text> <text id="hs1" x="830" y="600" class="score" ></text> <text id="hs2" x="830" y="650" class="score" ></text> <text id="hs3" x="830" y="700" class="score" ></text> <text id="hs4" x="830" y="750" class="score" ></text> <text id="hs5" x="830" y="800" class="score" ></text>'; string internal constant svgEnd = '<rect id="snake" class="snake" x="500" y="500" width="20" height="20"/> <rect id="food" class="food" x="-50" y="-50" width="20" height="20"/> <script type="text/javascript"><![CDATA[var foodCoords,KEY={w:87,a:65,s:83,d:68,space:32},moveSpeed=20,score=0,highScores=[],snakeHead=document.getElementById("snake"),svg=document.getElementsByTagName("svg")[0],startText=document.getElementById("startText"),directions=document.getElementById("directions"),food=document.getElementById("food"),scoreCounter=document.getElementById("scoreCounter");startText.textContent="press space to start",directions.textContent="then w, a, s, d";var snakeBody=[];isTurning=!1,isRunning=!1;var currentDirection="right";document.documentElement.addEventListener("keydown",e=>{handleInput(e)},!1);var timerFunction=null;function startGame(){null==timerFunction&&(timerFunction=setInterval(go,80),random_food(),startText.textContent="",directions.textContent="",scoreCounter.textContent=score,isRunning=!0)}function updateScore(){score+=1,scoreCounter.textContent=score}function random_food(){var e=Math.floor(30*Math.random()),t=Math.floor(30*Math.random());e+200>780&&(e=780),t+200>780&&(t=780),foodCoords=[20*e+200,20*t+200],food.setAttribute("x",20*e+200),food.setAttribute("y",20*t+200)}function updateHighScore(){var e=highScores.length;if(score<=highScores[e-1]||highScores.includes(score))return;e>=5&&highScores.pop();let t=highScores.findIndex(e=>score>e);highScores.splice(t,0,score);for(var n=1;n<=highScores.length;n++){document.getElementById(`hs${n}`).textContent=highScores[n-1]}}function reset(){if(1!=isRunning){document.documentElement.removeEventListener("keydown",function(e){handleInput(e)},!1),clearInterval(timerFunction),timerFunction=null,isTurning=!1;for(var e=0;e<snakeBody.length;e++)svg.removeChild(snakeBody[e]);snakeBody=[],scoreCounter.textContent=score=0,food.setAttribute("x",-50),food.setAttribute("y",-50),startText.textContent="press space to start",directions.textContent="then w, a, s, d",snakeHead.setAttribute("x",500),snakeHead.setAttribute("y",500),document.documentElement.addEventListener("keydown",function(e){handleInput(e)},!1)}}function appendSnake(){var e=snakeHead.cloneNode(!0),t=snakeBody.length;t>0&&(e.setAttribute("x",1*snakeBody[t-1].getAttribute("x")),e.setAttribute("y",1*snakeBody[t-1].getAttribute("y"))),snakeBody.push(e),svg.appendChild(e)}function updateSnake(){for(var e=1*snakeHead.getAttribute("x"),t=1*snakeHead.getAttribute("y"),n=snakeBody.length-1;n>=0;n--)if(0==n)snakeBody[0].setAttribute("x",e),snakeBody[0].setAttribute("y",t);else{var o=1*snakeBody[n-1].getAttribute("x"),r=1*snakeBody[n-1].getAttribute("y");if(snakeBody[n].setAttribute("x",o),snakeBody[n].setAttribute("y",r),o==e&&r==t){isRunning=!1,updateHighScore(),reset();break}}isTurning=!1}function go(){var e=1*snakeHead.getAttribute("x"),t=1*snakeHead.getAttribute("y");if(updateSnake(),1==isRunning)switch(currentDirection){case"right":snakeHead.setAttribute("x",e+=moveSpeed);break;case"left":snakeHead.setAttribute("x",e-=moveSpeed);break;case"up":snakeHead.setAttribute("y",t-=moveSpeed);break;case"down":snakeHead.setAttribute("y",t+=moveSpeed)}(e<=180||e>=800||t<=180||t>=800)&&(isRunning=!1,updateHighScore(),reset()),e==foodCoords[0]&&t==foodCoords[1]&&(random_food(),updateScore(),appendSnake())}function handleInput(e){if(e.keyCode==KEY.space&&startGame(),1!=isTurning)switch(isTurning=!0,e.keyCode){case KEY.w:"down"!=currentDirection&&(currentDirection="up");break;case KEY.s:"up"!=currentDirection&&(currentDirection="down");break;case KEY.a:"right"!=currentDirection&&(currentDirection="left");break;case KEY.d:"left"!=currentDirection&&(currentDirection="right")}}]]></script> </svg>'; function base64ImageUrl(SnakeParams memory snakeParams) internal pure returns (string memory) { string memory metadata = getMetaData(snakeParams._owner, snakeParams._id); string memory styles = getStyle(snakeParams._scheme); string memory svg = Base64.encode(abi.encodePacked( svgStart, styles, svgMid, metadata, svgEnd )); return string(abi.encodePacked("data:image/svg+xml;base64,",svg)); } function getMetaData(address owner, uint id) internal pure returns (string memory){ string memory _owner = Strings.toHexString(uint160(owner), 20); string memory _id = Strings.toString(id); return string(abi.encodePacked( '<g class="metadata"> <text x="50" y="900" >owner: ', _owner, '</text> <text x="50" y="950">', _id, '/10000</text> </g>' )); } function getStyle(ColorScheme memory scheme) internal pure returns(string memory ) { bytes memory style1 = abi.encodePacked( '<style> .metadata { font: 30px Courier; fill: #', scheme.metadata, ' } .title { font: 80px Courier; fill: #', scheme.title, ' } .start {font: 35px Courier; fill-opacity: .70; fill: #', scheme.start, '} .directions {font: italic 30px Courier; fill-opacity: .70; fill: #', scheme.directions, ' } .score {font: 40px Courier; fill: #', scheme.score); bytes memory style2 = abi.encodePacked( style1, '} .highScore {font: 25px Courier; fill: #', scheme.score, '} .background {fill: #', scheme.background, '} .map {fill: #', scheme.map, '} .food {stroke: #000; fill: #', scheme.food, '} .snake{stroke: #000; fill: #', scheme.snake, '} </style>' ); return string(style2); } function generateTokenURI(SnakeParams memory snakeParams) internal pure returns(string memory tokenURI) { string memory imageUrl = base64ImageUrl(snakeParams); string memory base64Html = string(abi.encodePacked( 'data:text/html;base64,', Base64.encode(abi.encodePacked('<!DOCTYPE html> <html><object type="image/svg+xml" data="', imageUrl, '" alt="snake"></object></html>' )))); bytes memory json1 = abi.encodePacked( '{"name": "Snake #', Strings.toString(snakeParams._id), '", "description": "Fully on chain game of Snake. To play, simply copy the image url and paste it in a web browser. Or, visit the [Official Website](', snakeParams._frontEnd, ') to view and play your games.", "external_url":"', snakeParams._frontEnd, '", "attributes": [{"trait_type": "Color Scheme", "value":"', Strings.toString(snakeParams._schemeIndex), '"}], "owner":"' ); bytes memory json2 = abi.encodePacked( json1, Strings.toHexString(uint160(snakeParams._owner), 20), '", "image": "', imageUrl, '", "animation_url":"', base64Html, '"}' ); tokenURI = string( abi.encodePacked( 'data:application/json;base64,', Base64.encode(json2))); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/common/ERC2981.sol) pragma solidity ^0.8.0; import "../../interfaces/IERC2981.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information. * * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first. * * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the * fee is specified in basis points by default. * * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. * * _Available since v4.5._ */ abstract contract ERC2981 is IERC2981, ERC165 { struct RoyaltyInfo { address receiver; uint96 royaltyFraction; } RoyaltyInfo private _defaultRoyaltyInfo; mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } /** * @inheritdoc IERC2981 */ function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) { RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId]; if (royalty.receiver == address(0)) { royalty = _defaultRoyaltyInfo; } uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator(); return (royalty.receiver, royaltyAmount); } /** * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an * override. */ function _feeDenominator() internal pure virtual returns (uint96) { return 10000; } /** * @dev Sets the royalty information that all ids in this contract will default to. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: invalid receiver"); _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Removes default royalty information. */ function _deleteDefaultRoyalty() internal virtual { delete _defaultRoyaltyInfo; } /** * @dev Sets the royalty information for a specific token id, overriding the global default. * * Requirements: * * - `tokenId` must be already minted. * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setTokenRoyalty( uint256 tokenId, address receiver, uint96 feeNumerator ) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: Invalid parameters"); _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Resets royalty information for the token id back to the global default. */ function _resetTokenRoyalty(uint256 tokenId) internal virtual { delete _tokenRoyaltyInfo[tokenId]; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Base64.sol) pragma solidity ^0.8.0; /** * @dev Provides a set of functions to operate with Base64 strings. * * _Available since v4.5._ */ library Base64 { /** * @dev Base64 Encoding/Decoding Table */ string internal constant _TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /** * @dev Converts a `bytes` to its Bytes64 `string` representation. */ function encode(bytes memory data) internal pure returns (string memory) { /** * Inspired by Brecht Devos (Brechtpd) implementation - MIT licence * https://github.com/Brechtpd/base64/blob/e78d9fd951e7b0977ddca77d92dc85183770daf4/base64.sol */ if (data.length == 0) return ""; // Loads the table into memory string memory table = _TABLE; // Encoding takes 3 bytes chunks of binary data from `bytes` data parameter // and split into 4 numbers of 6 bits. // The final Base64 length should be `bytes` data length multiplied by 4/3 rounded up // - `data.length + 2` -> Round up // - `/ 3` -> Number of 3-bytes chunks // - `4 *` -> 4 characters for each chunk string memory result = new string(4 * ((data.length + 2) / 3)); assembly { // Prepare the lookup table (skip the first "length" byte) let tablePtr := add(table, 1) // Prepare result pointer, jump over length let resultPtr := add(result, 32) // Run over the input, 3 bytes at a time for { let dataPtr := data let endPtr := add(data, mload(data)) } lt(dataPtr, endPtr) { } { // Advance 3 bytes dataPtr := add(dataPtr, 3) let input := mload(dataPtr) // To write each character, shift the 3 bytes (18 bits) chunk // 4 times in blocks of 6 bits for each character (18, 12, 6, 0) // and apply logical AND with 0x3F which is the number of // the previous character in the ASCII table prior to the Base64 Table // The result is then added to the table to get the character to write, // and finally write it in the result pointer but with a left shift // of 256 (1 byte) - 8 (1 ASCII char) = 248 bits mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F)))) resultPtr := add(resultPtr, 1) // Advance mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F)))) resultPtr := add(resultPtr, 1) // Advance mstore8(resultPtr, mload(add(tablePtr, and(shr(6, input), 0x3F)))) resultPtr := add(resultPtr, 1) // Advance mstore8(resultPtr, mload(add(tablePtr, and(input, 0x3F)))) resultPtr := add(resultPtr, 1) // Advance } // When data `bytes` is not exactly 3 bytes long // it is padded with `=` characters at the end switch mod(mload(data), 3) case 1 { mstore8(sub(resultPtr, 1), 0x3d) mstore8(sub(resultPtr, 2), 0x3d) } case 2 { mstore8(sub(resultPtr, 1), 0x3d) } } return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface 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 `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "optimizer": { "enabled": true, "runs": 100 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"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":false,"internalType":"address","name":"purchaser","type":"address"},{"indexed":false,"internalType":"uint256","name":"mints","type":"uint256"}],"name":"TokenMint","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":[],"name":"CalcOwnerMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"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":"schemeIds","type":"uint256[]"}],"name":"buySnake","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"calculator","outputs":[{"internalType":"contract ICalculator","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"frontEnd","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":"amount","type":"uint256"},{"internalType":"address","name":"user","type":"address"}],"name":"getFinalPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","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":[],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"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":"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":"uint256","name":"multiplier","type":"uint256"}],"name":"setDiscount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_frontEnd","type":"string"}],"name":"setFrontEnd","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","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":[],"name":"withdrawFunds","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
668e1bc9bf040000600a55612710600b5560c0604052600360808190526215109160ea1b60a09081526200003791600c919062000db2565b50600d80546001600160a01b03191673c3b88a12d8cda6b9802c30be4bb18bdd1828b3171790553480156200006b57600080fd5b5060405180604001604052806005815260200164536e616b6560d81b81525060405180604001604052806005815260200164534e414b4560d81b8152508160009080519060200190620000c092919062000db2565b508051620000d690600190602084019062000db2565b505050620000f3620000ed62000be860201b60201c565b62000bec565b620001003060fa62000c3e565b6200010c605062000d43565b6040805161016081018252600661012082018181526561363132646560d01b610140840181905290835283518085018552828152602081810183905280850191909152845180860186528381528082018390528486015284518086018652838152808201839052606085015284518086018652838152808201929092526080840191909152835180850185528281526504542444546360d41b8183015260a0840152835180850185528281526566666535393960d01b8183015260c0840152835180850185528281526503237414536360d41b8183015260e084015283518085019094529083526523231aa219a160d11b838201526101008201929092526001600052600f82528051805191927f169f97de0d9a84d840042b17d3c6b9638b3d6fd9024c9eb0c7a306a17b49f88f926200024a928492019062000db2565b50602082810151805162000265926001850192019062000db2565b50604082015180516200028391600284019160209091019062000db2565b5060608201518051620002a191600384019160209091019062000db2565b5060808201518051620002bf91600484019160209091019062000db2565b5060a08201518051620002dd91600584019160209091019062000db2565b5060c08201518051620002fb91600684019160209091019062000db2565b5060e082015180516200031991600784019160209091019062000db2565b5061010082015180516200033891600884019160209091019062000db2565b5050604080516101608101825260066101208201818152650c8c8dd8ce5960d21b61014084018190529083528351808501855282815260208181018390528085019190915284518086018652838152808201839052848601528451808601865283815280820183905260608501528451808601865283815280820192909252608084019190915283518085018552828152653332b31cb2b360d11b8183015260a08401528351808501855282815265189bb199b11960d11b8183015260c0840152835180850185528281526566653664373360d01b8183015260e084015283518085019094529083526566666362373760d01b838201526101008201929092526002600052600f8252805180519193507fa74ba3945261e09fde15ba3db55005b205e61eeb4ad811ac0faa2b315bffeead926200047b9284929091019062000db2565b50602082810151805162000496926001850192019062000db2565b5060408201518051620004b491600284019160209091019062000db2565b5060608201518051620004d291600384019160209091019062000db2565b5060808201518051620004f091600484019160209091019062000db2565b5060a082015180516200050e91600584019160209091019062000db2565b5060c082015180516200052c91600684019160209091019062000db2565b5060e082015180516200054a91600784019160209091019062000db2565b5061010082015180516200056991600884019160209091019062000db2565b50506040805161016081018252600661012082018181526532633665343960d01b6101408401528252825180840184528181526534633935366360d01b6020828101829052808501929092528451808601865283815280830182905284860152845180860186528381528083018290526060850152845180860186528381528083018290526080850152845180860186528381526566666339623960d01b81840181905260a0860191909152855180870187528481526566656665653360d01b8185015260c0860152855180870187528481528084019190915260e08501528451808601909552918452838101919091526101008201929092526003600052600f8252805180519193507f45f76dafbbad695564362934e24d72eedc57f9fc1a65f39bca62176cc829682892620006a69284929091019062000db2565b506020828101518051620006c1926001850192019062000db2565b5060408201518051620006df91600284019160209091019062000db2565b5060608201518051620006fd91600384019160209091019062000db2565b50608082015180516200071b91600484019160209091019062000db2565b5060a082015180516200073991600584019160209091019062000db2565b5060c082015180516200075791600684019160209091019062000db2565b5060e082015180516200077591600784019160209091019062000db2565b5061010082015180516200079491600884019160209091019062000db2565b50506040805161016081018252600661012082018181526530623039306160d01b610140840181905290835283518085018552828152602081810183905280850191909152845180860186528381528082018390528486015284518086018652838152808201839052606085015284518086018652838152808201839052608085015284518086018652838152653130989c18b160d11b81830181905260a086019190915285518087018752848152653118b09bb09b60d11b8184015260c0860152855180870187528481528083019190915260e08501528451808601909552918452838201526101008201929092526004600052600f8252805180519193507f367ccd2d0ac16bf7110a5dffe0801fdc9452a95a1adb7e1a12fe97dd3e9a4edd92620008c79284929091019062000db2565b506020828101518051620008e2926001850192019062000db2565b50604082015180516200090091600284019160209091019062000db2565b50606082015180516200091e91600384019160209091019062000db2565b50608082015180516200093c91600484019160209091019062000db2565b5060a082015180516200095a91600584019160209091019062000db2565b5060c082015180516200097891600684019160209091019062000db2565b5060e082015180516200099691600784019160209091019062000db2565b506101008201518051620009b591600884019160209091019062000db2565b50506040805161016081018252600661012082018181526506665653434360d41b610140840181905290835283518085018552828152602081810183905280850191909152845180860186528381526566313562623560d01b81830181905285870191909152855180870187528481528083018290526060860152855180870187528481528083018490526080860152855180870187528481526539623564653560d01b8184015260a086015285518087018752848152650c0c198d590d60d21b8184015260c0860152855180870187528481528083019190915260e08501528451808601909552918452838201526101008201929092526005600052600f8252805180519193507f6bda57492eba051cb4a12a1e19df47c9755d78165341d4009b1d09b3f36162049262000af09284929091019062000db2565b50602082810151805162000b0b926001850192019062000db2565b506040820151805162000b2991600284019160209091019062000db2565b506060820151805162000b4791600384019160209091019062000db2565b506080820151805162000b6591600484019160209091019062000db2565b5060a0820151805162000b8391600584019160209091019062000db2565b5060c0820151805162000ba191600684019160209091019062000db2565b5060e0820151805162000bbf91600784019160209091019062000db2565b50610100820151805162000bde91600884019160209091019062000db2565b5090505062000e95565b3390565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6127106001600160601b038216111562000cb25760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b60648201526084015b60405180910390fd5b6001600160a01b03821662000d0a5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c696420726563656976657200000000000000604482015260640162000ca9565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600655565b6008546001600160a01b0316331462000d9f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640162000ca9565b6064811062000dad57600080fd5b600e55565b82805462000dc09062000e58565b90600052602060002090601f01602090048101928262000de4576000855562000e2f565b82601f1062000dff57805160ff191683800117855562000e2f565b8280016001018555821562000e2f579182015b8281111562000e2f57825182559160200191906001019062000e12565b5062000e3d92915062000e41565b5090565b5b8082111562000e3d576000815560010162000e42565b600181811c9082168062000e6d57607f821691505b6020821081141562000e8f57634e487b7160e01b600052602260045260246000fd5b50919050565b6146588062000ea56000396000f3fe6080604052600436106101775760003560e01c80638da5cb5b116100cc578063c87b56dd1161007a578063c87b56dd14610422578063ce3e39c014610442578063d5abeb0114610462578063dabd271914610478578063e7514c9a14610498578063e985e9c5146104ad578063f2fde38b146104cd57600080fd5b80638da5cb5b14610379578063913e74ba1461038e57806395d89b41146103a4578063a035b1fe146103b9578063a22cb465146103cf578063b88d4fde146103ef578063c319a62e1461040f57600080fd5b8063295e328e11610129578063295e328e146102855780632a55205a146102a557806342842e0e146102e45780635593152c146103045780636352211e1461032457806370a0823114610344578063715018a61461036457600080fd5b806301ffc9a71461017c57806306fdde03146101b1578063081812fc146101d3578063095ea7b31461020b57806318160ddd1461022d57806323b872dd1461025057806324600fc314610270575b600080fd5b34801561018857600080fd5b5061019c61019736600461276e565b6104ed565b60405190151581526020015b60405180910390f35b3480156101bd57600080fd5b506101c66104fe565b6040516101a891906130e9565b3480156101df57600080fd5b506101f36101ee3660046127f0565b610590565b6040516001600160a01b0390911681526020016101a8565b34801561021757600080fd5b5061022b610226366004612698565b61061d565b005b34801561023957600080fd5b5061024261072e565b6040519081526020016101a8565b34801561025c57600080fd5b5061022b61026b3660046125a5565b61073e565b34801561027c57600080fd5b5061022b61076f565b34801561029157600080fd5b506102426102a0366004612822565b6107b3565b3480156102b157600080fd5b506102c56102c0366004612845565b610871565b604080516001600160a01b0390931683526020830191909152016101a8565b3480156102f057600080fd5b5061022b6102ff3660046125a5565b61091d565b34801561031057600080fd5b5061022b61031f3660046127a8565b610938565b34801561033057600080fd5b506101f361033f3660046127f0565b61097e565b34801561035057600080fd5b5061024261035f366004612557565b6109f5565b34801561037057600080fd5b5061022b610a7c565b34801561038557600080fd5b506101f3610ab7565b34801561039a57600080fd5b50610242600e5481565b3480156103b057600080fd5b506101c6610ac6565b3480156103c557600080fd5b50610242600a5481565b3480156103db57600080fd5b5061022b6103ea36600461265c565b610ad5565b3480156103fb57600080fd5b5061022b61040a3660046125e1565b610ae0565b61022b61041d3660046126c2565b610b18565b34801561042e57600080fd5b506101c661043d3660046127f0565b610d41565b34801561044e57600080fd5b50600d546101f3906001600160a01b031681565b34801561046e57600080fd5b50610242600b5481565b34801561048457600080fd5b5061022b6104933660046127f0565b6113b4565b3480156104a457600080fd5b506101c66113f5565b3480156104b957600080fd5b5061019c6104c8366004612572565b611483565b3480156104d957600080fd5b5061022b6104e8366004612557565b6114b1565b60006104f88261154e565b92915050565b60606000805461050d906132a9565b80601f0160208091040260200160405190810160405280929190818152602001828054610539906132a9565b80156105865780601f1061055b57610100808354040283529160200191610586565b820191906000526020600020905b81548152906001019060200180831161056957829003601f168201915b5050505050905090565b600061059b82611573565b6106015760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b60006106288261097e565b9050806001600160a01b0316836001600160a01b031614156106965760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016105f8565b336001600160a01b03821614806106b257506106b28133611483565b61071f5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776044820152771b995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b60421b60648201526084016105f8565b6107298383611590565b505050565b600061073960095490565b905090565b61074833826115fe565b6107645760405162461bcd60e51b81526004016105f890613183565b6107298383836116c8565b33610778610ab7565b6001600160a01b03161461079e5760405162461bcd60e51b81526004016105f89061314e565b476107b06107aa610ab7565b82611864565b50565b60008083600a546107c49190613230565b600d546040516370a0823160e01b81526001600160a01b038681166004830152929350600092909116906370a082319060240160206040518083038186803b15801561080f57600080fd5b505afa158015610823573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108479190612809565b111561086a576064600e548261085d9190613230565b610867919061321c565b90505b9392505050565b60008281526007602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b03169282019290925282916108e65750604080518082019091526006546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090610905906001600160601b031687613230565b61090f919061321c565b915196919550909350505050565b61072983838360405180602001604052806000815250610ae0565b33610941610ab7565b6001600160a01b0316146109675760405162461bcd60e51b81526004016105f89061314e565b805161097a90600c90602084019061244b565b5050565b6000818152600260205260408120546001600160a01b0316806104f85760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016105f8565b60006001600160a01b038216610a605760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016105f8565b506001600160a01b031660009081526003602052604090205490565b33610a85610ab7565b6001600160a01b031614610aab5760405162461bcd60e51b81526004016105f89061314e565b610ab5600061197d565b565b6008546001600160a01b031690565b60606001805461050d906132a9565b61097a3383836119cf565b610aea33836115fe565b610b065760405162461bcd60e51b81526004016105f890613183565b610b1284848484611a9a565b50505050565b8051610b2481336107b3565b3414610b605760405162461bcd60e51b815260206004820152600b60248201526a77726f6e6720707269636560a81b60448201526064016105f8565b60058111158015610b715750600081115b610bb05760405162461bcd60e51b815260206004820152601060248201526f34b731b7b93932b1ba10373ab6b132b960811b60448201526064016105f8565b600b5481610bbd60095490565b610bc79190613204565b1115610c0a5760405162461bcd60e51b815260206004820152601260248201527165786365656473206d617820737570706c7960701b60448201526064016105f8565b60005b81811015610d03576000838281518110610c2957610c2961333f565b6020026020010151118015610c5857506005838281518110610c4d57610c4d61333f565b602002602001015111155b610c9a5760405162461bcd60e51b815260206004820152601360248201527218dbdb1bdc88191bd95cdb89dd08195e1a5cdd606a1b60448201526064016105f8565b610ca8600980546001019055565b6000610cb360095490565b9050838281518110610cc757610cc761333f565b60200260200101516010600083815260200190815260200160002081905550610cf03382611acd565b5080610cfb816132e4565b915050610c0d565b5060408051338152602081018390527f36bf5aa3964be01dbd95a0154a8930793fe68353bdc580871ffb2c911366bbc7910160405180910390a15050565b60606000610d4e8361097e565b9050610d5983611573565b610d965760405162461bcd60e51b815260206004820152600e60248201526d191bd95cc81b9bdd08195e1a5cdd60921b60448201526064016105f8565b600083815260106020908152604080832054808452600f90925280832081516101208101909252805492939282908290610dcf906132a9565b80601f0160208091040260200160405190810160405280929190818152602001828054610dfb906132a9565b8015610e485780601f10610e1d57610100808354040283529160200191610e48565b820191906000526020600020905b815481529060010190602001808311610e2b57829003601f168201915b50505050508152602001600182018054610e61906132a9565b80601f0160208091040260200160405190810160405280929190818152602001828054610e8d906132a9565b8015610eda5780601f10610eaf57610100808354040283529160200191610eda565b820191906000526020600020905b815481529060010190602001808311610ebd57829003601f168201915b50505050508152602001600282018054610ef3906132a9565b80601f0160208091040260200160405190810160405280929190818152602001828054610f1f906132a9565b8015610f6c5780601f10610f4157610100808354040283529160200191610f6c565b820191906000526020600020905b815481529060010190602001808311610f4f57829003601f168201915b50505050508152602001600382018054610f85906132a9565b80601f0160208091040260200160405190810160405280929190818152602001828054610fb1906132a9565b8015610ffe5780601f10610fd357610100808354040283529160200191610ffe565b820191906000526020600020905b815481529060010190602001808311610fe157829003601f168201915b50505050508152602001600482018054611017906132a9565b80601f0160208091040260200160405190810160405280929190818152602001828054611043906132a9565b80156110905780601f1061106557610100808354040283529160200191611090565b820191906000526020600020905b81548152906001019060200180831161107357829003601f168201915b505050505081526020016005820180546110a9906132a9565b80601f01602080910402602001604051908101604052809291908181526020018280546110d5906132a9565b80156111225780601f106110f757610100808354040283529160200191611122565b820191906000526020600020905b81548152906001019060200180831161110557829003601f168201915b5050505050815260200160068201805461113b906132a9565b80601f0160208091040260200160405190810160405280929190818152602001828054611167906132a9565b80156111b45780601f10611189576101008083540402835291602001916111b4565b820191906000526020600020905b81548152906001019060200180831161119757829003601f168201915b505050505081526020016007820180546111cd906132a9565b80601f01602080910402602001604051908101604052809291908181526020018280546111f9906132a9565b80156112465780601f1061121b57610100808354040283529160200191611246565b820191906000526020600020905b81548152906001019060200180831161122957829003601f168201915b5050505050815260200160088201805461125f906132a9565b80601f016020809104026020016040519081016040528092919081815260200182805461128b906132a9565b80156112d85780601f106112ad576101008083540402835291602001916112d8565b820191906000526020600020905b8154815290600101906020018083116112bb57829003601f168201915b505050505081525050905060006040518060a00160405280856001600160a01b03168152602001878152602001848152602001838152602001600c805461131e906132a9565b80601f016020809104026020016040519081016040528092919081815260200182805461134a906132a9565b80156113975780601f1061136c57610100808354040283529160200191611397565b820191906000526020600020905b81548152906001019060200180831161137a57829003601f168201915b505050505081525090506113aa81611ae7565b9695505050505050565b336113bd610ab7565b6001600160a01b0316146113e35760405162461bcd60e51b81526004016105f89061314e565b606481106113f057600080fd5b600e55565b600c8054611402906132a9565b80601f016020809104026020016040519081016040528092919081815260200182805461142e906132a9565b801561147b5780601f106114505761010080835404028352916020019161147b565b820191906000526020600020905b81548152906001019060200180831161145e57829003601f168201915b505050505081565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b336114ba610ab7565b6001600160a01b0316146114e05760405162461bcd60e51b81526004016105f89061314e565b6001600160a01b0381166115455760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105f8565b6107b08161197d565b60006001600160e01b0319821663152a902d60e11b14806104f857506104f882611bfd565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906115c58261097e565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600061160982611573565b61166a5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016105f8565b60006116758361097e565b9050806001600160a01b0316846001600160a01b0316148061169c575061169c8185611483565b806116c05750836001600160a01b03166116b584610590565b6001600160a01b0316145b949350505050565b826001600160a01b03166116db8261097e565b6001600160a01b03161461173f5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016105f8565b6001600160a01b0382166117a15760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016105f8565b6117ac600082611590565b6001600160a01b03831660009081526003602052604081208054600192906117d590849061324f565b90915550506001600160a01b0382166000908152600360205260408120805460019290611803908490613204565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b804710156118b45760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016105f8565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611901576040519150601f19603f3d011682016040523d82523d6000602084013e611906565b606091505b50509050806107295760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016105f8565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b03161415611a2d5760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b60448201526064016105f8565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b611aa58484846116c8565b611ab184848484611c4d565b610b125760405162461bcd60e51b81526004016105f8906130fc565b61097a828260405180602001604052806000815250611d5a565b60606000611af483611d8d565b90506000611b2082604051602001611b0c9190612b1d565b604051602081830303815290604052611e4e565b604051602001611b309190612c66565b60405160208183030381529060405290506000611b508560200151611fa1565b608086015160408701518190611b6590611fa1565b604051602001611b789493929190612ca4565b6040516020818303038152906040529050600081611ba487600001516001600160a01b0316601461209e565b8585604051602001611bb994939291906128af565b6040516020818303038152906040529050611bd381611e4e565b604051602001611be3919061302c565b604051602081830303815290604052945050505050919050565b60006001600160e01b031982166380ac58cd60e01b1480611c2e57506001600160e01b03198216635b5e139f60e01b145b806104f857506301ffc9a760e01b6001600160e01b03198316146104f8565b60006001600160a01b0384163b15611d4f57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611c919033908990889088906004016130b6565b602060405180830381600087803b158015611cab57600080fd5b505af1925050508015611cdb575060408051601f3d908101601f19168201909252611cd89181019061278b565b60015b611d35573d808015611d09576040519150601f19603f3d011682016040523d82523d6000602084013e611d0e565b606091505b508051611d2d5760405162461bcd60e51b81526004016105f8906130fc565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506116c0565b506001949350505050565b611d648383612239565b611d716000848484611c4d565b6107295760405162461bcd60e51b81526004016105f8906130fc565b60606000611da38360000151846020015161236c565b90506000611db484606001516123bf565b90506000611e226040518060a00160405280606b81526020016145b8606b913983604051806103a00160405280610376815260200161420261037691398660405180610ea00160405280610e808152602001613382610e809139604051602001611b0c959493929190612ab2565b905080604051602001611e359190613071565b6040516020818303038152906040529350505050919050565b6060815160001415611e6e57505060408051602081019091526000815290565b60006040518060600160405280604081526020016145786040913990506000600384516002611e9d9190613204565b611ea7919061321c565b611eb2906004613230565b6001600160401b03811115611ec957611ec9613355565b6040519080825280601f01601f191660200182016040528015611ef3576020820181803683370190505b509050600182016020820185865187015b80821015611f5f576003820191508151603f8160121c168501518453600184019350603f81600c1c168501518453600184019350603f8160061c168501518453600184019350603f8116850151845350600183019250611f04565b5050600386510660018114611f7b5760028114611f8e57611f96565b603d6001830353603d6002830353611f96565b603d60018303535b509195945050505050565b606081611fc55750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611fef5780611fd9816132e4565b9150611fe89050600a8361321c565b9150611fc9565b6000816001600160401b0381111561200957612009613355565b6040519080825280601f01601f191660200182016040528015612033576020820181803683370190505b5090505b84156116c05761204860018361324f565b9150612055600a866132ff565b612060906030613204565b60f81b8183815181106120755761207561333f565b60200101906001600160f81b031916908160001a905350612097600a8661321c565b9450612037565b606060006120ad836002613230565b6120b8906002613204565b6001600160401b038111156120cf576120cf613355565b6040519080825280601f01601f1916602001820160405280156120f9576020820181803683370190505b509050600360fc1b816000815181106121145761211461333f565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106121435761214361333f565b60200101906001600160f81b031916908160001a9053506000612167846002613230565b612172906001613204565b90505b60018111156121ea576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106121a6576121a661333f565b1a60f81b8282815181106121bc576121bc61333f565b60200101906001600160f81b031916908160001a90535060049490941c936121e381613292565b9050612175565b50831561086a5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016105f8565b6001600160a01b03821661228f5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016105f8565b61229881611573565b156122e55760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016105f8565b6001600160a01b038216600090815260036020526040812080546001929061230e908490613204565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60606000612384846001600160a01b0316601461209e565b9050600061239184611fa1565b905081816040516020016123a6929190612bab565b6040516020818303038152906040529250505092915050565b60606000826000015183602001518460400151856060015186608001516040516020016123f0959493929190612e72565b604051602081830303815290604052905060008184608001518560a001518660c001518760e0015188610100015160405160200161243396959493929190612950565b60408051601f19818403018152919052949350505050565b828054612457906132a9565b90600052602060002090601f01602090048101928261247957600085556124bf565b82601f1061249257805160ff19168380011785556124bf565b828001600101855582156124bf579182015b828111156124bf5782518255916020019190600101906124a4565b506124cb9291506124cf565b5090565b5b808211156124cb57600081556001016124d0565b60006001600160401b038311156124fd576124fd613355565b612510601f8401601f19166020016131d4565b905082815283838301111561252457600080fd5b828260208301376000602084830101529392505050565b80356001600160a01b038116811461255257600080fd5b919050565b60006020828403121561256957600080fd5b61086a8261253b565b6000806040838503121561258557600080fd5b61258e8361253b565b915061259c6020840161253b565b90509250929050565b6000806000606084860312156125ba57600080fd5b6125c38461253b565b92506125d16020850161253b565b9150604084013590509250925092565b600080600080608085870312156125f757600080fd5b6126008561253b565b935061260e6020860161253b565b92506040850135915060608501356001600160401b0381111561263057600080fd5b8501601f8101871361264157600080fd5b612650878235602084016124e4565b91505092959194509250565b6000806040838503121561266f57600080fd5b6126788361253b565b91506020830135801515811461268d57600080fd5b809150509250929050565b600080604083850312156126ab57600080fd5b6126b48361253b565b946020939093013593505050565b600060208083850312156126d557600080fd5b82356001600160401b03808211156126ec57600080fd5b818501915085601f83011261270057600080fd5b81358181111561271257612712613355565b8060051b91506127238483016131d4565b8181528481019084860184860187018a101561273e57600080fd5b600095505b83861015612761578035835260019590950194918601918601612743565b5098975050505050505050565b60006020828403121561278057600080fd5b813561086a8161336b565b60006020828403121561279d57600080fd5b815161086a8161336b565b6000602082840312156127ba57600080fd5b81356001600160401b038111156127d057600080fd5b8201601f810184136127e157600080fd5b6116c0848235602084016124e4565b60006020828403121561280257600080fd5b5035919050565b60006020828403121561281b57600080fd5b5051919050565b6000806040838503121561283557600080fd5b8235915061259c6020840161253b565b6000806040838503121561285857600080fd5b50508035926020909101359150565b6000815180845261287f816020860160208601613266565b601f01601f19169290920160200192915050565b600081516128a5818560208601613266565b9290920192915050565b600085516128c1818460208a01613266565b8551908301906128d5818360208a01613266565b6c1116101134b6b0b3b2911d101160991b910190815284516128fe81600d840160208901613266565b731116101130b734b6b0ba34b7b72fbab936111d1160611b600d92909101918201528351612933816021840160208801613266565b61227d60f01b602192909101918201526023019695505050505050565b6000875160206129638285838d01613266565b7f7d202e6869676853636f7265207b666f6e743a203235707820436f7572696572918401918252683b2066696c6c3a202360b81b8183015288516129ad81602985018c8501613266565b757d202e6261636b67726f756e64207b66696c6c3a202360501b6029939091019283015287516129e381603f8501848c01613266565b6e7d202e6d6170207b66696c6c3a202360881b603f93909101928301528651612a1281604e8501848b01613266565b7f7d202e666f6f64207b7374726f6b653a20233030303b2066696c6c3a20230000604e93909101928301528551612a4f81606c8501848a01613266565b612aa3612a8d612a87606c848701017f7d202e736e616b657b7374726f6b653a20233030303b2066696c6c3a202300008152601e0190565b88612893565b693e901e17b9ba3cb6329f60b11b8152600a0190565b9b9a5050505050505050505050565b60008651612ac4818460208b01613266565b865190830190612ad8818360208b01613266565b8651910190612aeb818360208a01613266565b8551910190612afe818360208901613266565b8451910190612b11818360208801613266565b01979650505050505050565b7f3c21444f43545950452068746d6c3e203c68746d6c3e3c6f626a65637420747981527838329e9134b6b0b3b297b9bb3395bc36b611103230ba309e9160391b602082015260008251612b77816039850160208701613266565b7f2220616c743d22736e616b65223e3c2f6f626a6563743e3c2f68746d6c3e00006039939091019283015250605701919050565b7f3c6720636c6173733d226d65746164617461223e203c7465787420783d223530815271011103c9e911c981811101f37bbb732b91d160751b602082015260008351612bfe816032850160208801613266565b7f3c2f746578743e203c7465787420783d2235302220793d22393530223e0000006032918401918201528351612c3b81604f840160208801613266565b711798981818181e17ba32bc3a1f101e17b39f60711b604f9290910191820152606101949350505050565b7519185d184e9d195e1d0bda1d1b5b0ed8985cd94d8d0b60521b815260008251612c97816016850160208701613266565b9190910160160192915050565b707b226e616d65223a2022536e616b65202360781b81528451600090612cd1816011850160208a01613266565b7f222c20226465736372697074696f6e223a202246756c6c79206f6e20636861696011918401918201527f6e2067616d65206f6620536e616b652e20546f20706c61792c2073696d706c7960318201527f20636f70792074686520696d6167652075726c20616e6420706173746520697460518201527f20696e2061207765622062726f777365722e204f722c20766973697420746865607182015273040b69eccccd2c6d2c2d840aecac4e6d2e8caba560631b60918201528551612d9d8160a5840160208a01613266565b7f2920746f207669657720616e6420706c617920796f75722067616d65732e222c60a5929091019182015270101132bc3a32b93730b62fbab936111d1160791b60c5820152612e67612e4d612e47612df860d6850189612893565b7f222c202261747472696275746573223a205b7b2274726169745f74797065223a81527f2022436f6c6f7220536368656d65222c202276616c7565223a220000000000006020820152603a0190565b86612893565b6d113eae96101137bbb732b9111d1160911b8152600e0190565b979650505050505050565b7f3c7374796c653e202e6d65746164617461207b20666f6e743a2020333070782081526f436f75726965723b2066696c6c3a202360801b602082015260008651612ec3816030850160208b01613266565b7f207d202e7469746c65207b20666f6e743a20203830707820436f75726965723b603091840191820152672066696c6c3a202360c01b60508201528651612f11816058840160208b01613266565b7f207d202e7374617274207b666f6e743a203335707820436f75726965723b20666058929091019182015278696c6c2d6f7061636974793a202e37303b2066696c6c3a202360381b60788201528551612f71816091840160208a01613266565b7f7d202e646972656374696f6e73207b666f6e743a206974616c69632033307078609192909101918201527f20436f75726965723b2066696c6c2d6f7061636974793a202e37303b2066696c60b1820152636c3a202360e01b60d182015261302061301a612fe260d5840188612893565b7f207d202e73636f7265207b666f6e743a203430707820436f75726965723b2066815265696c6c3a202360d01b602082015260260190565b85612893565b98975050505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c00000081526000825161306481601d850160208701613266565b91909101601d0192915050565b7f646174613a696d6167652f7376672b786d6c3b6261736536342c0000000000008152600082516130a981601a850160208701613266565b91909101601a0192915050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906113aa90830184612867565b60208152600061086a6020830184612867565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b604051601f8201601f191681016001600160401b03811182821017156131fc576131fc613355565b604052919050565b6000821982111561321757613217613313565b500190565b60008261322b5761322b613329565b500490565b600081600019048311821515161561324a5761324a613313565b500290565b60008282101561326157613261613313565b500390565b60005b83811015613281578181015183820152602001613269565b83811115610b125750506000910152565b6000816132a1576132a1613313565b506000190190565b600181811c908216806132bd57607f821691505b602082108114156132de57634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156132f8576132f8613313565b5060010190565b60008261330e5761330e613329565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b0319811681146107b057600080fdfe3c726563742069643d22736e616b652220636c6173733d22736e616b652220783d223530302220793d22353030222077696474683d22323022206865696768743d223230222f3e203c726563742069643d22666f6f642220636c6173733d22666f6f642220783d222d35302220793d222d3530222077696474683d22323022206865696768743d223230222f3e203c73637269707420747970653d22746578742f6a617661736372697074223e3c215b43444154415b76617220666f6f64436f6f7264732c4b45593d7b773a38372c613a36352c733a38332c643a36382c73706163653a33327d2c6d6f766553706565643d32302c73636f72653d302c6869676853636f7265733d5b5d2c736e616b65486561643d646f63756d656e742e676574456c656d656e74427949642822736e616b6522292c7376673d646f63756d656e742e676574456c656d656e747342795461674e616d65282273766722295b305d2c7374617274546578743d646f63756d656e742e676574456c656d656e7442794964282273746172745465787422292c646972656374696f6e733d646f63756d656e742e676574456c656d656e74427949642822646972656374696f6e7322292c666f6f643d646f63756d656e742e676574456c656d656e74427949642822666f6f6422292c73636f7265436f756e7465723d646f63756d656e742e676574456c656d656e7442794964282273636f7265436f756e74657222293b7374617274546578742e74657874436f6e74656e743d22707265737320737061636520746f207374617274222c646972656374696f6e732e74657874436f6e74656e743d227468656e20772c20612c20732c2064223b76617220736e616b65426f64793d5b5d3b69735475726e696e673d21312c697352756e6e696e673d21313b7661722063757272656e74446972656374696f6e3d227269676874223b646f63756d656e742e646f63756d656e74456c656d656e742e6164644576656e744c697374656e657228226b6579646f776e222c653d3e7b68616e646c65496e7075742865297d2c2131293b7661722074696d657246756e6374696f6e3d6e756c6c3b66756e6374696f6e20737461727447616d6528297b6e756c6c3d3d74696d657246756e6374696f6e26262874696d657246756e6374696f6e3d736574496e74657276616c28676f2c3830292c72616e646f6d5f666f6f6428292c7374617274546578742e74657874436f6e74656e743d22222c646972656374696f6e732e74657874436f6e74656e743d22222c73636f7265436f756e7465722e74657874436f6e74656e743d73636f72652c697352756e6e696e673d2130297d66756e6374696f6e2075706461746553636f726528297b73636f72652b3d312c73636f7265436f756e7465722e74657874436f6e74656e743d73636f72657d66756e6374696f6e2072616e646f6d5f666f6f6428297b76617220653d4d6174682e666c6f6f722833302a4d6174682e72616e646f6d2829292c743d4d6174682e666c6f6f722833302a4d6174682e72616e646f6d2829293b652b3230303e373830262628653d373830292c742b3230303e373830262628743d373830292c666f6f64436f6f7264733d5b32302a652b3230302c32302a742b3230305d2c666f6f642e736574417474726962757465282278222c32302a652b323030292c666f6f642e736574417474726962757465282279222c32302a742b323030297d66756e6374696f6e207570646174654869676853636f726528297b76617220653d6869676853636f7265732e6c656e6774683b69662873636f72653c3d6869676853636f7265735b652d315d7c7c6869676853636f7265732e696e636c756465732873636f7265292972657475726e3b653e3d3526266869676853636f7265732e706f7028293b6c657420743d6869676853636f7265732e66696e64496e64657828653d3e73636f72653e65293b6869676853636f7265732e73706c69636528742c302c73636f7265293b666f7228766172206e3d313b6e3c3d6869676853636f7265732e6c656e6774683b6e2b2b297b646f63756d656e742e676574456c656d656e744279496428606873247b6e7d60292e74657874436f6e74656e743d6869676853636f7265735b6e2d315d7d7d66756e6374696f6e20726573657428297b69662831213d697352756e6e696e67297b646f63756d656e742e646f63756d656e74456c656d656e742e72656d6f76654576656e744c697374656e657228226b6579646f776e222c66756e6374696f6e2865297b68616e646c65496e7075742865297d2c2131292c636c656172496e74657276616c2874696d657246756e6374696f6e292c74696d657246756e6374696f6e3d6e756c6c2c69735475726e696e673d21313b666f722876617220653d303b653c736e616b65426f64792e6c656e6774683b652b2b297376672e72656d6f76654368696c6428736e616b65426f64795b655d293b736e616b65426f64793d5b5d2c73636f7265436f756e7465722e74657874436f6e74656e743d73636f72653d302c666f6f642e736574417474726962757465282278222c2d3530292c666f6f642e736574417474726962757465282279222c2d3530292c7374617274546578742e74657874436f6e74656e743d22707265737320737061636520746f207374617274222c646972656374696f6e732e74657874436f6e74656e743d227468656e20772c20612c20732c2064222c736e616b65486561642e736574417474726962757465282278222c353030292c736e616b65486561642e736574417474726962757465282279222c353030292c646f63756d656e742e646f63756d656e74456c656d656e742e6164644576656e744c697374656e657228226b6579646f776e222c66756e6374696f6e2865297b68616e646c65496e7075742865297d2c2131297d7d66756e6374696f6e20617070656e64536e616b6528297b76617220653d736e616b65486561642e636c6f6e654e6f6465282130292c743d736e616b65426f64792e6c656e6774683b743e30262628652e736574417474726962757465282278222c312a736e616b65426f64795b742d315d2e6765744174747269627574652822782229292c652e736574417474726962757465282279222c312a736e616b65426f64795b742d315d2e676574417474726962757465282279222929292c736e616b65426f64792e707573682865292c7376672e617070656e644368696c642865297d66756e6374696f6e20757064617465536e616b6528297b666f722876617220653d312a736e616b65486561642e67657441747472696275746528227822292c743d312a736e616b65486561642e67657441747472696275746528227922292c6e3d736e616b65426f64792e6c656e6774682d313b6e3e3d303b6e2d2d29696628303d3d6e29736e616b65426f64795b305d2e736574417474726962757465282278222c65292c736e616b65426f64795b305d2e736574417474726962757465282279222c74293b656c73657b766172206f3d312a736e616b65426f64795b6e2d315d2e67657441747472696275746528227822292c723d312a736e616b65426f64795b6e2d315d2e67657441747472696275746528227922293b696628736e616b65426f64795b6e5d2e736574417474726962757465282278222c6f292c736e616b65426f64795b6e5d2e736574417474726962757465282279222c72292c6f3d3d652626723d3d74297b697352756e6e696e673d21312c7570646174654869676853636f726528292c726573657428293b627265616b7d7d69735475726e696e673d21317d66756e6374696f6e20676f28297b76617220653d312a736e616b65486561642e67657441747472696275746528227822292c743d312a736e616b65486561642e67657441747472696275746528227922293b696628757064617465536e616b6528292c313d3d697352756e6e696e67297377697463682863757272656e74446972656374696f6e297b63617365227269676874223a736e616b65486561642e736574417474726962757465282278222c652b3d6d6f76655370656564293b627265616b3b63617365226c656674223a736e616b65486561642e736574417474726962757465282278222c652d3d6d6f76655370656564293b627265616b3b63617365227570223a736e616b65486561642e736574417474726962757465282279222c742d3d6d6f76655370656564293b627265616b3b6361736522646f776e223a736e616b65486561642e736574417474726962757465282279222c742b3d6d6f76655370656564297d28653c3d3138307c7c653e3d3830307c7c743c3d3138307c7c743e3d38303029262628697352756e6e696e673d21312c7570646174654869676853636f726528292c72657365742829292c653d3d666f6f64436f6f7264735b305d2626743d3d666f6f64436f6f7264735b315d26262872616e646f6d5f666f6f6428292c75706461746553636f726528292c617070656e64536e616b652829297d66756e6374696f6e2068616e646c65496e7075742865297b696628652e6b6579436f64653d3d4b45592e73706163652626737461727447616d6528292c31213d69735475726e696e67297377697463682869735475726e696e673d21302c652e6b6579436f6465297b63617365204b45592e773a22646f776e22213d63757272656e74446972656374696f6e26262863757272656e74446972656374696f6e3d22757022293b627265616b3b63617365204b45592e733a22757022213d63757272656e74446972656374696f6e26262863757272656e74446972656374696f6e3d22646f776e22293b627265616b3b63617365204b45592e613a22726967687422213d63757272656e74446972656374696f6e26262863757272656e74446972656374696f6e3d226c65667422293b627265616b3b63617365204b45592e643a226c65667422213d63757272656e74446972656374696f6e26262863757272656e74446972656374696f6e3d22726967687422297d7d5d5d3e3c2f7363726970743e203c2f7376673e3c67207374726f6b653d222330303022203e203c7265637420636c6173733d226261636b67726f756e642220783d22302220793d2230222072783d223135222077696474683d223130303022206865696768743d2231303030222f3e203c7265637420636c6173733d226d61702220783d223230302220793d22323030222077696474683d2236303022206865696768743d22363030222f3e203c2f673e203c7465787420793d223132302220783d223530252220746578742d616e63686f723d226d6964646c652220636c6173733d227469746c65223e736e616b653c2f746578743e203c746578742069643d227374617274546578742220783d223530252220793d223630302220746578742d616e63686f723d226d6964646c652220636c6173733d22737461727422203e3c2f746578743e203c746578742069643d22646972656374696f6e732220783d223530252220793d223635302220746578742d616e63686f723d226d6964646c652220636c6173733d22646972656374696f6e7322203e3c2f746578743e203c7465787420783d223930302220793d223235302220746578742d616e63686f723d226d6964646c652220636c6173733d2273636f726522203e2053636f72653a3c2f746578743e203c746578742069643d2273636f7265436f756e7465722220783d223833302220793d223330302220636c6173733d2273636f726522203e3c2f746578743e203c746578742020783d223930302220793d223535302220746578742d616e63686f723d226d6964646c652220636c6173733d226869676853636f726522203e20686967682073636f7265733a3c2f746578743e203c746578742069643d226873312220783d223833302220793d223630302220636c6173733d2273636f726522203e3c2f746578743e203c746578742069643d226873322220783d223833302220793d223635302220636c6173733d2273636f726522203e3c2f746578743e203c746578742069643d226873332220783d223833302220793d223730302220636c6173733d2273636f726522203e3c2f746578743e203c746578742069643d226873342220783d223833302220793d223735302220636c6173733d2273636f726522203e3c2f746578743e203c746578742069643d226873352220783d223833302220793d223830302220636c6173733d2273636f726522203e3c2f746578743e4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f3c73766720786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323030302f7376672220786d6c6e733a786c696e6b3d22687474703a2f2f7777772e77332e6f72672f313939392f786c696e6b222076696577426f783d2230203020313030302031303030223ea2646970667358221220e3b140fd674809e54a78fab2073000caa6928f444bdb02a47912d6250bfe884664736f6c63430008070033
Deployed Bytecode
0x6080604052600436106101775760003560e01c80638da5cb5b116100cc578063c87b56dd1161007a578063c87b56dd14610422578063ce3e39c014610442578063d5abeb0114610462578063dabd271914610478578063e7514c9a14610498578063e985e9c5146104ad578063f2fde38b146104cd57600080fd5b80638da5cb5b14610379578063913e74ba1461038e57806395d89b41146103a4578063a035b1fe146103b9578063a22cb465146103cf578063b88d4fde146103ef578063c319a62e1461040f57600080fd5b8063295e328e11610129578063295e328e146102855780632a55205a146102a557806342842e0e146102e45780635593152c146103045780636352211e1461032457806370a0823114610344578063715018a61461036457600080fd5b806301ffc9a71461017c57806306fdde03146101b1578063081812fc146101d3578063095ea7b31461020b57806318160ddd1461022d57806323b872dd1461025057806324600fc314610270575b600080fd5b34801561018857600080fd5b5061019c61019736600461276e565b6104ed565b60405190151581526020015b60405180910390f35b3480156101bd57600080fd5b506101c66104fe565b6040516101a891906130e9565b3480156101df57600080fd5b506101f36101ee3660046127f0565b610590565b6040516001600160a01b0390911681526020016101a8565b34801561021757600080fd5b5061022b610226366004612698565b61061d565b005b34801561023957600080fd5b5061024261072e565b6040519081526020016101a8565b34801561025c57600080fd5b5061022b61026b3660046125a5565b61073e565b34801561027c57600080fd5b5061022b61076f565b34801561029157600080fd5b506102426102a0366004612822565b6107b3565b3480156102b157600080fd5b506102c56102c0366004612845565b610871565b604080516001600160a01b0390931683526020830191909152016101a8565b3480156102f057600080fd5b5061022b6102ff3660046125a5565b61091d565b34801561031057600080fd5b5061022b61031f3660046127a8565b610938565b34801561033057600080fd5b506101f361033f3660046127f0565b61097e565b34801561035057600080fd5b5061024261035f366004612557565b6109f5565b34801561037057600080fd5b5061022b610a7c565b34801561038557600080fd5b506101f3610ab7565b34801561039a57600080fd5b50610242600e5481565b3480156103b057600080fd5b506101c6610ac6565b3480156103c557600080fd5b50610242600a5481565b3480156103db57600080fd5b5061022b6103ea36600461265c565b610ad5565b3480156103fb57600080fd5b5061022b61040a3660046125e1565b610ae0565b61022b61041d3660046126c2565b610b18565b34801561042e57600080fd5b506101c661043d3660046127f0565b610d41565b34801561044e57600080fd5b50600d546101f3906001600160a01b031681565b34801561046e57600080fd5b50610242600b5481565b34801561048457600080fd5b5061022b6104933660046127f0565b6113b4565b3480156104a457600080fd5b506101c66113f5565b3480156104b957600080fd5b5061019c6104c8366004612572565b611483565b3480156104d957600080fd5b5061022b6104e8366004612557565b6114b1565b60006104f88261154e565b92915050565b60606000805461050d906132a9565b80601f0160208091040260200160405190810160405280929190818152602001828054610539906132a9565b80156105865780601f1061055b57610100808354040283529160200191610586565b820191906000526020600020905b81548152906001019060200180831161056957829003601f168201915b5050505050905090565b600061059b82611573565b6106015760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b60006106288261097e565b9050806001600160a01b0316836001600160a01b031614156106965760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016105f8565b336001600160a01b03821614806106b257506106b28133611483565b61071f5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776044820152771b995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b60421b60648201526084016105f8565b6107298383611590565b505050565b600061073960095490565b905090565b61074833826115fe565b6107645760405162461bcd60e51b81526004016105f890613183565b6107298383836116c8565b33610778610ab7565b6001600160a01b03161461079e5760405162461bcd60e51b81526004016105f89061314e565b476107b06107aa610ab7565b82611864565b50565b60008083600a546107c49190613230565b600d546040516370a0823160e01b81526001600160a01b038681166004830152929350600092909116906370a082319060240160206040518083038186803b15801561080f57600080fd5b505afa158015610823573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108479190612809565b111561086a576064600e548261085d9190613230565b610867919061321c565b90505b9392505050565b60008281526007602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b03169282019290925282916108e65750604080518082019091526006546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090610905906001600160601b031687613230565b61090f919061321c565b915196919550909350505050565b61072983838360405180602001604052806000815250610ae0565b33610941610ab7565b6001600160a01b0316146109675760405162461bcd60e51b81526004016105f89061314e565b805161097a90600c90602084019061244b565b5050565b6000818152600260205260408120546001600160a01b0316806104f85760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016105f8565b60006001600160a01b038216610a605760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016105f8565b506001600160a01b031660009081526003602052604090205490565b33610a85610ab7565b6001600160a01b031614610aab5760405162461bcd60e51b81526004016105f89061314e565b610ab5600061197d565b565b6008546001600160a01b031690565b60606001805461050d906132a9565b61097a3383836119cf565b610aea33836115fe565b610b065760405162461bcd60e51b81526004016105f890613183565b610b1284848484611a9a565b50505050565b8051610b2481336107b3565b3414610b605760405162461bcd60e51b815260206004820152600b60248201526a77726f6e6720707269636560a81b60448201526064016105f8565b60058111158015610b715750600081115b610bb05760405162461bcd60e51b815260206004820152601060248201526f34b731b7b93932b1ba10373ab6b132b960811b60448201526064016105f8565b600b5481610bbd60095490565b610bc79190613204565b1115610c0a5760405162461bcd60e51b815260206004820152601260248201527165786365656473206d617820737570706c7960701b60448201526064016105f8565b60005b81811015610d03576000838281518110610c2957610c2961333f565b6020026020010151118015610c5857506005838281518110610c4d57610c4d61333f565b602002602001015111155b610c9a5760405162461bcd60e51b815260206004820152601360248201527218dbdb1bdc88191bd95cdb89dd08195e1a5cdd606a1b60448201526064016105f8565b610ca8600980546001019055565b6000610cb360095490565b9050838281518110610cc757610cc761333f565b60200260200101516010600083815260200190815260200160002081905550610cf03382611acd565b5080610cfb816132e4565b915050610c0d565b5060408051338152602081018390527f36bf5aa3964be01dbd95a0154a8930793fe68353bdc580871ffb2c911366bbc7910160405180910390a15050565b60606000610d4e8361097e565b9050610d5983611573565b610d965760405162461bcd60e51b815260206004820152600e60248201526d191bd95cc81b9bdd08195e1a5cdd60921b60448201526064016105f8565b600083815260106020908152604080832054808452600f90925280832081516101208101909252805492939282908290610dcf906132a9565b80601f0160208091040260200160405190810160405280929190818152602001828054610dfb906132a9565b8015610e485780601f10610e1d57610100808354040283529160200191610e48565b820191906000526020600020905b815481529060010190602001808311610e2b57829003601f168201915b50505050508152602001600182018054610e61906132a9565b80601f0160208091040260200160405190810160405280929190818152602001828054610e8d906132a9565b8015610eda5780601f10610eaf57610100808354040283529160200191610eda565b820191906000526020600020905b815481529060010190602001808311610ebd57829003601f168201915b50505050508152602001600282018054610ef3906132a9565b80601f0160208091040260200160405190810160405280929190818152602001828054610f1f906132a9565b8015610f6c5780601f10610f4157610100808354040283529160200191610f6c565b820191906000526020600020905b815481529060010190602001808311610f4f57829003601f168201915b50505050508152602001600382018054610f85906132a9565b80601f0160208091040260200160405190810160405280929190818152602001828054610fb1906132a9565b8015610ffe5780601f10610fd357610100808354040283529160200191610ffe565b820191906000526020600020905b815481529060010190602001808311610fe157829003601f168201915b50505050508152602001600482018054611017906132a9565b80601f0160208091040260200160405190810160405280929190818152602001828054611043906132a9565b80156110905780601f1061106557610100808354040283529160200191611090565b820191906000526020600020905b81548152906001019060200180831161107357829003601f168201915b505050505081526020016005820180546110a9906132a9565b80601f01602080910402602001604051908101604052809291908181526020018280546110d5906132a9565b80156111225780601f106110f757610100808354040283529160200191611122565b820191906000526020600020905b81548152906001019060200180831161110557829003601f168201915b5050505050815260200160068201805461113b906132a9565b80601f0160208091040260200160405190810160405280929190818152602001828054611167906132a9565b80156111b45780601f10611189576101008083540402835291602001916111b4565b820191906000526020600020905b81548152906001019060200180831161119757829003601f168201915b505050505081526020016007820180546111cd906132a9565b80601f01602080910402602001604051908101604052809291908181526020018280546111f9906132a9565b80156112465780601f1061121b57610100808354040283529160200191611246565b820191906000526020600020905b81548152906001019060200180831161122957829003601f168201915b5050505050815260200160088201805461125f906132a9565b80601f016020809104026020016040519081016040528092919081815260200182805461128b906132a9565b80156112d85780601f106112ad576101008083540402835291602001916112d8565b820191906000526020600020905b8154815290600101906020018083116112bb57829003601f168201915b505050505081525050905060006040518060a00160405280856001600160a01b03168152602001878152602001848152602001838152602001600c805461131e906132a9565b80601f016020809104026020016040519081016040528092919081815260200182805461134a906132a9565b80156113975780601f1061136c57610100808354040283529160200191611397565b820191906000526020600020905b81548152906001019060200180831161137a57829003601f168201915b505050505081525090506113aa81611ae7565b9695505050505050565b336113bd610ab7565b6001600160a01b0316146113e35760405162461bcd60e51b81526004016105f89061314e565b606481106113f057600080fd5b600e55565b600c8054611402906132a9565b80601f016020809104026020016040519081016040528092919081815260200182805461142e906132a9565b801561147b5780601f106114505761010080835404028352916020019161147b565b820191906000526020600020905b81548152906001019060200180831161145e57829003601f168201915b505050505081565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b336114ba610ab7565b6001600160a01b0316146114e05760405162461bcd60e51b81526004016105f89061314e565b6001600160a01b0381166115455760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105f8565b6107b08161197d565b60006001600160e01b0319821663152a902d60e11b14806104f857506104f882611bfd565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906115c58261097e565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600061160982611573565b61166a5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016105f8565b60006116758361097e565b9050806001600160a01b0316846001600160a01b0316148061169c575061169c8185611483565b806116c05750836001600160a01b03166116b584610590565b6001600160a01b0316145b949350505050565b826001600160a01b03166116db8261097e565b6001600160a01b03161461173f5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016105f8565b6001600160a01b0382166117a15760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016105f8565b6117ac600082611590565b6001600160a01b03831660009081526003602052604081208054600192906117d590849061324f565b90915550506001600160a01b0382166000908152600360205260408120805460019290611803908490613204565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b804710156118b45760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016105f8565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611901576040519150601f19603f3d011682016040523d82523d6000602084013e611906565b606091505b50509050806107295760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016105f8565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b03161415611a2d5760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b60448201526064016105f8565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b611aa58484846116c8565b611ab184848484611c4d565b610b125760405162461bcd60e51b81526004016105f8906130fc565b61097a828260405180602001604052806000815250611d5a565b60606000611af483611d8d565b90506000611b2082604051602001611b0c9190612b1d565b604051602081830303815290604052611e4e565b604051602001611b309190612c66565b60405160208183030381529060405290506000611b508560200151611fa1565b608086015160408701518190611b6590611fa1565b604051602001611b789493929190612ca4565b6040516020818303038152906040529050600081611ba487600001516001600160a01b0316601461209e565b8585604051602001611bb994939291906128af565b6040516020818303038152906040529050611bd381611e4e565b604051602001611be3919061302c565b604051602081830303815290604052945050505050919050565b60006001600160e01b031982166380ac58cd60e01b1480611c2e57506001600160e01b03198216635b5e139f60e01b145b806104f857506301ffc9a760e01b6001600160e01b03198316146104f8565b60006001600160a01b0384163b15611d4f57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611c919033908990889088906004016130b6565b602060405180830381600087803b158015611cab57600080fd5b505af1925050508015611cdb575060408051601f3d908101601f19168201909252611cd89181019061278b565b60015b611d35573d808015611d09576040519150601f19603f3d011682016040523d82523d6000602084013e611d0e565b606091505b508051611d2d5760405162461bcd60e51b81526004016105f8906130fc565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506116c0565b506001949350505050565b611d648383612239565b611d716000848484611c4d565b6107295760405162461bcd60e51b81526004016105f8906130fc565b60606000611da38360000151846020015161236c565b90506000611db484606001516123bf565b90506000611e226040518060a00160405280606b81526020016145b8606b913983604051806103a00160405280610376815260200161420261037691398660405180610ea00160405280610e808152602001613382610e809139604051602001611b0c959493929190612ab2565b905080604051602001611e359190613071565b6040516020818303038152906040529350505050919050565b6060815160001415611e6e57505060408051602081019091526000815290565b60006040518060600160405280604081526020016145786040913990506000600384516002611e9d9190613204565b611ea7919061321c565b611eb2906004613230565b6001600160401b03811115611ec957611ec9613355565b6040519080825280601f01601f191660200182016040528015611ef3576020820181803683370190505b509050600182016020820185865187015b80821015611f5f576003820191508151603f8160121c168501518453600184019350603f81600c1c168501518453600184019350603f8160061c168501518453600184019350603f8116850151845350600183019250611f04565b5050600386510660018114611f7b5760028114611f8e57611f96565b603d6001830353603d6002830353611f96565b603d60018303535b509195945050505050565b606081611fc55750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611fef5780611fd9816132e4565b9150611fe89050600a8361321c565b9150611fc9565b6000816001600160401b0381111561200957612009613355565b6040519080825280601f01601f191660200182016040528015612033576020820181803683370190505b5090505b84156116c05761204860018361324f565b9150612055600a866132ff565b612060906030613204565b60f81b8183815181106120755761207561333f565b60200101906001600160f81b031916908160001a905350612097600a8661321c565b9450612037565b606060006120ad836002613230565b6120b8906002613204565b6001600160401b038111156120cf576120cf613355565b6040519080825280601f01601f1916602001820160405280156120f9576020820181803683370190505b509050600360fc1b816000815181106121145761211461333f565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106121435761214361333f565b60200101906001600160f81b031916908160001a9053506000612167846002613230565b612172906001613204565b90505b60018111156121ea576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106121a6576121a661333f565b1a60f81b8282815181106121bc576121bc61333f565b60200101906001600160f81b031916908160001a90535060049490941c936121e381613292565b9050612175565b50831561086a5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016105f8565b6001600160a01b03821661228f5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016105f8565b61229881611573565b156122e55760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016105f8565b6001600160a01b038216600090815260036020526040812080546001929061230e908490613204565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60606000612384846001600160a01b0316601461209e565b9050600061239184611fa1565b905081816040516020016123a6929190612bab565b6040516020818303038152906040529250505092915050565b60606000826000015183602001518460400151856060015186608001516040516020016123f0959493929190612e72565b604051602081830303815290604052905060008184608001518560a001518660c001518760e0015188610100015160405160200161243396959493929190612950565b60408051601f19818403018152919052949350505050565b828054612457906132a9565b90600052602060002090601f01602090048101928261247957600085556124bf565b82601f1061249257805160ff19168380011785556124bf565b828001600101855582156124bf579182015b828111156124bf5782518255916020019190600101906124a4565b506124cb9291506124cf565b5090565b5b808211156124cb57600081556001016124d0565b60006001600160401b038311156124fd576124fd613355565b612510601f8401601f19166020016131d4565b905082815283838301111561252457600080fd5b828260208301376000602084830101529392505050565b80356001600160a01b038116811461255257600080fd5b919050565b60006020828403121561256957600080fd5b61086a8261253b565b6000806040838503121561258557600080fd5b61258e8361253b565b915061259c6020840161253b565b90509250929050565b6000806000606084860312156125ba57600080fd5b6125c38461253b565b92506125d16020850161253b565b9150604084013590509250925092565b600080600080608085870312156125f757600080fd5b6126008561253b565b935061260e6020860161253b565b92506040850135915060608501356001600160401b0381111561263057600080fd5b8501601f8101871361264157600080fd5b612650878235602084016124e4565b91505092959194509250565b6000806040838503121561266f57600080fd5b6126788361253b565b91506020830135801515811461268d57600080fd5b809150509250929050565b600080604083850312156126ab57600080fd5b6126b48361253b565b946020939093013593505050565b600060208083850312156126d557600080fd5b82356001600160401b03808211156126ec57600080fd5b818501915085601f83011261270057600080fd5b81358181111561271257612712613355565b8060051b91506127238483016131d4565b8181528481019084860184860187018a101561273e57600080fd5b600095505b83861015612761578035835260019590950194918601918601612743565b5098975050505050505050565b60006020828403121561278057600080fd5b813561086a8161336b565b60006020828403121561279d57600080fd5b815161086a8161336b565b6000602082840312156127ba57600080fd5b81356001600160401b038111156127d057600080fd5b8201601f810184136127e157600080fd5b6116c0848235602084016124e4565b60006020828403121561280257600080fd5b5035919050565b60006020828403121561281b57600080fd5b5051919050565b6000806040838503121561283557600080fd5b8235915061259c6020840161253b565b6000806040838503121561285857600080fd5b50508035926020909101359150565b6000815180845261287f816020860160208601613266565b601f01601f19169290920160200192915050565b600081516128a5818560208601613266565b9290920192915050565b600085516128c1818460208a01613266565b8551908301906128d5818360208a01613266565b6c1116101134b6b0b3b2911d101160991b910190815284516128fe81600d840160208901613266565b731116101130b734b6b0ba34b7b72fbab936111d1160611b600d92909101918201528351612933816021840160208801613266565b61227d60f01b602192909101918201526023019695505050505050565b6000875160206129638285838d01613266565b7f7d202e6869676853636f7265207b666f6e743a203235707820436f7572696572918401918252683b2066696c6c3a202360b81b8183015288516129ad81602985018c8501613266565b757d202e6261636b67726f756e64207b66696c6c3a202360501b6029939091019283015287516129e381603f8501848c01613266565b6e7d202e6d6170207b66696c6c3a202360881b603f93909101928301528651612a1281604e8501848b01613266565b7f7d202e666f6f64207b7374726f6b653a20233030303b2066696c6c3a20230000604e93909101928301528551612a4f81606c8501848a01613266565b612aa3612a8d612a87606c848701017f7d202e736e616b657b7374726f6b653a20233030303b2066696c6c3a202300008152601e0190565b88612893565b693e901e17b9ba3cb6329f60b11b8152600a0190565b9b9a5050505050505050505050565b60008651612ac4818460208b01613266565b865190830190612ad8818360208b01613266565b8651910190612aeb818360208a01613266565b8551910190612afe818360208901613266565b8451910190612b11818360208801613266565b01979650505050505050565b7f3c21444f43545950452068746d6c3e203c68746d6c3e3c6f626a65637420747981527838329e9134b6b0b3b297b9bb3395bc36b611103230ba309e9160391b602082015260008251612b77816039850160208701613266565b7f2220616c743d22736e616b65223e3c2f6f626a6563743e3c2f68746d6c3e00006039939091019283015250605701919050565b7f3c6720636c6173733d226d65746164617461223e203c7465787420783d223530815271011103c9e911c981811101f37bbb732b91d160751b602082015260008351612bfe816032850160208801613266565b7f3c2f746578743e203c7465787420783d2235302220793d22393530223e0000006032918401918201528351612c3b81604f840160208801613266565b711798981818181e17ba32bc3a1f101e17b39f60711b604f9290910191820152606101949350505050565b7519185d184e9d195e1d0bda1d1b5b0ed8985cd94d8d0b60521b815260008251612c97816016850160208701613266565b9190910160160192915050565b707b226e616d65223a2022536e616b65202360781b81528451600090612cd1816011850160208a01613266565b7f222c20226465736372697074696f6e223a202246756c6c79206f6e20636861696011918401918201527f6e2067616d65206f6620536e616b652e20546f20706c61792c2073696d706c7960318201527f20636f70792074686520696d6167652075726c20616e6420706173746520697460518201527f20696e2061207765622062726f777365722e204f722c20766973697420746865607182015273040b69eccccd2c6d2c2d840aecac4e6d2e8caba560631b60918201528551612d9d8160a5840160208a01613266565b7f2920746f207669657720616e6420706c617920796f75722067616d65732e222c60a5929091019182015270101132bc3a32b93730b62fbab936111d1160791b60c5820152612e67612e4d612e47612df860d6850189612893565b7f222c202261747472696275746573223a205b7b2274726169745f74797065223a81527f2022436f6c6f7220536368656d65222c202276616c7565223a220000000000006020820152603a0190565b86612893565b6d113eae96101137bbb732b9111d1160911b8152600e0190565b979650505050505050565b7f3c7374796c653e202e6d65746164617461207b20666f6e743a2020333070782081526f436f75726965723b2066696c6c3a202360801b602082015260008651612ec3816030850160208b01613266565b7f207d202e7469746c65207b20666f6e743a20203830707820436f75726965723b603091840191820152672066696c6c3a202360c01b60508201528651612f11816058840160208b01613266565b7f207d202e7374617274207b666f6e743a203335707820436f75726965723b20666058929091019182015278696c6c2d6f7061636974793a202e37303b2066696c6c3a202360381b60788201528551612f71816091840160208a01613266565b7f7d202e646972656374696f6e73207b666f6e743a206974616c69632033307078609192909101918201527f20436f75726965723b2066696c6c2d6f7061636974793a202e37303b2066696c60b1820152636c3a202360e01b60d182015261302061301a612fe260d5840188612893565b7f207d202e73636f7265207b666f6e743a203430707820436f75726965723b2066815265696c6c3a202360d01b602082015260260190565b85612893565b98975050505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c00000081526000825161306481601d850160208701613266565b91909101601d0192915050565b7f646174613a696d6167652f7376672b786d6c3b6261736536342c0000000000008152600082516130a981601a850160208701613266565b91909101601a0192915050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906113aa90830184612867565b60208152600061086a6020830184612867565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b604051601f8201601f191681016001600160401b03811182821017156131fc576131fc613355565b604052919050565b6000821982111561321757613217613313565b500190565b60008261322b5761322b613329565b500490565b600081600019048311821515161561324a5761324a613313565b500290565b60008282101561326157613261613313565b500390565b60005b83811015613281578181015183820152602001613269565b83811115610b125750506000910152565b6000816132a1576132a1613313565b506000190190565b600181811c908216806132bd57607f821691505b602082108114156132de57634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156132f8576132f8613313565b5060010190565b60008261330e5761330e613329565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b0319811681146107b057600080fdfe3c726563742069643d22736e616b652220636c6173733d22736e616b652220783d223530302220793d22353030222077696474683d22323022206865696768743d223230222f3e203c726563742069643d22666f6f642220636c6173733d22666f6f642220783d222d35302220793d222d3530222077696474683d22323022206865696768743d223230222f3e203c73637269707420747970653d22746578742f6a617661736372697074223e3c215b43444154415b76617220666f6f64436f6f7264732c4b45593d7b773a38372c613a36352c733a38332c643a36382c73706163653a33327d2c6d6f766553706565643d32302c73636f72653d302c6869676853636f7265733d5b5d2c736e616b65486561643d646f63756d656e742e676574456c656d656e74427949642822736e616b6522292c7376673d646f63756d656e742e676574456c656d656e747342795461674e616d65282273766722295b305d2c7374617274546578743d646f63756d656e742e676574456c656d656e7442794964282273746172745465787422292c646972656374696f6e733d646f63756d656e742e676574456c656d656e74427949642822646972656374696f6e7322292c666f6f643d646f63756d656e742e676574456c656d656e74427949642822666f6f6422292c73636f7265436f756e7465723d646f63756d656e742e676574456c656d656e7442794964282273636f7265436f756e74657222293b7374617274546578742e74657874436f6e74656e743d22707265737320737061636520746f207374617274222c646972656374696f6e732e74657874436f6e74656e743d227468656e20772c20612c20732c2064223b76617220736e616b65426f64793d5b5d3b69735475726e696e673d21312c697352756e6e696e673d21313b7661722063757272656e74446972656374696f6e3d227269676874223b646f63756d656e742e646f63756d656e74456c656d656e742e6164644576656e744c697374656e657228226b6579646f776e222c653d3e7b68616e646c65496e7075742865297d2c2131293b7661722074696d657246756e6374696f6e3d6e756c6c3b66756e6374696f6e20737461727447616d6528297b6e756c6c3d3d74696d657246756e6374696f6e26262874696d657246756e6374696f6e3d736574496e74657276616c28676f2c3830292c72616e646f6d5f666f6f6428292c7374617274546578742e74657874436f6e74656e743d22222c646972656374696f6e732e74657874436f6e74656e743d22222c73636f7265436f756e7465722e74657874436f6e74656e743d73636f72652c697352756e6e696e673d2130297d66756e6374696f6e2075706461746553636f726528297b73636f72652b3d312c73636f7265436f756e7465722e74657874436f6e74656e743d73636f72657d66756e6374696f6e2072616e646f6d5f666f6f6428297b76617220653d4d6174682e666c6f6f722833302a4d6174682e72616e646f6d2829292c743d4d6174682e666c6f6f722833302a4d6174682e72616e646f6d2829293b652b3230303e373830262628653d373830292c742b3230303e373830262628743d373830292c666f6f64436f6f7264733d5b32302a652b3230302c32302a742b3230305d2c666f6f642e736574417474726962757465282278222c32302a652b323030292c666f6f642e736574417474726962757465282279222c32302a742b323030297d66756e6374696f6e207570646174654869676853636f726528297b76617220653d6869676853636f7265732e6c656e6774683b69662873636f72653c3d6869676853636f7265735b652d315d7c7c6869676853636f7265732e696e636c756465732873636f7265292972657475726e3b653e3d3526266869676853636f7265732e706f7028293b6c657420743d6869676853636f7265732e66696e64496e64657828653d3e73636f72653e65293b6869676853636f7265732e73706c69636528742c302c73636f7265293b666f7228766172206e3d313b6e3c3d6869676853636f7265732e6c656e6774683b6e2b2b297b646f63756d656e742e676574456c656d656e744279496428606873247b6e7d60292e74657874436f6e74656e743d6869676853636f7265735b6e2d315d7d7d66756e6374696f6e20726573657428297b69662831213d697352756e6e696e67297b646f63756d656e742e646f63756d656e74456c656d656e742e72656d6f76654576656e744c697374656e657228226b6579646f776e222c66756e6374696f6e2865297b68616e646c65496e7075742865297d2c2131292c636c656172496e74657276616c2874696d657246756e6374696f6e292c74696d657246756e6374696f6e3d6e756c6c2c69735475726e696e673d21313b666f722876617220653d303b653c736e616b65426f64792e6c656e6774683b652b2b297376672e72656d6f76654368696c6428736e616b65426f64795b655d293b736e616b65426f64793d5b5d2c73636f7265436f756e7465722e74657874436f6e74656e743d73636f72653d302c666f6f642e736574417474726962757465282278222c2d3530292c666f6f642e736574417474726962757465282279222c2d3530292c7374617274546578742e74657874436f6e74656e743d22707265737320737061636520746f207374617274222c646972656374696f6e732e74657874436f6e74656e743d227468656e20772c20612c20732c2064222c736e616b65486561642e736574417474726962757465282278222c353030292c736e616b65486561642e736574417474726962757465282279222c353030292c646f63756d656e742e646f63756d656e74456c656d656e742e6164644576656e744c697374656e657228226b6579646f776e222c66756e6374696f6e2865297b68616e646c65496e7075742865297d2c2131297d7d66756e6374696f6e20617070656e64536e616b6528297b76617220653d736e616b65486561642e636c6f6e654e6f6465282130292c743d736e616b65426f64792e6c656e6774683b743e30262628652e736574417474726962757465282278222c312a736e616b65426f64795b742d315d2e6765744174747269627574652822782229292c652e736574417474726962757465282279222c312a736e616b65426f64795b742d315d2e676574417474726962757465282279222929292c736e616b65426f64792e707573682865292c7376672e617070656e644368696c642865297d66756e6374696f6e20757064617465536e616b6528297b666f722876617220653d312a736e616b65486561642e67657441747472696275746528227822292c743d312a736e616b65486561642e67657441747472696275746528227922292c6e3d736e616b65426f64792e6c656e6774682d313b6e3e3d303b6e2d2d29696628303d3d6e29736e616b65426f64795b305d2e736574417474726962757465282278222c65292c736e616b65426f64795b305d2e736574417474726962757465282279222c74293b656c73657b766172206f3d312a736e616b65426f64795b6e2d315d2e67657441747472696275746528227822292c723d312a736e616b65426f64795b6e2d315d2e67657441747472696275746528227922293b696628736e616b65426f64795b6e5d2e736574417474726962757465282278222c6f292c736e616b65426f64795b6e5d2e736574417474726962757465282279222c72292c6f3d3d652626723d3d74297b697352756e6e696e673d21312c7570646174654869676853636f726528292c726573657428293b627265616b7d7d69735475726e696e673d21317d66756e6374696f6e20676f28297b76617220653d312a736e616b65486561642e67657441747472696275746528227822292c743d312a736e616b65486561642e67657441747472696275746528227922293b696628757064617465536e616b6528292c313d3d697352756e6e696e67297377697463682863757272656e74446972656374696f6e297b63617365227269676874223a736e616b65486561642e736574417474726962757465282278222c652b3d6d6f76655370656564293b627265616b3b63617365226c656674223a736e616b65486561642e736574417474726962757465282278222c652d3d6d6f76655370656564293b627265616b3b63617365227570223a736e616b65486561642e736574417474726962757465282279222c742d3d6d6f76655370656564293b627265616b3b6361736522646f776e223a736e616b65486561642e736574417474726962757465282279222c742b3d6d6f76655370656564297d28653c3d3138307c7c653e3d3830307c7c743c3d3138307c7c743e3d38303029262628697352756e6e696e673d21312c7570646174654869676853636f726528292c72657365742829292c653d3d666f6f64436f6f7264735b305d2626743d3d666f6f64436f6f7264735b315d26262872616e646f6d5f666f6f6428292c75706461746553636f726528292c617070656e64536e616b652829297d66756e6374696f6e2068616e646c65496e7075742865297b696628652e6b6579436f64653d3d4b45592e73706163652626737461727447616d6528292c31213d69735475726e696e67297377697463682869735475726e696e673d21302c652e6b6579436f6465297b63617365204b45592e773a22646f776e22213d63757272656e74446972656374696f6e26262863757272656e74446972656374696f6e3d22757022293b627265616b3b63617365204b45592e733a22757022213d63757272656e74446972656374696f6e26262863757272656e74446972656374696f6e3d22646f776e22293b627265616b3b63617365204b45592e613a22726967687422213d63757272656e74446972656374696f6e26262863757272656e74446972656374696f6e3d226c65667422293b627265616b3b63617365204b45592e643a226c65667422213d63757272656e74446972656374696f6e26262863757272656e74446972656374696f6e3d22726967687422297d7d5d5d3e3c2f7363726970743e203c2f7376673e3c67207374726f6b653d222330303022203e203c7265637420636c6173733d226261636b67726f756e642220783d22302220793d2230222072783d223135222077696474683d223130303022206865696768743d2231303030222f3e203c7265637420636c6173733d226d61702220783d223230302220793d22323030222077696474683d2236303022206865696768743d22363030222f3e203c2f673e203c7465787420793d223132302220783d223530252220746578742d616e63686f723d226d6964646c652220636c6173733d227469746c65223e736e616b653c2f746578743e203c746578742069643d227374617274546578742220783d223530252220793d223630302220746578742d616e63686f723d226d6964646c652220636c6173733d22737461727422203e3c2f746578743e203c746578742069643d22646972656374696f6e732220783d223530252220793d223635302220746578742d616e63686f723d226d6964646c652220636c6173733d22646972656374696f6e7322203e3c2f746578743e203c7465787420783d223930302220793d223235302220746578742d616e63686f723d226d6964646c652220636c6173733d2273636f726522203e2053636f72653a3c2f746578743e203c746578742069643d2273636f7265436f756e7465722220783d223833302220793d223330302220636c6173733d2273636f726522203e3c2f746578743e203c746578742020783d223930302220793d223535302220746578742d616e63686f723d226d6964646c652220636c6173733d226869676853636f726522203e20686967682073636f7265733a3c2f746578743e203c746578742069643d226873312220783d223833302220793d223630302220636c6173733d2273636f726522203e3c2f746578743e203c746578742069643d226873322220783d223833302220793d223635302220636c6173733d2273636f726522203e3c2f746578743e203c746578742069643d226873332220783d223833302220793d223730302220636c6173733d2273636f726522203e3c2f746578743e203c746578742069643d226873342220783d223833302220793d223735302220636c6173733d2273636f726522203e3c2f746578743e203c746578742069643d226873352220783d223833302220793d223830302220636c6173733d2273636f726522203e3c2f746578743e4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f3c73766720786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323030302f7376672220786d6c6e733a786c696e6b3d22687474703a2f2f7777772e77332e6f72672f313939392f786c696e6b222076696577426f783d2230203020313030302031303030223ea2646970667358221220e3b140fd674809e54a78fab2073000caa6928f444bdb02a47912d6250bfe884664736f6c63430008070033
Loading...
Loading
Loading...
Loading
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ 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.