Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 68 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw | 15522073 | 905 days ago | IN | 0 ETH | 0.00054425 | ||||
Mint BSD | 15363454 | 930 days ago | IN | 0.01 ETH | 0.00076689 | ||||
Mint BSD | 15363453 | 930 days ago | IN | 0.01 ETH | 0.00086661 | ||||
Mint BSD | 15363449 | 930 days ago | IN | 0.01 ETH | 0.00102646 | ||||
Mint BSD | 15363431 | 930 days ago | IN | 0.01 ETH | 0.00071226 | ||||
Mint BSD | 15363428 | 930 days ago | IN | 0.01 ETH | 0.00072297 | ||||
Mint BSD | 15363427 | 930 days ago | IN | 0.01 ETH | 0.00066457 | ||||
Mint BSD | 15363425 | 930 days ago | IN | 0.01 ETH | 0.00079542 | ||||
Mint BSD | 15363423 | 930 days ago | IN | 0.01 ETH | 0.00081677 | ||||
Mint BSD | 15363422 | 930 days ago | IN | 0.01 ETH | 0.00078403 | ||||
Mint BSD | 15363422 | 930 days ago | IN | 0.01 ETH | 0.00078403 | ||||
Mint BSD | 15363422 | 930 days ago | IN | 0.01 ETH | 0.00078403 | ||||
Mint BSD | 15363422 | 930 days ago | IN | 0.01 ETH | 0.00078403 | ||||
Mint BSD | 15363417 | 930 days ago | IN | 0.01 ETH | 0.00072799 | ||||
Mint BSD | 15363417 | 930 days ago | IN | 0.01 ETH | 0.00072799 | ||||
Mint BSD | 15363407 | 930 days ago | IN | 0.01 ETH | 0.00072357 | ||||
Mint BSD | 15363407 | 930 days ago | IN | 0.01 ETH | 0.00072357 | ||||
Mint BSD | 15363406 | 930 days ago | IN | 0.01 ETH | 0.00072438 | ||||
Mint BSD | 15363405 | 930 days ago | IN | 0.01 ETH | 0.00074136 | ||||
Mint BSD | 15363405 | 930 days ago | IN | 0.01 ETH | 0.00074136 | ||||
Mint BSD | 15363403 | 930 days ago | IN | 0.01 ETH | 0.00069456 | ||||
Mint BSD | 15363402 | 930 days ago | IN | 0.01 ETH | 0.00062892 | ||||
Mint BSD | 15363379 | 930 days ago | IN | 0.01 ETH | 0.00074227 | ||||
Mint BSD | 15363377 | 930 days ago | IN | 0.01 ETH | 0.00078636 | ||||
Mint BSD | 15363376 | 930 days ago | IN | 0.01 ETH | 0.0008074 |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
BSD
Compiler Version
v0.8.14+commit.80d49f37
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: Unknown pragma solidity ^0.8.0; import "./ERC721Tradable.sol"; import "@openzeppelin/contracts/interfaces/IERC2981.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; /** * @title BSD NFT * * Big Swinging Dick - Just like life, it's random, but if you're a true * BSD you can certainly influence the outcome. :) * * Mint your BSD and roll the dice as your BSD traits are randomly generated * on chain. If you feel like showing off, enhance your BSD mint and * increase your odds joining the ranks of the Bull, Elephant or truly * rare Blue Whale Club with all the Big Dick Energy (BDE). * * Visit https://BSDnft.com to get your own permanent phallus (s/o to * Ida Jonsson and Simon Saarinen - The Ethereum Big D OG) * */ contract BSD is ERC721Tradable, IERC2981 { constructor(address _proxyRegistryAddress) ERC721Tradable("Big Swinging Dick", "BSD", _proxyRegistryAddress) { } // Structure is used in memory only, so not bit packed struct BsdStruct { uint length; uint girth; uint texture; uint shape; uint stamina; bool grower; bool gameOn; uint uses; uint uhOh; uint vitality; uint bde; } uint256 public royalty = 500; bool private _active; bool private _salePaused; bool private _interactionEnabled; string private _baseTokenURI; string private _contractURI; address private _interactionContract; uint public constant TOKEN_LIMIT = 18888; uint private _price = 30_000_000_000_000_000; uint private _maxPrice = 4_030_000_000_000_000_001; uint private _enhancementPrice = 500_000_000_000_000_000; uint private _totalEnhancement; mapping (uint256 => bytes32) private _tokenIdToTraits; mapping (uint256 => string) private _tokenIdToName; event BsdSpotted(uint indexed tokenId, bytes32 traits); event BsdNamed(uint indexed tokenId, string name); /** * Read-only function to show details about the project. */ function contractURI() public view returns (string memory) { return _contractURI; } function _baseURI() internal view virtual override returns (string memory) { return _baseTokenURI; } /** * Read-only function to retrieve metadata for a token. */ function tokenURI(uint256 _tokenId) override public view returns (string memory) { return string(abi.encodePacked(_baseURI(), Strings.toString(_tokenId))); } /** * Read-only function to determine if sale is active. */ function active() external view returns(bool) { return _active; } /** * Read-only function to retrieve the current price to mint a BSD. */ function getMintPrice() public view returns (uint256) { require(_active, "Not active"); return _price; } /** * Read-only function to retrieve the maximum allowed price to mint a BSD. */ function getMaxPrice() public view returns (uint256) { require(_active, "Not active"); return _maxPrice; } /** * Read-only function to retrieve the current price for maximum enhancement. */ function getEnhancementPrice() public view returns (uint256) { require(_active, "Not active"); return _enhancementPrice; } /** * Read-only function to retrieve current price to mint a BSD, the maximum price, * and the enhancement price. */ function showPrices() public view returns (uint mintP, uint maxP, uint enhanceP){ return (getMintPrice(), getMaxPrice(), getEnhancementPrice()); } /** * Read-only function to retrieve the name a user gave to their BSD. */ function tokenName(uint256 tokenId) public view returns (string memory){ return _tokenIdToName[tokenId]; } /** * Function to show traits of a token */ function tokenDescription(uint256 tokenId) public view returns (string memory){ require(tokenId <= totalSupply(), "Token does not exist"); (BsdStruct memory bsdData) = tokenDescriptionArray(tokenId); return tokenDescriptionFromBsd(bsdData); } function tokenDescriptionFromBsd(BsdStruct memory bsdData) private pure returns (string memory){ string memory lString = Strings.toString(bsdData.length); string memory lStringImperial = _cmToInchString(bsdData.length); string memory gString = Strings.toString(bsdData.girth); string memory gStringImperial = _cmToInchString(bsdData.girth); string memory tString = "smooth"; string memory stString = "normal"; if (bsdData.stamina == 0) { stString = "early shooter"; } else if (bsdData.stamina == 2){ stString = "marathon man"; } if (bsdData.texture < 2) { tString = "veiny"; } else if (bsdData.texture == 2){ tString = "bumpy"; } else if (bsdData.texture == 4){ tString = "hairy"; } string memory sString = "straight"; if (bsdData.shape == 1) { sString = "mushroom"; } else if (bsdData.shape == 2) { sString = "cone"; } else if (bsdData.shape == 3){ sString = "eggplant"; } else if (bsdData.shape == 4) { sString = "asparagus"; } else if (bsdData.shape == 5) { sString = "banana"; } string memory cString = bsdData.grower ? "grower" : "shower"; string memory rString = string(abi.encodePacked("length: ",lString,"cm / ", lStringImperial,"in, girth: ", gString,"cm / ", gStringImperial, "in, shape: ")); rString = string(abi.encodePacked(rString, sString, ", texture: ", tString, ", grower/shower: ", cString, ", stamina: ", stString)); rString = string(abi.encodePacked(rString, ", bde: ", Strings.toString(bsdData.bde), ", uses: ", Strings.toString(bsdData.uses))); rString = string(abi.encodePacked(rString,", vitality: ", Strings.toString(bsdData.vitality), ", uhOh: ",Strings.toString(bsdData.uhOh))); return rString; } /** * Read-only function to retrieve a tokens traits. */ function tokenDescriptionArray(uint256 tokenId) public view returns (BsdStruct memory) { return bsdArray(getRawTraits(tokenId)); } /** * Read-only function to retrieve the raw traits information. */ function getRawTraits(uint256 tokenId) public view returns (bytes32) { return _tokenIdToTraits[tokenId]; } /** * Internal function the computes traits from bytes32. */ function bsdArray(bytes32 bsd) private pure returns (BsdStruct memory bsdData){ bsdData.texture = _getBitsFromBytesAsUint(bsd, 3, 0); bsdData.shape = _getBitsFromBytesAsUint(bsd, 3, 1); bsdData.grower = _getBitsFromBytesAsUint(bsd, 3, 2) < 7 ? true : false; uint st = 0; for (uint s = 0; s < 8; s++) { st = st + _getBitsFromBytesAsUint(bsd,2,s * 6 + 4); } bsdData.stamina = 1; if(st < 9){ bsdData.stamina = 0; } else if (st > 19){ bsdData.stamina = 2; } bsdData.gameOn = _getBitsFromBytesAsUint(bsd, 1, 255) == 1 ? true : false; bsdData.uses = _getBitsFromBytesAsUint(bsd, 3, 84); bsdData.uhOh = _getBitsFromBytesAsUint(bsd, 2, 125); bsdData.vitality = 3 - _getBitsFromBytesAsUint(bsd, 2, 124); uint l; uint length; // Using the central limit thereom for a normal distribution. for (l = 0; l < 31; l++){ uint _addand = _getBitsFromBytesAsUint(bsd, 8, l); length = length + (_addand > 172 ? 128 : 0) + _addand; } if (length > 248){ length = length - 248; } bsdData.length = length / 248 ; uint g; uint girth; for (g = 0; g < 41; g++){ uint _gAddand = _getBitsFromReversedBytesAsUint(bsd, 8, 6, g); girth = girth + (_gAddand > 50 ? 60 : 0) + _gAddand; } girth = (girth + 960); bsdData.girth = girth / 192; bsdData.bde = (bsdData.girth * bsdData.girth * bsdData.length) / 1131; } /** * Read-only function to retrieve the total number of NFTs that have been minted thus far */ function getTotalMinted() external view returns (uint256) { return totalSupply(); } // Royalty info function royaltyInfo ( // solhint-disable-next-line no-unused-vars uint256 _tokenId, uint256 _salePrice ) external view override(IERC2981) returns ( address receiver, uint256 royaltyAmount ) { // Royalty payment is 5% of the sale price uint256 royaltyPmt = _salePrice*royalty/10000; require(_tokenId < totalSupply(), "Invalid token"); require(royaltyPmt > 0, "Royalty must be greater than 0"); return (address(this), royaltyPmt); } // Callable functions /** * Mint your BSD. */ function mint() external payable { require(_active == true && !_salePaused, "Sale not active"); require(totalSupply() < TOKEN_LIMIT, "Sold out"); require(balanceOf(msg.sender) == 0 || msg.value >= _enhancementPrice || msg.value >= (_maxPrice - _price), "Max of one base price BSD"); require(msg.value >= _price && msg.value <= _maxPrice, "Invalid amount sent"); uint tokenId = _mintTo(msg.sender); bytes32 attributes = _generateAttributes(tokenId, msg.value); _tokenIdToTraits[tokenId] = attributes; } /** * Everyone has a pet name for their BSD. */ function nameMyBSD(uint idToken, string memory name) external payable{ require(ERC721.ownerOf(idToken) == msg.sender, "Not the owner"); require(msg.value == _price, "Invalid amount sent"); _tokenIdToName[idToken] = name; emit BsdNamed(idToken, name); } /** * Allow the external game to interact with your token. */ function toggleGameOnForToken(uint idToken) external payable { require(ERC721.ownerOf(idToken) == msg.sender, "Not the owner"); require(msg.value == _price, "Invalid amount sent"); bytes32 current = _tokenIdToTraits[idToken]; uint currentSet = _getBitsFromBytesAsUint(current, 1, 255); current = ((current << 1) >> 1); bytes32 mask = hex"80"; if (currentSet == 1){ mask = ~mask; current = current & mask; } else{ current = current | mask; } _tokenIdToTraits[idToken] = current; } /** * Functions to generate attributes for newly minted BSD tokens. */ function _generateAttributes(uint tokenId, uint bdprice) private returns (bytes32) { bytes32 randomAttributes = _random(tokenId); if (bdprice > _price){ uint max = bdprice > (_enhancementPrice + _price) ? (_enhancementPrice + _price) : bdprice; uint n = (112 * (max - _price)) / _enhancementPrice; bytes32 randomAddition = _random160(tokenId); randomAddition = randomAddition << (160 - n); randomAddition = randomAddition >> (240 - n); randomAttributes = randomAttributes | randomAddition; uint fraction = 40000 * (max - _price) / _enhancementPrice; uint add = fraction * _enhancementPrice / 10000000; // Each time a token is generated with enhancement, we increase the enhancement price. _enhancementPrice = _enhancementPrice + add; } // The first byte is reserved for the interacting contract return (randomAttributes >> 8); } /** * Utility functions used internally **/ function _random(uint tokenId) private view returns (bytes32) { return (keccak256(abi.encodePacked(tokenId, block.timestamp, blockhash(block.number - 1)))); } function _random160(uint tokenId) private view returns (bytes32) { return ((keccak256(abi.encodePacked(block.difficulty, block.timestamp,tokenId))) << 96) ; } function _getBitsFromBytesAsUint(bytes32 input, uint bits, uint position) private pure returns (uint){ bytes32 temp = input >> (position * bits); bytes32 mask = bytes32(uint256(2 ** bits - 1)); temp = temp & mask; return uint(temp); } function _getBitsFromReversedBytesAsUint(bytes32 input, uint offset, uint bits, uint position) private pure returns (uint){ bytes32 temp = input >> (256 - offset - ((position + 1) * bits)); bytes32 mask = bytes32(uint256(2 ** bits - 1)); temp = temp & mask; uint i = 0; uint m = 1; uint total = 0; mask = bytes32(uint256(1)); for(i = 0; i < bits; i++){ bytes32 temp2 = temp >> (bits - i - 1); temp2 = temp2 & mask; uint tempUint = uint(temp2); total = total + (m * tempUint); m = m * 2; } return total; } function _cmToInch(uint cm) private pure returns (uint whole, uint part) { whole = (cm * 100) / 254; uint remainder = (cm * 100) % 254; part = (remainder * 100 + 1270) / 2540; if (part == 10){ whole = whole + 1; part = 0; } } function _cmToInchString(uint cm) private pure returns (string memory){ (uint gImp, uint gImpDec) = _cmToInch(cm); return string(abi.encodePacked(Strings.toString(gImp), ".", Strings.toString(gImpDec))); } /* * Game function for interacting contract - can only be enabled by owner of NFT. */ function gameOn(bytes1 newTraits, uint idToken) external { require(_interactionEnabled == true, "Invalid call"); require(msg.sender == _interactionContract, "Invalid call"); require(msg.sender != address(0), "Invalid call"); bytes32 modifyTraits = _tokenIdToTraits[idToken]; uint enabled = _getBitsFromBytesAsUint(modifyTraits, 1, 255); require(enabled == 1, "Invalid call"); bytes1 newTrait = ((newTraits << 1) >> 1) | bytes1(uint8(0x80)); bytes32 mask = bytes32(newTrait); modifyTraits = (modifyTraits << 8) >> 8; _tokenIdToTraits[idToken] = modifyTraits | mask; } // Owner functions function setBaseURI(string memory _uri) external onlyOwner { _baseTokenURI = _uri; } function withdraw(address payable recipient, uint256 amount) external onlyOwner { recipient.transfer(amount); } function setContractURI(string memory contractURI_) external onlyOwner { _contractURI = contractURI_; } function startSale() external onlyOwner { require(!_active, "Already active"); _active = true; } function updateSaleParams(uint setPrice, uint enhancePrice, uint maxPrice) external onlyOwner { require(_active, "Not active"); _price = setPrice; _maxPrice = maxPrice; _enhancementPrice = enhancePrice; } function pauseSale(bool paused) external onlyOwner { _salePaused = paused; } function setInteractingContract(bool isActive, address interacting) external onlyOwner { _interactionEnabled = isActive; _interactionContract = interacting; } function mintBSD(address recipient) external payable onlyOwner { require(_active == true && !_salePaused, "Sale not active"); require(totalSupply() < TOKEN_LIMIT, "Sold out"); require(msg.value >= _price && msg.value <= _maxPrice && msg.value <= (_enhancementPrice + _price), "Invalid amount sent"); uint tokenId = _mintTo(recipient); bytes32 attributes = _generateAttributes(tokenId, msg.value); _tokenIdToTraits[tokenId] = attributes; } }
// 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 (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 pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "./common/meta-transactions/ContentMixin.sol"; import "./common/meta-transactions/NativeMetaTransaction.sol"; contract OwnableDelegateProxy {} /** * Used to delegate ownership of a contract to another address, to save on unneeded transactions to approve contract use for users */ contract ProxyRegistry { mapping(address => OwnableDelegateProxy) public proxies; } /** * @title ERC721Tradable * ERC721Tradable - ERC721 contract that whitelists a trading address, and has minting functionality. */ abstract contract ERC721Tradable is ERC721, ContextMixin, NativeMetaTransaction, Ownable { using Counters for Counters.Counter; /** * We rely on the OZ Counter util to keep track of the next available ID. * We track the nextTokenId instead of the currentTokenId to save users on gas costs. * Read more about it here: https://shiny.mirror.xyz/OUampBbIz9ebEicfGnQf5At_ReMHlZy0tB4glb9xQ0E */ Counters.Counter private _nextTokenId; address _proxyRegistryAddress; constructor( string memory _name, string memory _symbol, address proxyRegistryAddress ) ERC721(_name, _symbol) { _proxyRegistryAddress = proxyRegistryAddress; // nextTokenId is initialized to 1, since starting at 0 leads to higher gas cost for the first minter _nextTokenId.increment(); _initializeEIP712(_name); } /** * @dev Mints a token to an address with a tokenURI. * @param _to address of the future owner of the token */ function _mintTo(address _to) internal returns (uint) { uint256 currentTokenId = _nextTokenId.current(); _nextTokenId.increment(); _safeMint(_to, currentTokenId); return currentTokenId; } /** @dev Returns the total tokens minted so far. 1 is always subtracted from the Counter since it tracks the next available tokenId. */ function totalSupply() public view returns (uint256) { return _nextTokenId.current() - 1; } /* function baseTokenURI() virtual public view returns (string memory); function tokenURI(uint256 _tokenId) override public view returns (string memory) { return string(abi.encodePacked(baseTokenURI(), Strings.toString(_tokenId))); } */ /** * Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings. */ function isApprovedForAll(address owner, address operator) override public view returns (bool) { // Whitelist OpenSea proxy contract for easy trading. ProxyRegistry proxyRegistry = ProxyRegistry(_proxyRegistryAddress); if (address(proxyRegistry.proxies(owner)) == operator) { return true; } return super.isApprovedForAll(owner, operator); } /** * This is used instead of msg.sender as transactions won't be sent by the original token owner, but by OpenSea. */ function _msgSender() internal override view returns (address sender) { return ContextMixin.msgSender(); } function updateProxyRegistry(address newAddress) external onlyOwner { _proxyRegistryAddress = newAddress; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {EIP712Base} from "./EIP712Base.sol"; contract NativeMetaTransaction is EIP712Base { bytes32 private constant META_TRANSACTION_TYPEHASH = keccak256( bytes( "MetaTransaction(uint256 nonce,address from,bytes functionSignature)" ) ); event MetaTransactionExecuted( address userAddress, address payable relayerAddress, bytes functionSignature ); mapping(address => uint256) nonces; /* * Meta transaction structure. * No point of including value field here as if user is doing value transfer then he has the funds to pay for gas * He should call the desired function directly in that case. */ struct MetaTransaction { uint256 nonce; address from; bytes functionSignature; } function executeMetaTransaction( address userAddress, bytes memory functionSignature, bytes32 sigR, bytes32 sigS, uint8 sigV ) public payable returns (bytes memory) { MetaTransaction memory metaTx = MetaTransaction({ nonce: nonces[userAddress], from: userAddress, functionSignature: functionSignature }); require( verify(userAddress, metaTx, sigR, sigS, sigV), "Signer and signature do not match" ); // increase nonce for user (to avoid re-use) nonces[userAddress] = nonces[userAddress] + 1; emit MetaTransactionExecuted( userAddress, payable(msg.sender), functionSignature ); // Append userAddress and relayer address at the end to extract it from calling context (bool success, bytes memory returnData) = address(this).call( abi.encodePacked(functionSignature, userAddress) ); require(success, "Function call not successful"); return returnData; } function hashMetaTransaction(MetaTransaction memory metaTx) internal pure returns (bytes32) { return keccak256( abi.encode( META_TRANSACTION_TYPEHASH, metaTx.nonce, metaTx.from, keccak256(metaTx.functionSignature) ) ); } function getNonce(address user) public view returns (uint256 nonce) { nonce = nonces[user]; } function verify( address signer, MetaTransaction memory metaTx, bytes32 sigR, bytes32 sigS, uint8 sigV ) internal view returns (bool) { require(signer != address(0), "NativeMetaTransaction: INVALID_SIGNER"); return signer == ecrecover( toTypedMessageHash(hashMetaTransaction(metaTx)), sigV, sigR, sigS ); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; abstract contract ContextMixin { function msgSender() internal view returns (address payable sender) { if (msg.sender == address(this)) { bytes memory array = msg.data; uint256 index = msg.data.length; assembly { // Load the 32 bytes word from memory with the address on the lower 20 bytes, and mask those. sender := and( mload(add(array, index)), 0xffffffffffffffffffffffffffffffffffffffff ) } } else { sender = payable(msg.sender); } return sender; } }
// 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/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 v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {Initializable} from "./Initializable.sol"; contract EIP712Base is Initializable { struct EIP712Domain { string name; string version; address verifyingContract; bytes32 salt; } string constant public ERC712_VERSION = "1"; bytes32 internal constant EIP712_DOMAIN_TYPEHASH = keccak256( bytes( "EIP712Domain(string name,string version,address verifyingContract,bytes32 salt)" ) ); bytes32 internal domainSeperator; // supposed to be called once while initializing. // one of the contracts that inherits this contract follows proxy pattern // so it is not possible to do this in a constructor function _initializeEIP712( string memory name ) internal initializer { _setDomainSeperator(name); } function _setDomainSeperator(string memory name) internal { domainSeperator = keccak256( abi.encode( EIP712_DOMAIN_TYPEHASH, keccak256(bytes(name)), keccak256(bytes(ERC712_VERSION)), address(this), bytes32(getChainId()) ) ); } function getDomainSeperator() public view returns (bytes32) { return domainSeperator; } function getChainId() public view returns (uint256) { uint256 id; assembly { id := chainid() } return id; } /** * Accept message hash and returns hash message in EIP712 compatible form * So that it can be used to recover signer from signature signed using EIP712 formatted data * https://eips.ethereum.org/EIPS/eip-712 * "\\x19" makes the encoding deterministic * "\\x01" is the version byte to make it compatible to EIP-191 */ function toTypedMessageHash(bytes32 messageHash) internal view returns (bytes32) { return keccak256( abi.encodePacked("\x19\x01", getDomainSeperator(), messageHash) ); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/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 pragma solidity ^0.8.0; contract Initializable { bool inited = false; modifier initializer() { require(!inited, "already inited"); _; inited = true; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_proxyRegistryAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"name","type":"string"}],"name":"BsdNamed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"traits","type":"bytes32"}],"name":"BsdSpotted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"userAddress","type":"address"},{"indexed":false,"internalType":"address payable","name":"relayerAddress","type":"address"},{"indexed":false,"internalType":"bytes","name":"functionSignature","type":"bytes"}],"name":"MetaTransactionExecuted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"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":"ERC712_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOKEN_LIMIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"active","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"},{"internalType":"bytes","name":"functionSignature","type":"bytes"},{"internalType":"bytes32","name":"sigR","type":"bytes32"},{"internalType":"bytes32","name":"sigS","type":"bytes32"},{"internalType":"uint8","name":"sigV","type":"uint8"}],"name":"executeMetaTransaction","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes1","name":"newTraits","type":"bytes1"},{"internalType":"uint256","name":"idToken","type":"uint256"}],"name":"gameOn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getChainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDomainSeperator","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getEnhancementPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMaxPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getNonce","outputs":[{"internalType":"uint256","name":"nonce","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getRawTraits","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalMinted","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":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"}],"name":"mintBSD","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"idToken","type":"uint256"},{"internalType":"string","name":"name","type":"string"}],"name":"nameMyBSD","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"paused","type":"bool"}],"name":"pauseSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"royalty","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"contractURI_","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"isActive","type":"bool"},{"internalType":"address","name":"interacting","type":"address"}],"name":"setInteractingContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"showPrices","outputs":[{"internalType":"uint256","name":"mintP","type":"uint256"},{"internalType":"uint256","name":"maxP","type":"uint256"},{"internalType":"uint256","name":"enhanceP","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startSale","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":"idToken","type":"uint256"}],"name":"toggleGameOnForToken","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenDescription","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenDescriptionArray","outputs":[{"components":[{"internalType":"uint256","name":"length","type":"uint256"},{"internalType":"uint256","name":"girth","type":"uint256"},{"internalType":"uint256","name":"texture","type":"uint256"},{"internalType":"uint256","name":"shape","type":"uint256"},{"internalType":"uint256","name":"stamina","type":"uint256"},{"internalType":"bool","name":"grower","type":"bool"},{"internalType":"bool","name":"gameOn","type":"bool"},{"internalType":"uint256","name":"uses","type":"uint256"},{"internalType":"uint256","name":"uhOh","type":"uint256"},{"internalType":"uint256","name":"vitality","type":"uint256"},{"internalType":"uint256","name":"bde","type":"uint256"}],"internalType":"struct BSD.BsdStruct","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenName","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAddress","type":"address"}],"name":"updateProxyRegistry","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"setPrice","type":"uint256"},{"internalType":"uint256","name":"enhancePrice","type":"uint256"},{"internalType":"uint256","name":"maxPrice","type":"uint256"}],"name":"updateSaleParams","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040526006805460ff191690556101f4600c55666a94d74f4300006011556737ed6fa5ecd300016012556706f05b59d3b200006013553480156200004457600080fd5b5060405162004233380380620042338339810160408190526200006791620003c4565b60405180604001604052806011815260200170426967205377696e67696e67204469636b60781b815250604051806040016040528060038152602001621094d160ea1b8152508282828160009080519060200190620000c89291906200031e565b508051620000de9060019060208401906200031e565b505050620000fb620000f56200014360201b60201c565b6200015f565b600b80546001600160a01b0319166001600160a01b0383161790556200012e600a620001b1602090811b62001cbb17901c565b6200013983620001ba565b5050505062000432565b60006200015a6200021e60201b62001cc41760201c565b905090565b600980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80546001019055565b60065460ff1615620002035760405162461bcd60e51b815260206004820152600e60248201526d185b1c9958591e481a5b9a5d195960921b604482015260640160405180910390fd5b6200020e816200027c565b506006805460ff19166001179055565b60003033036200027657600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b03169150620002799050565b50335b90565b6040518060800160405280604f8152602001620041e4604f9139805160209182012082519282019290922060408051808201825260018152603160f81b90840152805180840194909452838101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608401523060808401524660a0808501919091528151808503909101815260c090930190528151910120600755565b8280546200032c90620003f6565b90600052602060002090601f0160209004810192826200035057600085556200039b565b82601f106200036b57805160ff19168380011785556200039b565b828001600101855582156200039b579182015b828111156200039b5782518255916020019190600101906200037e565b50620003a9929150620003ad565b5090565b5b80821115620003a95760008155600101620003ae565b600060208284031215620003d757600080fd5b81516001600160a01b0381168114620003ef57600080fd5b9392505050565b600181811c908216806200040b57607f821691505b6020821081036200042c57634e487b7160e01b600052602260045260246000fd5b50919050565b613da280620004426000396000f3fe6080604052600436106102ae5760003560e01c80636352211e11610175578063a22cb465116100dc578063bf22d41011610095578063e8a3d4851161006f578063e8a3d48514610824578063e985e9c514610839578063f2fde38b14610859578063f3fef3a31461087957600080fd5b8063bf22d410146107b7578063c87b56dd146107e4578063e725f8771461080457600080fd5b8063a22cb4651461070a578063a7f93ebd1461072a578063a9e659d91461073f578063b66a0e5d14610752578063b88d4fde14610767578063bdb219fb1461078757600080fd5b80638da5cb5b1161012e5780638da5cb5b146106625780639278664514610680578063938e3d7b146106a057806395d89b41146106c05780639ba151ad146106d5578063a0c6d537146106ea57600080fd5b80636352211e146105c55780636877e067146105e557806369a59e281461060557806370a0823114610618578063715018a61461063857806382d8dff61461064d57600080fd5b806318160ddd116102195780632d0335ab116101d25780632d0335ab146104ef5780633408e4701461052557806342842e0e146105385780634a091ead1461055857806355f804b3146105855780635db0da72146105a557600080fd5b806318160ddd1461043d57806320379ee514610452578063226c3cbb1461046757806323b872dd1461047a57806329ee566c1461049a5780632a55205a146104b057600080fd5b80630c53c51c1161026b5780630c53c51c146103a05780630ca1c5c9146103b35780630cfed2a2146103c85780630f7e5970146103e85780631249c58b1461041557806312efdd7e1461041d57600080fd5b806301ffc9a7146102b357806302fb0c5e146102e8578063031bd4c41461030057806306fdde0314610324578063081812fc14610346578063095ea7b31461037e575b600080fd5b3480156102bf57600080fd5b506102d36102ce36600461311c565b610899565b60405190151581526020015b60405180910390f35b3480156102f457600080fd5b50600d5460ff166102d3565b34801561030c57600080fd5b506103166149c881565b6040519081526020016102df565b34801561033057600080fd5b506103396108eb565b6040516102df9190613191565b34801561035257600080fd5b506103666103613660046131a4565b61097d565b6040516001600160a01b0390911681526020016102df565b34801561038a57600080fd5b5061039e6103993660046131d2565b610a17565b005b6103396103ae3660046132a1565b610b3e565b3480156103bf57600080fd5b50610316610d28565b3480156103d457600080fd5b5061039e6103e3366004613334565b610d37565b3480156103f457600080fd5b50610339604051806040016040528060018152602001603160f81b81525081565b61039e610d9a565b34801561042957600080fd5b5061039e61043836600461334f565b610f16565b34801561044957600080fd5b50610316610f81565b34801561045e57600080fd5b50600754610316565b61039e61047536600461336c565b610f98565b34801561048657600080fd5b5061039e6104953660046133b3565b611065565b3480156104a657600080fd5b50610316600c5481565b3480156104bc57600080fd5b506104d06104cb3660046133f4565b61109d565b604080516001600160a01b0390931683526020830191909152016102df565b3480156104fb57600080fd5b5061031661050a36600461334f565b6001600160a01b031660009081526008602052604090205490565b34801561053157600080fd5b5046610316565b34801561054457600080fd5b5061039e6105533660046133b3565b611160565b34801561056457600080fd5b506103166105733660046131a4565b60009081526015602052604090205490565b34801561059157600080fd5b5061039e6105a0366004613416565b61117b565b3480156105b157600080fd5b5061039e6105c036600461344b565b6111db565b3480156105d157600080fd5b506103666105e03660046131a4565b611261565b3480156105f157600080fd5b5061039e610600366004613482565b6112d8565b61039e61061336600461334f565b611354565b34801561062457600080fd5b5061031661063336600461334f565b6114b8565b34801561064457600080fd5b5061039e61153f565b34801561065957600080fd5b50610316611594565b34801561066e57600080fd5b506009546001600160a01b0316610366565b34801561068c57600080fd5b5061039e61069b3660046134ae565b6115c0565b3480156106ac57600080fd5b5061039e6106bb366004613416565b6116a5565b3480156106cc57600080fd5b50610339611701565b3480156106e157600080fd5b50610316611710565b3480156106f657600080fd5b506103396107053660046131a4565b61173c565b34801561071657600080fd5b5061039e6107253660046134d9565b6117a9565b34801561073657600080fd5b506103166117bb565b61039e61074d3660046131a4565b6117e7565b34801561075e57600080fd5b5061039e6118b4565b34801561077357600080fd5b5061039e61078236600461350e565b611950565b34801561079357600080fd5b5061079c61198f565b604080519384526020840192909252908201526060016102df565b3480156107c357600080fd5b506107d76107d23660046131a4565b6119b7565b6040516102df919061357a565b3480156107f057600080fd5b506103396107ff3660046131a4565b6119d7565b34801561081057600080fd5b5061033961081f3660046131a4565b611a11565b34801561083057600080fd5b50610339611ab3565b34801561084557600080fd5b506102d3610854366004613609565b611ac2565b34801561086557600080fd5b5061039e61087436600461334f565b611b82565b34801561088557600080fd5b5061039e6108943660046131d2565b611c3c565b60006001600160e01b031982166380ac58cd60e01b14806108ca57506001600160e01b03198216635b5e139f60e01b145b806108e557506301ffc9a760e01b6001600160e01b03198316145b92915050565b6060600080546108fa90613627565b80601f016020809104026020016040519081016040528092919081815260200182805461092690613627565b80156109735780601f1061094857610100808354040283529160200191610973565b820191906000526020600020905b81548152906001019060200180831161095657829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166109fb5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610a2282611261565b9050806001600160a01b0316836001600160a01b031603610a8f5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016109f2565b806001600160a01b0316610aa1611d20565b6001600160a01b03161480610abd5750610abd81610854611d20565b610b2f5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016109f2565b610b398383611d2a565b505050565b60408051606081810183526001600160a01b03881660008181526008602090815290859020548452830152918101869052610b7c8782878787611d98565b610bd25760405162461bcd60e51b815260206004820152602160248201527f5369676e657220616e64207369676e617475726520646f206e6f74206d6174636044820152600d60fb1b60648201526084016109f2565b6001600160a01b038716600090815260086020526040902054610bf6906001613677565b6001600160a01b0388166000908152600860205260409081902091909155517f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b90610c4690899033908a9061368f565b60405180910390a1600080306001600160a01b0316888a604051602001610c6e9291906136c4565b60408051601f1981840301815290829052610c88916136fb565b6000604051808303816000865af19150503d8060008114610cc5576040519150601f19603f3d011682016040523d82523d6000602084013e610cca565b606091505b509150915081610d1c5760405162461bcd60e51b815260206004820152601c60248201527f46756e6374696f6e2063616c6c206e6f74207375636365737366756c0000000060448201526064016109f2565b98975050505050505050565b6000610d32610f81565b905090565b610d3f611d20565b6001600160a01b0316610d5a6009546001600160a01b031690565b6001600160a01b031614610d805760405162461bcd60e51b81526004016109f290613717565b600d80549115156101000261ff0019909216919091179055565b600d5460ff1615156001148015610db95750600d54610100900460ff16155b610df75760405162461bcd60e51b815260206004820152600f60248201526e53616c65206e6f742061637469766560881b60448201526064016109f2565b6149c8610e02610f81565b10610e3a5760405162461bcd60e51b815260206004820152600860248201526714dbdb19081bdd5d60c21b60448201526064016109f2565b610e43336114b8565b1580610e5157506013543410155b80610e6b5750601154601254610e67919061374c565b3410155b610eb75760405162461bcd60e51b815260206004820152601960248201527f4d6178206f66206f6e652062617365207072696365204253440000000000000060448201526064016109f2565b6011543410158015610ecb57506012543411155b610ee75760405162461bcd60e51b81526004016109f290613763565b6000610ef233611e88565b90506000610f008234611eae565b6000928352601560205260409092209190915550565b610f1e611d20565b6001600160a01b0316610f396009546001600160a01b031690565b6001600160a01b031614610f5f5760405162461bcd60e51b81526004016109f290613717565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b60006001610f8e600a5490565b610d32919061374c565b33610fa283611261565b6001600160a01b031614610fe85760405162461bcd60e51b815260206004820152600d60248201526c2737ba103a34329037bbb732b960991b60448201526064016109f2565b60115434146110095760405162461bcd60e51b81526004016109f290613763565b600082815260166020908152604090912082516110289284019061300f565b50817fe06a2507aded3dfb43241545773425fd446e72ae8a40a52205506cca63f4811c826040516110599190613191565b60405180910390a25050565b611076611070611d20565b82611fe0565b6110925760405162461bcd60e51b81526004016109f290613790565b610b398383836120b6565b6000806000612710600c54856110b391906137e1565b6110bd9190613816565b90506110c7610f81565b85106111055760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b2103a37b5b2b760991b60448201526064016109f2565b600081116111555760405162461bcd60e51b815260206004820152601e60248201527f526f79616c7479206d7573742062652067726561746572207468616e2030000060448201526064016109f2565b309590945092505050565b610b3983838360405180602001604052806000815250611950565b611183611d20565b6001600160a01b031661119e6009546001600160a01b031690565b6001600160a01b0316146111c45760405162461bcd60e51b81526004016109f290613717565b80516111d790600e90602084019061300f565b5050565b6111e3611d20565b6001600160a01b03166111fe6009546001600160a01b031690565b6001600160a01b0316146112245760405162461bcd60e51b81526004016109f290613717565b600d805462ff00001916620100009315159390930292909217909155601080546001600160a01b0319166001600160a01b03909216919091179055565b6000818152600260205260408120546001600160a01b0316806108e55760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016109f2565b6112e0611d20565b6001600160a01b03166112fb6009546001600160a01b031690565b6001600160a01b0316146113215760405162461bcd60e51b81526004016109f290613717565b600d5460ff166113435760405162461bcd60e51b81526004016109f29061382a565b601192909255601291909155601355565b61135c611d20565b6001600160a01b03166113776009546001600160a01b031690565b6001600160a01b03161461139d5760405162461bcd60e51b81526004016109f290613717565b600d5460ff16151560011480156113bc5750600d54610100900460ff16155b6113fa5760405162461bcd60e51b815260206004820152600f60248201526e53616c65206e6f742061637469766560881b60448201526064016109f2565b6149c8611405610f81565b1061143d5760405162461bcd60e51b815260206004820152600860248201526714dbdb19081bdd5d60c21b60448201526064016109f2565b601154341015801561145157506012543411155b801561146c57506011546013546114689190613677565b3411155b6114885760405162461bcd60e51b81526004016109f290613763565b600061149382611e88565b905060006114a18234611eae565b600092835260156020526040909220919091555050565b60006001600160a01b0382166115235760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016109f2565b506001600160a01b031660009081526003602052604090205490565b611547611d20565b6001600160a01b03166115626009546001600160a01b031690565b6001600160a01b0316146115885760405162461bcd60e51b81526004016109f290613717565b6115926000612252565b565b600d5460009060ff166115b95760405162461bcd60e51b81526004016109f29061382a565b5060125490565b600d5462010000900460ff1615156001146115ed5760405162461bcd60e51b81526004016109f29061384e565b6010546001600160a01b031633146116175760405162461bcd60e51b81526004016109f29061384e565b336116345760405162461bcd60e51b81526004016109f29061384e565b6000818152601560205260408120549061165182600160ff6122a4565b9050806001146116735760405162461bcd60e51b81526004016109f29061384e565b506000918252601560205260409091206001600160f81b0391909116607f60f81b90921691909117600160ff1b179055565b6116ad611d20565b6001600160a01b03166116c86009546001600160a01b031690565b6001600160a01b0316146116ee5760405162461bcd60e51b81526004016109f290613717565b80516111d790600f90602084019061300f565b6060600180546108fa90613627565b600d5460009060ff166117355760405162461bcd60e51b81526004016109f29061382a565b5060135490565b6060611746610f81565b82111561178c5760405162461bcd60e51b8152602060048201526014602482015273151bdad95b88191bd95cc81b9bdd08195e1a5cdd60621b60448201526064016109f2565b6000611797836119b7565b90506117a2816122dc565b9392505050565b6111d76117b4611d20565b8383612692565b600d5460009060ff166117e05760405162461bcd60e51b81526004016109f29061382a565b5060115490565b336117f182611261565b6001600160a01b0316146118375760405162461bcd60e51b815260206004820152600d60248201526c2737ba103a34329037bbb732b960991b60448201526064016109f2565b60115434146118585760405162461bcd60e51b81526004016109f290613763565b6000818152601560205260408120549061187582600160ff6122a4565b6001600160ff1b03909216919050600160ff1b600182900361189b5719918216916118a0565b918217915b505060009182526015602052604090912055565b6118bc611d20565b6001600160a01b03166118d76009546001600160a01b031690565b6001600160a01b0316146118fd5760405162461bcd60e51b81526004016109f290613717565b600d5460ff16156119415760405162461bcd60e51b815260206004820152600e60248201526d416c72656164792061637469766560901b60448201526064016109f2565b600d805460ff19166001179055565b61196161195b611d20565b83611fe0565b61197d5760405162461bcd60e51b81526004016109f290613790565b61198984848484612760565b50505050565b600080600061199c6117bb565b6119a4611594565b6119ac611710565b925092509250909192565b6119bf613093565b6000828152601560205260409020546108e590612793565b60606119e16129fb565b6119ea83612a0a565b6040516020016119fb929190613874565b6040516020818303038152906040529050919050565b6000818152601660205260409020805460609190611a2e90613627565b80601f0160208091040260200160405190810160405280929190818152602001828054611a5a90613627565b8015611aa75780601f10611a7c57610100808354040283529160200191611aa7565b820191906000526020600020905b815481529060010190602001808311611a8a57829003601f168201915b50505050509050919050565b6060600f80546108fa90613627565b600b5460405163c455279160e01b81526001600160a01b03848116600483015260009281169190841690829063c455279190602401602060405180830381865afa158015611b14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b3891906138a3565b6001600160a01b031603611b505760019150506108e5565b6001600160a01b0380851660009081526005602090815260408083209387168352929052205460ff165b949350505050565b611b8a611d20565b6001600160a01b0316611ba56009546001600160a01b031690565b6001600160a01b031614611bcb5760405162461bcd60e51b81526004016109f290613717565b6001600160a01b038116611c305760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016109f2565b611c3981612252565b50565b611c44611d20565b6001600160a01b0316611c5f6009546001600160a01b031690565b6001600160a01b031614611c855760405162461bcd60e51b81526004016109f290613717565b6040516001600160a01b0383169082156108fc029083906000818181858888f19350505050158015610b39573d6000803e3d6000fd5b80546001019055565b6000303303611d1a57600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b03169150611d1d9050565b50335b90565b6000610d32611cc4565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611d5f82611261565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006001600160a01b038616611dfe5760405162461bcd60e51b815260206004820152602560248201527f4e61746976654d6574615472616e73616374696f6e3a20494e56414c49445f5360448201526424a3a722a960d91b60648201526084016109f2565b6001611e11611e0c87612b0b565b612b88565b6040805160008152602081018083529290925260ff851690820152606081018690526080810185905260a0016020604051602081039080840390855afa158015611e5f573d6000803e3d6000fd5b505050602060405103516001600160a01b0316866001600160a01b031614905095945050505050565b600080611e94600a5490565b9050611ea4600a80546001019055565b6108e58382612bb8565b600080611eba84612bd2565b9050601154831115611fd6576000601154601354611ed89190613677565b8411611ee45783611ef4565b601154601354611ef49190613677565b9050600060135460115483611f09919061374c565b611f149060706137e1565b611f1e9190613816565b6040805144602080830191909152428284015260608083018b9052835180840382018152608090930190935281519101209192501b611f5e8260a061374c565b1b611f6a8260f061374c565b81901c90508084179350600060135460115485611f87919061374c565b611f9390619c406137e1565b611f9d9190613816565b905060006298968060135483611fb391906137e1565b611fbd9190613816565b905080601354611fcd9190613677565b60135550505050505b60081c9392505050565b6000818152600260205260408120546001600160a01b03166120595760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016109f2565b600061206483611261565b9050806001600160a01b0316846001600160a01b0316148061208b575061208b8185611ac2565b80611b7a5750836001600160a01b03166120a48461097d565b6001600160a01b031614949350505050565b826001600160a01b03166120c982611261565b6001600160a01b03161461212d5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016109f2565b6001600160a01b03821661218f5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016109f2565b61219a600082611d2a565b6001600160a01b03831660009081526003602052604081208054600192906121c390849061374c565b90915550506001600160a01b03821660009081526003602052604081208054600192906121f1908490613677565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000806122b184846137e1565b85901c9050600060016122c58660026139a4565b6122cf919061374c565b9190911695945050505050565b606060006122ed8360000151612a0a565b905060006122fe8460000151612c01565b9050600061230f8560200151612a0a565b905060006123208660200151612c01565b6040805180820182526006808252650e6dadedee8d60d31b6020808401919091528351808501909452908352651b9bdc9b585b60d21b90830152608089015192935091600003612394575060408051808201909152600d81526c32b0b9363c9039b437b7ba32b960991b60208201526123c5565b87608001516002036123c5575060408051808201909152600c81526b36b0b930ba3437b71036b0b760a11b60208201525b6002886040015110156123f757604051806040016040528060058152602001647665696e7960d81b8152509150612455565b8760400151600203612428576040518060400160405280600581526020016462756d707960d81b8152509150612455565b87604001516004036124555760405180604001604052806005815260200164686169727960d81b81525091505b6040805180820190915260088152671cdd1c985a59da1d60c21b602082015260608901516001036124a557506040805180820190915260088152676d757368726f6f6d60c01b6020820152612560565b88606001516002036124d25750604080518082019091526004815263636f6e6560e01b6020820152612560565b886060015160030361250357506040805180820190915260088152671959d9dc1b185b9d60c21b6020820152612560565b8860600151600403612535575060408051808201909152600981526861737061726167757360b81b6020820152612560565b8860600151600503612560575060408051808201909152600681526562616e616e6160d01b60208201525b60008960a0015161258f576040518060400160405280600681526020016539b437bbb2b960d11b8152506125af565b6040518060400160405280600681526020016533b937bbb2b960d11b8152505b90506000888888886040516020016125ca94939291906139b0565b604051602081830303815290604052905080838684876040516020016125f4959493929190613a67565b6040516020818303038152906040529050806126148c6101400151612a0a565b6126218d60e00151612a0a565b60405160200161263393929190613b21565b6040516020818303038152906040529050806126538c6101200151612a0a565b6126618d6101000151612a0a565b60405160200161267393929190613b8d565b60408051601f198184030181529190529b9a5050505050505050505050565b816001600160a01b0316836001600160a01b0316036126f35760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016109f2565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b61276b8484846120b6565b61277784848484612c4e565b6119895760405162461bcd60e51b81526004016109f290613bfe565b61279b613093565b6127a882600360006122a4565b60408201526127ba82600360016122a4565b606082015260076127ce83600360026122a4565b106127da5760006127dd565b60015b151560a08201526000805b6008811015612830576128128460026128028460066137e1565b61280d906004613677565b6122a4565b61281c9083613677565b91508061282881613c50565b9150506127e8565b5060016080830152600981101561284d576000608083015261285e565b601381111561285e57600260808301525b61286b83600160ff6122a4565b60011461287957600061287c565b60015b151560c083015261289083600360546122a4565b60e08301526128a2836002607d6122a4565b6101008301526128b5836002607c6122a4565b6128c090600361374c565b6101208301526000805b601f8210156129235760006128e1866008856122a4565b90508060ac82116128f35760006128f6565b60805b6129039060ff1684613677565b61290d9190613677565b915050818061291b90613c50565b9250506128ca565b60f881111561293a5761293760f88261374c565b90505b61294560f882613816565b84526000805b60298210156129a6576000612964886008600686612d56565b90508060328211612976576000612979565b603c5b6129869060ff1684613677565b6129909190613677565b915050818061299e90613c50565b92505061294b565b6129b2816103c0613677565b90506129bf60c082613816565b60208701819052865161046b916129d690806137e1565b6129e091906137e1565b6129ea9190613816565b610140870152509395945050505050565b6060600e80546108fa90613627565b606081600003612a315750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612a5b5780612a4581613c50565b9150612a549050600a83613816565b9150612a35565b60008167ffffffffffffffff811115612a7657612a766131fe565b6040519080825280601f01601f191660200182016040528015612aa0576020820181803683370190505b5090505b8415611b7a57612ab560018361374c565b9150612ac2600a86613c69565b612acd906030613677565b60f81b818381518110612ae257612ae2613c7d565b60200101906001600160f81b031916908160001a905350612b04600a86613816565b9450612aa4565b6000604051806080016040528060438152602001613d2a6043913980516020918201208351848301516040808701518051908601209051612b6b950193845260208401929092526001600160a01b03166040830152606082015260800190565b604051602081830303815290604052805190602001209050919050565b6000612b9360075490565b60405161190160f01b6020820152602281019190915260428101839052606201612b6b565b6111d7828260405180602001604052806000815250612e1d565b60008142612be160014361374c565b604080516020810194909452830191909152406060820152608001612b6b565b6060600080612c0f84612e50565b91509150612c1c82612a0a565b612c2582612a0a565b604051602001612c36929190613c93565b60405160208183030381529060405292505050919050565b60006001600160a01b0384163b15612d4b57836001600160a01b031663150b7a02612c77611d20565b8786866040518563ffffffff1660e01b8152600401612c999493929190613ccf565b6020604051808303816000875af1925050508015612cd4575060408051601f3d908101601f19168201909252612cd191810190613d0c565b60015b612d31573d808015612d02576040519150601f19603f3d011682016040523d82523d6000602084013e612d07565b606091505b508051600003612d295760405162461bcd60e51b81526004016109f290613bfe565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611b7a565b506001949350505050565b60008083612d65846001613677565b612d6f91906137e1565b612d7b8661010061374c565b612d85919061374c565b86901c905060006001612d998660026139a4565b612da3919061374c565b9190911690506001600081815b87831015612e105760006001612dc6858b61374c565b612dd0919061374c565b86901c8516905080612de281856137e1565b612dec9084613677565b9250612df98460026137e1565b935050508280612e0890613c50565b935050612db0565b9998505050505050505050565b612e278383612ecd565b612e346000848484612c4e565b610b395760405162461bcd60e51b81526004016109f290613bfe565b60008060fe612e608460646137e1565b612e6a9190613816565b9150600060fe612e7b8560646137e1565b612e859190613c69565b90506109ec612e958260646137e1565b612ea1906104f6613677565b612eab9190613816565b915081600a03612ec757612ec0836001613677565b9250600091505b50915091565b6001600160a01b038216612f235760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016109f2565b6000818152600260205260409020546001600160a01b031615612f885760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016109f2565b6001600160a01b0382166000908152600360205260408120805460019290612fb1908490613677565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b82805461301b90613627565b90600052602060002090601f01602090048101928261303d5760008555613083565b82601f1061305657805160ff1916838001178555613083565b82800160010185558215613083579182015b82811115613083578251825591602001919060010190613068565b5061308f9291506130f1565b5090565b6040518061016001604052806000815260200160008152602001600081526020016000815260200160008152602001600015158152602001600015158152602001600081526020016000815260200160008152602001600081525090565b5b8082111561308f57600081556001016130f2565b6001600160e01b031981168114611c3957600080fd5b60006020828403121561312e57600080fd5b81356117a281613106565b60005b8381101561315457818101518382015260200161313c565b838111156119895750506000910152565b6000815180845261317d816020860160208601613139565b601f01601f19169290920160200192915050565b6020815260006117a26020830184613165565b6000602082840312156131b657600080fd5b5035919050565b6001600160a01b0381168114611c3957600080fd5b600080604083850312156131e557600080fd5b82356131f0816131bd565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261322557600080fd5b813567ffffffffffffffff80821115613240576132406131fe565b604051601f8301601f19908116603f01168101908282118183101715613268576132686131fe565b8160405283815286602085880101111561328157600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600060a086880312156132b957600080fd5b85356132c4816131bd565b9450602086013567ffffffffffffffff8111156132e057600080fd5b6132ec88828901613214565b9450506040860135925060608601359150608086013560ff8116811461331157600080fd5b809150509295509295909350565b8035801515811461332f57600080fd5b919050565b60006020828403121561334657600080fd5b6117a28261331f565b60006020828403121561336157600080fd5b81356117a2816131bd565b6000806040838503121561337f57600080fd5b82359150602083013567ffffffffffffffff81111561339d57600080fd5b6133a985828601613214565b9150509250929050565b6000806000606084860312156133c857600080fd5b83356133d3816131bd565b925060208401356133e3816131bd565b929592945050506040919091013590565b6000806040838503121561340757600080fd5b50508035926020909101359150565b60006020828403121561342857600080fd5b813567ffffffffffffffff81111561343f57600080fd5b611b7a84828501613214565b6000806040838503121561345e57600080fd5b6134678361331f565b91506020830135613477816131bd565b809150509250929050565b60008060006060848603121561349757600080fd5b505081359360208301359350604090920135919050565b600080604083850312156134c157600080fd5b82356001600160f81b0319811681146131f057600080fd5b600080604083850312156134ec57600080fd5b82356134f7816131bd565b91506135056020840161331f565b90509250929050565b6000806000806080858703121561352457600080fd5b843561352f816131bd565b9350602085013561353f816131bd565b925060408501359150606085013567ffffffffffffffff81111561356257600080fd5b61356e87828801613214565b91505092959194509250565b600061016082019050825182526020830151602083015260408301516040830152606083015160608301526080830151608083015260a08301516135c260a084018215159052565b5060c08301516135d660c084018215159052565b5060e083810151908301526101008084015190830152610120808401519083015261014092830151929091019190915290565b6000806040838503121561361c57600080fd5b8235613467816131bd565b600181811c9082168061363b57607f821691505b60208210810361365b57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b6000821982111561368a5761368a613661565b500190565b6001600160a01b038481168252831660208201526060604082018190526000906136bb90830184613165565b95945050505050565b600083516136d6818460208801613139565b60609390931b6bffffffffffffffffffffffff19169190920190815260140192915050565b6000825161370d818460208701613139565b9190910192915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008282101561375e5761375e613661565b500390565b602080825260139082015272125b9d985b1a5908185b5bdd5b9d081cd95b9d606a1b604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b60008160001904831182151516156137fb576137fb613661565b500290565b634e487b7160e01b600052601260045260246000fd5b60008261382557613825613800565b500490565b6020808252600a90820152694e6f742061637469766560b01b604082015260600190565b6020808252600c908201526b125b9d985b1a590818d85b1b60a21b604082015260600190565b60008351613886818460208801613139565b83519083019061389a818360208801613139565b01949350505050565b6000602082840312156138b557600080fd5b81516117a2816131bd565b600181815b808511156138fb5781600019048211156138e1576138e1613661565b808516156138ee57918102915b93841c93908002906138c5565b509250929050565b600082613912575060016108e5565b8161391f575060006108e5565b8160018114613935576002811461393f5761395b565b60019150506108e5565b60ff84111561395057613950613661565b50506001821b6108e5565b5060208310610133831016604e8410600b841016171561397e575081810a6108e5565b61398883836138c0565b806000190482111561399c5761399c613661565b029392505050565b60006117a28383613903565b6703632b733ba341d160c51b8152600085516139d3816008850160208a01613139565b808301905064031b69017960dd1b80600883015286516139fa81600d850160208b01613139565b6a034b7161033b4b93a341d160ad1b600d93909101928301528551613a26816018850160208a01613139565b60189201918201528351613a4181601d840160208801613139565b6a034b7161039b430b8329d160ad1b601d92909101918201526028019695505050505050565b60008651613a79818460208b01613139565b865190830190613a8d818360208b01613139565b6a016103a32bc3a3ab9329d160ad1b91019081528551613ab481600b840160208a01613139565b700161033b937bbb2b917b9b437bbb2b91d1607d1b600b92909101918201528451613ae681601c840160208901613139565b6a0161039ba30b6b4b7309d160ad1b601c92909101918201528351613b12816027840160208801613139565b01602701979650505050505050565b60008451613b33818460208901613139565b66016103132329d160cd1b9083019081528451613b57816007840160208901613139565b67016103ab9b2b99d160c51b600792909101918201528351613b8081600f840160208801613139565b01600f0195945050505050565b60008451613b9f818460208901613139565b6b016103b34ba30b634ba3c9d160a51b9083019081528451613bc881600c840160208901613139565b67016103ab427b41d160c51b600c92909101918201528351613bf1816014840160208801613139565b0160140195945050505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b600060018201613c6257613c62613661565b5060010190565b600082613c7857613c78613800565b500690565b634e487b7160e01b600052603260045260246000fd5b60008351613ca5818460208801613139565b601760f91b9083019081528351613cc3816001840160208801613139565b01600101949350505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613d0290830184613165565b9695505050505050565b600060208284031215613d1e57600080fd5b81516117a28161310656fe4d6574615472616e73616374696f6e2875696e74323536206e6f6e63652c616464726573732066726f6d2c62797465732066756e6374696f6e5369676e617475726529a2646970667358221220243f53369177c3c1ba75cad24287828f96bca937e67872aee52623a73b8d5a1964736f6c634300080e0033454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c6164647265737320766572696679696e67436f6e74726163742c627974657333322073616c7429000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1
Deployed Bytecode
0x6080604052600436106102ae5760003560e01c80636352211e11610175578063a22cb465116100dc578063bf22d41011610095578063e8a3d4851161006f578063e8a3d48514610824578063e985e9c514610839578063f2fde38b14610859578063f3fef3a31461087957600080fd5b8063bf22d410146107b7578063c87b56dd146107e4578063e725f8771461080457600080fd5b8063a22cb4651461070a578063a7f93ebd1461072a578063a9e659d91461073f578063b66a0e5d14610752578063b88d4fde14610767578063bdb219fb1461078757600080fd5b80638da5cb5b1161012e5780638da5cb5b146106625780639278664514610680578063938e3d7b146106a057806395d89b41146106c05780639ba151ad146106d5578063a0c6d537146106ea57600080fd5b80636352211e146105c55780636877e067146105e557806369a59e281461060557806370a0823114610618578063715018a61461063857806382d8dff61461064d57600080fd5b806318160ddd116102195780632d0335ab116101d25780632d0335ab146104ef5780633408e4701461052557806342842e0e146105385780634a091ead1461055857806355f804b3146105855780635db0da72146105a557600080fd5b806318160ddd1461043d57806320379ee514610452578063226c3cbb1461046757806323b872dd1461047a57806329ee566c1461049a5780632a55205a146104b057600080fd5b80630c53c51c1161026b5780630c53c51c146103a05780630ca1c5c9146103b35780630cfed2a2146103c85780630f7e5970146103e85780631249c58b1461041557806312efdd7e1461041d57600080fd5b806301ffc9a7146102b357806302fb0c5e146102e8578063031bd4c41461030057806306fdde0314610324578063081812fc14610346578063095ea7b31461037e575b600080fd5b3480156102bf57600080fd5b506102d36102ce36600461311c565b610899565b60405190151581526020015b60405180910390f35b3480156102f457600080fd5b50600d5460ff166102d3565b34801561030c57600080fd5b506103166149c881565b6040519081526020016102df565b34801561033057600080fd5b506103396108eb565b6040516102df9190613191565b34801561035257600080fd5b506103666103613660046131a4565b61097d565b6040516001600160a01b0390911681526020016102df565b34801561038a57600080fd5b5061039e6103993660046131d2565b610a17565b005b6103396103ae3660046132a1565b610b3e565b3480156103bf57600080fd5b50610316610d28565b3480156103d457600080fd5b5061039e6103e3366004613334565b610d37565b3480156103f457600080fd5b50610339604051806040016040528060018152602001603160f81b81525081565b61039e610d9a565b34801561042957600080fd5b5061039e61043836600461334f565b610f16565b34801561044957600080fd5b50610316610f81565b34801561045e57600080fd5b50600754610316565b61039e61047536600461336c565b610f98565b34801561048657600080fd5b5061039e6104953660046133b3565b611065565b3480156104a657600080fd5b50610316600c5481565b3480156104bc57600080fd5b506104d06104cb3660046133f4565b61109d565b604080516001600160a01b0390931683526020830191909152016102df565b3480156104fb57600080fd5b5061031661050a36600461334f565b6001600160a01b031660009081526008602052604090205490565b34801561053157600080fd5b5046610316565b34801561054457600080fd5b5061039e6105533660046133b3565b611160565b34801561056457600080fd5b506103166105733660046131a4565b60009081526015602052604090205490565b34801561059157600080fd5b5061039e6105a0366004613416565b61117b565b3480156105b157600080fd5b5061039e6105c036600461344b565b6111db565b3480156105d157600080fd5b506103666105e03660046131a4565b611261565b3480156105f157600080fd5b5061039e610600366004613482565b6112d8565b61039e61061336600461334f565b611354565b34801561062457600080fd5b5061031661063336600461334f565b6114b8565b34801561064457600080fd5b5061039e61153f565b34801561065957600080fd5b50610316611594565b34801561066e57600080fd5b506009546001600160a01b0316610366565b34801561068c57600080fd5b5061039e61069b3660046134ae565b6115c0565b3480156106ac57600080fd5b5061039e6106bb366004613416565b6116a5565b3480156106cc57600080fd5b50610339611701565b3480156106e157600080fd5b50610316611710565b3480156106f657600080fd5b506103396107053660046131a4565b61173c565b34801561071657600080fd5b5061039e6107253660046134d9565b6117a9565b34801561073657600080fd5b506103166117bb565b61039e61074d3660046131a4565b6117e7565b34801561075e57600080fd5b5061039e6118b4565b34801561077357600080fd5b5061039e61078236600461350e565b611950565b34801561079357600080fd5b5061079c61198f565b604080519384526020840192909252908201526060016102df565b3480156107c357600080fd5b506107d76107d23660046131a4565b6119b7565b6040516102df919061357a565b3480156107f057600080fd5b506103396107ff3660046131a4565b6119d7565b34801561081057600080fd5b5061033961081f3660046131a4565b611a11565b34801561083057600080fd5b50610339611ab3565b34801561084557600080fd5b506102d3610854366004613609565b611ac2565b34801561086557600080fd5b5061039e61087436600461334f565b611b82565b34801561088557600080fd5b5061039e6108943660046131d2565b611c3c565b60006001600160e01b031982166380ac58cd60e01b14806108ca57506001600160e01b03198216635b5e139f60e01b145b806108e557506301ffc9a760e01b6001600160e01b03198316145b92915050565b6060600080546108fa90613627565b80601f016020809104026020016040519081016040528092919081815260200182805461092690613627565b80156109735780601f1061094857610100808354040283529160200191610973565b820191906000526020600020905b81548152906001019060200180831161095657829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166109fb5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610a2282611261565b9050806001600160a01b0316836001600160a01b031603610a8f5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016109f2565b806001600160a01b0316610aa1611d20565b6001600160a01b03161480610abd5750610abd81610854611d20565b610b2f5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016109f2565b610b398383611d2a565b505050565b60408051606081810183526001600160a01b03881660008181526008602090815290859020548452830152918101869052610b7c8782878787611d98565b610bd25760405162461bcd60e51b815260206004820152602160248201527f5369676e657220616e64207369676e617475726520646f206e6f74206d6174636044820152600d60fb1b60648201526084016109f2565b6001600160a01b038716600090815260086020526040902054610bf6906001613677565b6001600160a01b0388166000908152600860205260409081902091909155517f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b90610c4690899033908a9061368f565b60405180910390a1600080306001600160a01b0316888a604051602001610c6e9291906136c4565b60408051601f1981840301815290829052610c88916136fb565b6000604051808303816000865af19150503d8060008114610cc5576040519150601f19603f3d011682016040523d82523d6000602084013e610cca565b606091505b509150915081610d1c5760405162461bcd60e51b815260206004820152601c60248201527f46756e6374696f6e2063616c6c206e6f74207375636365737366756c0000000060448201526064016109f2565b98975050505050505050565b6000610d32610f81565b905090565b610d3f611d20565b6001600160a01b0316610d5a6009546001600160a01b031690565b6001600160a01b031614610d805760405162461bcd60e51b81526004016109f290613717565b600d80549115156101000261ff0019909216919091179055565b600d5460ff1615156001148015610db95750600d54610100900460ff16155b610df75760405162461bcd60e51b815260206004820152600f60248201526e53616c65206e6f742061637469766560881b60448201526064016109f2565b6149c8610e02610f81565b10610e3a5760405162461bcd60e51b815260206004820152600860248201526714dbdb19081bdd5d60c21b60448201526064016109f2565b610e43336114b8565b1580610e5157506013543410155b80610e6b5750601154601254610e67919061374c565b3410155b610eb75760405162461bcd60e51b815260206004820152601960248201527f4d6178206f66206f6e652062617365207072696365204253440000000000000060448201526064016109f2565b6011543410158015610ecb57506012543411155b610ee75760405162461bcd60e51b81526004016109f290613763565b6000610ef233611e88565b90506000610f008234611eae565b6000928352601560205260409092209190915550565b610f1e611d20565b6001600160a01b0316610f396009546001600160a01b031690565b6001600160a01b031614610f5f5760405162461bcd60e51b81526004016109f290613717565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b60006001610f8e600a5490565b610d32919061374c565b33610fa283611261565b6001600160a01b031614610fe85760405162461bcd60e51b815260206004820152600d60248201526c2737ba103a34329037bbb732b960991b60448201526064016109f2565b60115434146110095760405162461bcd60e51b81526004016109f290613763565b600082815260166020908152604090912082516110289284019061300f565b50817fe06a2507aded3dfb43241545773425fd446e72ae8a40a52205506cca63f4811c826040516110599190613191565b60405180910390a25050565b611076611070611d20565b82611fe0565b6110925760405162461bcd60e51b81526004016109f290613790565b610b398383836120b6565b6000806000612710600c54856110b391906137e1565b6110bd9190613816565b90506110c7610f81565b85106111055760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b2103a37b5b2b760991b60448201526064016109f2565b600081116111555760405162461bcd60e51b815260206004820152601e60248201527f526f79616c7479206d7573742062652067726561746572207468616e2030000060448201526064016109f2565b309590945092505050565b610b3983838360405180602001604052806000815250611950565b611183611d20565b6001600160a01b031661119e6009546001600160a01b031690565b6001600160a01b0316146111c45760405162461bcd60e51b81526004016109f290613717565b80516111d790600e90602084019061300f565b5050565b6111e3611d20565b6001600160a01b03166111fe6009546001600160a01b031690565b6001600160a01b0316146112245760405162461bcd60e51b81526004016109f290613717565b600d805462ff00001916620100009315159390930292909217909155601080546001600160a01b0319166001600160a01b03909216919091179055565b6000818152600260205260408120546001600160a01b0316806108e55760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016109f2565b6112e0611d20565b6001600160a01b03166112fb6009546001600160a01b031690565b6001600160a01b0316146113215760405162461bcd60e51b81526004016109f290613717565b600d5460ff166113435760405162461bcd60e51b81526004016109f29061382a565b601192909255601291909155601355565b61135c611d20565b6001600160a01b03166113776009546001600160a01b031690565b6001600160a01b03161461139d5760405162461bcd60e51b81526004016109f290613717565b600d5460ff16151560011480156113bc5750600d54610100900460ff16155b6113fa5760405162461bcd60e51b815260206004820152600f60248201526e53616c65206e6f742061637469766560881b60448201526064016109f2565b6149c8611405610f81565b1061143d5760405162461bcd60e51b815260206004820152600860248201526714dbdb19081bdd5d60c21b60448201526064016109f2565b601154341015801561145157506012543411155b801561146c57506011546013546114689190613677565b3411155b6114885760405162461bcd60e51b81526004016109f290613763565b600061149382611e88565b905060006114a18234611eae565b600092835260156020526040909220919091555050565b60006001600160a01b0382166115235760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016109f2565b506001600160a01b031660009081526003602052604090205490565b611547611d20565b6001600160a01b03166115626009546001600160a01b031690565b6001600160a01b0316146115885760405162461bcd60e51b81526004016109f290613717565b6115926000612252565b565b600d5460009060ff166115b95760405162461bcd60e51b81526004016109f29061382a565b5060125490565b600d5462010000900460ff1615156001146115ed5760405162461bcd60e51b81526004016109f29061384e565b6010546001600160a01b031633146116175760405162461bcd60e51b81526004016109f29061384e565b336116345760405162461bcd60e51b81526004016109f29061384e565b6000818152601560205260408120549061165182600160ff6122a4565b9050806001146116735760405162461bcd60e51b81526004016109f29061384e565b506000918252601560205260409091206001600160f81b0391909116607f60f81b90921691909117600160ff1b179055565b6116ad611d20565b6001600160a01b03166116c86009546001600160a01b031690565b6001600160a01b0316146116ee5760405162461bcd60e51b81526004016109f290613717565b80516111d790600f90602084019061300f565b6060600180546108fa90613627565b600d5460009060ff166117355760405162461bcd60e51b81526004016109f29061382a565b5060135490565b6060611746610f81565b82111561178c5760405162461bcd60e51b8152602060048201526014602482015273151bdad95b88191bd95cc81b9bdd08195e1a5cdd60621b60448201526064016109f2565b6000611797836119b7565b90506117a2816122dc565b9392505050565b6111d76117b4611d20565b8383612692565b600d5460009060ff166117e05760405162461bcd60e51b81526004016109f29061382a565b5060115490565b336117f182611261565b6001600160a01b0316146118375760405162461bcd60e51b815260206004820152600d60248201526c2737ba103a34329037bbb732b960991b60448201526064016109f2565b60115434146118585760405162461bcd60e51b81526004016109f290613763565b6000818152601560205260408120549061187582600160ff6122a4565b6001600160ff1b03909216919050600160ff1b600182900361189b5719918216916118a0565b918217915b505060009182526015602052604090912055565b6118bc611d20565b6001600160a01b03166118d76009546001600160a01b031690565b6001600160a01b0316146118fd5760405162461bcd60e51b81526004016109f290613717565b600d5460ff16156119415760405162461bcd60e51b815260206004820152600e60248201526d416c72656164792061637469766560901b60448201526064016109f2565b600d805460ff19166001179055565b61196161195b611d20565b83611fe0565b61197d5760405162461bcd60e51b81526004016109f290613790565b61198984848484612760565b50505050565b600080600061199c6117bb565b6119a4611594565b6119ac611710565b925092509250909192565b6119bf613093565b6000828152601560205260409020546108e590612793565b60606119e16129fb565b6119ea83612a0a565b6040516020016119fb929190613874565b6040516020818303038152906040529050919050565b6000818152601660205260409020805460609190611a2e90613627565b80601f0160208091040260200160405190810160405280929190818152602001828054611a5a90613627565b8015611aa75780601f10611a7c57610100808354040283529160200191611aa7565b820191906000526020600020905b815481529060010190602001808311611a8a57829003601f168201915b50505050509050919050565b6060600f80546108fa90613627565b600b5460405163c455279160e01b81526001600160a01b03848116600483015260009281169190841690829063c455279190602401602060405180830381865afa158015611b14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b3891906138a3565b6001600160a01b031603611b505760019150506108e5565b6001600160a01b0380851660009081526005602090815260408083209387168352929052205460ff165b949350505050565b611b8a611d20565b6001600160a01b0316611ba56009546001600160a01b031690565b6001600160a01b031614611bcb5760405162461bcd60e51b81526004016109f290613717565b6001600160a01b038116611c305760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016109f2565b611c3981612252565b50565b611c44611d20565b6001600160a01b0316611c5f6009546001600160a01b031690565b6001600160a01b031614611c855760405162461bcd60e51b81526004016109f290613717565b6040516001600160a01b0383169082156108fc029083906000818181858888f19350505050158015610b39573d6000803e3d6000fd5b80546001019055565b6000303303611d1a57600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b03169150611d1d9050565b50335b90565b6000610d32611cc4565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611d5f82611261565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006001600160a01b038616611dfe5760405162461bcd60e51b815260206004820152602560248201527f4e61746976654d6574615472616e73616374696f6e3a20494e56414c49445f5360448201526424a3a722a960d91b60648201526084016109f2565b6001611e11611e0c87612b0b565b612b88565b6040805160008152602081018083529290925260ff851690820152606081018690526080810185905260a0016020604051602081039080840390855afa158015611e5f573d6000803e3d6000fd5b505050602060405103516001600160a01b0316866001600160a01b031614905095945050505050565b600080611e94600a5490565b9050611ea4600a80546001019055565b6108e58382612bb8565b600080611eba84612bd2565b9050601154831115611fd6576000601154601354611ed89190613677565b8411611ee45783611ef4565b601154601354611ef49190613677565b9050600060135460115483611f09919061374c565b611f149060706137e1565b611f1e9190613816565b6040805144602080830191909152428284015260608083018b9052835180840382018152608090930190935281519101209192501b611f5e8260a061374c565b1b611f6a8260f061374c565b81901c90508084179350600060135460115485611f87919061374c565b611f9390619c406137e1565b611f9d9190613816565b905060006298968060135483611fb391906137e1565b611fbd9190613816565b905080601354611fcd9190613677565b60135550505050505b60081c9392505050565b6000818152600260205260408120546001600160a01b03166120595760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016109f2565b600061206483611261565b9050806001600160a01b0316846001600160a01b0316148061208b575061208b8185611ac2565b80611b7a5750836001600160a01b03166120a48461097d565b6001600160a01b031614949350505050565b826001600160a01b03166120c982611261565b6001600160a01b03161461212d5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016109f2565b6001600160a01b03821661218f5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016109f2565b61219a600082611d2a565b6001600160a01b03831660009081526003602052604081208054600192906121c390849061374c565b90915550506001600160a01b03821660009081526003602052604081208054600192906121f1908490613677565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000806122b184846137e1565b85901c9050600060016122c58660026139a4565b6122cf919061374c565b9190911695945050505050565b606060006122ed8360000151612a0a565b905060006122fe8460000151612c01565b9050600061230f8560200151612a0a565b905060006123208660200151612c01565b6040805180820182526006808252650e6dadedee8d60d31b6020808401919091528351808501909452908352651b9bdc9b585b60d21b90830152608089015192935091600003612394575060408051808201909152600d81526c32b0b9363c9039b437b7ba32b960991b60208201526123c5565b87608001516002036123c5575060408051808201909152600c81526b36b0b930ba3437b71036b0b760a11b60208201525b6002886040015110156123f757604051806040016040528060058152602001647665696e7960d81b8152509150612455565b8760400151600203612428576040518060400160405280600581526020016462756d707960d81b8152509150612455565b87604001516004036124555760405180604001604052806005815260200164686169727960d81b81525091505b6040805180820190915260088152671cdd1c985a59da1d60c21b602082015260608901516001036124a557506040805180820190915260088152676d757368726f6f6d60c01b6020820152612560565b88606001516002036124d25750604080518082019091526004815263636f6e6560e01b6020820152612560565b886060015160030361250357506040805180820190915260088152671959d9dc1b185b9d60c21b6020820152612560565b8860600151600403612535575060408051808201909152600981526861737061726167757360b81b6020820152612560565b8860600151600503612560575060408051808201909152600681526562616e616e6160d01b60208201525b60008960a0015161258f576040518060400160405280600681526020016539b437bbb2b960d11b8152506125af565b6040518060400160405280600681526020016533b937bbb2b960d11b8152505b90506000888888886040516020016125ca94939291906139b0565b604051602081830303815290604052905080838684876040516020016125f4959493929190613a67565b6040516020818303038152906040529050806126148c6101400151612a0a565b6126218d60e00151612a0a565b60405160200161263393929190613b21565b6040516020818303038152906040529050806126538c6101200151612a0a565b6126618d6101000151612a0a565b60405160200161267393929190613b8d565b60408051601f198184030181529190529b9a5050505050505050505050565b816001600160a01b0316836001600160a01b0316036126f35760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016109f2565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b61276b8484846120b6565b61277784848484612c4e565b6119895760405162461bcd60e51b81526004016109f290613bfe565b61279b613093565b6127a882600360006122a4565b60408201526127ba82600360016122a4565b606082015260076127ce83600360026122a4565b106127da5760006127dd565b60015b151560a08201526000805b6008811015612830576128128460026128028460066137e1565b61280d906004613677565b6122a4565b61281c9083613677565b91508061282881613c50565b9150506127e8565b5060016080830152600981101561284d576000608083015261285e565b601381111561285e57600260808301525b61286b83600160ff6122a4565b60011461287957600061287c565b60015b151560c083015261289083600360546122a4565b60e08301526128a2836002607d6122a4565b6101008301526128b5836002607c6122a4565b6128c090600361374c565b6101208301526000805b601f8210156129235760006128e1866008856122a4565b90508060ac82116128f35760006128f6565b60805b6129039060ff1684613677565b61290d9190613677565b915050818061291b90613c50565b9250506128ca565b60f881111561293a5761293760f88261374c565b90505b61294560f882613816565b84526000805b60298210156129a6576000612964886008600686612d56565b90508060328211612976576000612979565b603c5b6129869060ff1684613677565b6129909190613677565b915050818061299e90613c50565b92505061294b565b6129b2816103c0613677565b90506129bf60c082613816565b60208701819052865161046b916129d690806137e1565b6129e091906137e1565b6129ea9190613816565b610140870152509395945050505050565b6060600e80546108fa90613627565b606081600003612a315750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612a5b5780612a4581613c50565b9150612a549050600a83613816565b9150612a35565b60008167ffffffffffffffff811115612a7657612a766131fe565b6040519080825280601f01601f191660200182016040528015612aa0576020820181803683370190505b5090505b8415611b7a57612ab560018361374c565b9150612ac2600a86613c69565b612acd906030613677565b60f81b818381518110612ae257612ae2613c7d565b60200101906001600160f81b031916908160001a905350612b04600a86613816565b9450612aa4565b6000604051806080016040528060438152602001613d2a6043913980516020918201208351848301516040808701518051908601209051612b6b950193845260208401929092526001600160a01b03166040830152606082015260800190565b604051602081830303815290604052805190602001209050919050565b6000612b9360075490565b60405161190160f01b6020820152602281019190915260428101839052606201612b6b565b6111d7828260405180602001604052806000815250612e1d565b60008142612be160014361374c565b604080516020810194909452830191909152406060820152608001612b6b565b6060600080612c0f84612e50565b91509150612c1c82612a0a565b612c2582612a0a565b604051602001612c36929190613c93565b60405160208183030381529060405292505050919050565b60006001600160a01b0384163b15612d4b57836001600160a01b031663150b7a02612c77611d20565b8786866040518563ffffffff1660e01b8152600401612c999493929190613ccf565b6020604051808303816000875af1925050508015612cd4575060408051601f3d908101601f19168201909252612cd191810190613d0c565b60015b612d31573d808015612d02576040519150601f19603f3d011682016040523d82523d6000602084013e612d07565b606091505b508051600003612d295760405162461bcd60e51b81526004016109f290613bfe565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611b7a565b506001949350505050565b60008083612d65846001613677565b612d6f91906137e1565b612d7b8661010061374c565b612d85919061374c565b86901c905060006001612d998660026139a4565b612da3919061374c565b9190911690506001600081815b87831015612e105760006001612dc6858b61374c565b612dd0919061374c565b86901c8516905080612de281856137e1565b612dec9084613677565b9250612df98460026137e1565b935050508280612e0890613c50565b935050612db0565b9998505050505050505050565b612e278383612ecd565b612e346000848484612c4e565b610b395760405162461bcd60e51b81526004016109f290613bfe565b60008060fe612e608460646137e1565b612e6a9190613816565b9150600060fe612e7b8560646137e1565b612e859190613c69565b90506109ec612e958260646137e1565b612ea1906104f6613677565b612eab9190613816565b915081600a03612ec757612ec0836001613677565b9250600091505b50915091565b6001600160a01b038216612f235760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016109f2565b6000818152600260205260409020546001600160a01b031615612f885760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016109f2565b6001600160a01b0382166000908152600360205260408120805460019290612fb1908490613677565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b82805461301b90613627565b90600052602060002090601f01602090048101928261303d5760008555613083565b82601f1061305657805160ff1916838001178555613083565b82800160010185558215613083579182015b82811115613083578251825591602001919060010190613068565b5061308f9291506130f1565b5090565b6040518061016001604052806000815260200160008152602001600081526020016000815260200160008152602001600015158152602001600015158152602001600081526020016000815260200160008152602001600081525090565b5b8082111561308f57600081556001016130f2565b6001600160e01b031981168114611c3957600080fd5b60006020828403121561312e57600080fd5b81356117a281613106565b60005b8381101561315457818101518382015260200161313c565b838111156119895750506000910152565b6000815180845261317d816020860160208601613139565b601f01601f19169290920160200192915050565b6020815260006117a26020830184613165565b6000602082840312156131b657600080fd5b5035919050565b6001600160a01b0381168114611c3957600080fd5b600080604083850312156131e557600080fd5b82356131f0816131bd565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261322557600080fd5b813567ffffffffffffffff80821115613240576132406131fe565b604051601f8301601f19908116603f01168101908282118183101715613268576132686131fe565b8160405283815286602085880101111561328157600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600060a086880312156132b957600080fd5b85356132c4816131bd565b9450602086013567ffffffffffffffff8111156132e057600080fd5b6132ec88828901613214565b9450506040860135925060608601359150608086013560ff8116811461331157600080fd5b809150509295509295909350565b8035801515811461332f57600080fd5b919050565b60006020828403121561334657600080fd5b6117a28261331f565b60006020828403121561336157600080fd5b81356117a2816131bd565b6000806040838503121561337f57600080fd5b82359150602083013567ffffffffffffffff81111561339d57600080fd5b6133a985828601613214565b9150509250929050565b6000806000606084860312156133c857600080fd5b83356133d3816131bd565b925060208401356133e3816131bd565b929592945050506040919091013590565b6000806040838503121561340757600080fd5b50508035926020909101359150565b60006020828403121561342857600080fd5b813567ffffffffffffffff81111561343f57600080fd5b611b7a84828501613214565b6000806040838503121561345e57600080fd5b6134678361331f565b91506020830135613477816131bd565b809150509250929050565b60008060006060848603121561349757600080fd5b505081359360208301359350604090920135919050565b600080604083850312156134c157600080fd5b82356001600160f81b0319811681146131f057600080fd5b600080604083850312156134ec57600080fd5b82356134f7816131bd565b91506135056020840161331f565b90509250929050565b6000806000806080858703121561352457600080fd5b843561352f816131bd565b9350602085013561353f816131bd565b925060408501359150606085013567ffffffffffffffff81111561356257600080fd5b61356e87828801613214565b91505092959194509250565b600061016082019050825182526020830151602083015260408301516040830152606083015160608301526080830151608083015260a08301516135c260a084018215159052565b5060c08301516135d660c084018215159052565b5060e083810151908301526101008084015190830152610120808401519083015261014092830151929091019190915290565b6000806040838503121561361c57600080fd5b8235613467816131bd565b600181811c9082168061363b57607f821691505b60208210810361365b57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b6000821982111561368a5761368a613661565b500190565b6001600160a01b038481168252831660208201526060604082018190526000906136bb90830184613165565b95945050505050565b600083516136d6818460208801613139565b60609390931b6bffffffffffffffffffffffff19169190920190815260140192915050565b6000825161370d818460208701613139565b9190910192915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008282101561375e5761375e613661565b500390565b602080825260139082015272125b9d985b1a5908185b5bdd5b9d081cd95b9d606a1b604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b60008160001904831182151516156137fb576137fb613661565b500290565b634e487b7160e01b600052601260045260246000fd5b60008261382557613825613800565b500490565b6020808252600a90820152694e6f742061637469766560b01b604082015260600190565b6020808252600c908201526b125b9d985b1a590818d85b1b60a21b604082015260600190565b60008351613886818460208801613139565b83519083019061389a818360208801613139565b01949350505050565b6000602082840312156138b557600080fd5b81516117a2816131bd565b600181815b808511156138fb5781600019048211156138e1576138e1613661565b808516156138ee57918102915b93841c93908002906138c5565b509250929050565b600082613912575060016108e5565b8161391f575060006108e5565b8160018114613935576002811461393f5761395b565b60019150506108e5565b60ff84111561395057613950613661565b50506001821b6108e5565b5060208310610133831016604e8410600b841016171561397e575081810a6108e5565b61398883836138c0565b806000190482111561399c5761399c613661565b029392505050565b60006117a28383613903565b6703632b733ba341d160c51b8152600085516139d3816008850160208a01613139565b808301905064031b69017960dd1b80600883015286516139fa81600d850160208b01613139565b6a034b7161033b4b93a341d160ad1b600d93909101928301528551613a26816018850160208a01613139565b60189201918201528351613a4181601d840160208801613139565b6a034b7161039b430b8329d160ad1b601d92909101918201526028019695505050505050565b60008651613a79818460208b01613139565b865190830190613a8d818360208b01613139565b6a016103a32bc3a3ab9329d160ad1b91019081528551613ab481600b840160208a01613139565b700161033b937bbb2b917b9b437bbb2b91d1607d1b600b92909101918201528451613ae681601c840160208901613139565b6a0161039ba30b6b4b7309d160ad1b601c92909101918201528351613b12816027840160208801613139565b01602701979650505050505050565b60008451613b33818460208901613139565b66016103132329d160cd1b9083019081528451613b57816007840160208901613139565b67016103ab9b2b99d160c51b600792909101918201528351613b8081600f840160208801613139565b01600f0195945050505050565b60008451613b9f818460208901613139565b6b016103b34ba30b634ba3c9d160a51b9083019081528451613bc881600c840160208901613139565b67016103ab427b41d160c51b600c92909101918201528351613bf1816014840160208801613139565b0160140195945050505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b600060018201613c6257613c62613661565b5060010190565b600082613c7857613c78613800565b500690565b634e487b7160e01b600052603260045260246000fd5b60008351613ca5818460208801613139565b601760f91b9083019081528351613cc3816001840160208801613139565b01600101949350505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613d0290830184613165565b9695505050505050565b600060208284031215613d1e57600080fd5b81516117a28161310656fe4d6574615472616e73616374696f6e2875696e74323536206e6f6e63652c616464726573732066726f6d2c62797465732066756e6374696f6e5369676e617475726529a2646970667358221220243f53369177c3c1ba75cad24287828f96bca937e67872aee52623a73b8d5a1964736f6c634300080e0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1
-----Decoded View---------------
Arg [0] : _proxyRegistryAddress (address): 0xa5409ec958C83C3f309868babACA7c86DCB077c1
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.