ERC-721
Overview
Max Total Supply
42 ASCII
Holders
9
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
10 ASCIILoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
AsciiPunks
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0 <0.9.0; pragma abicoder v2; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "solady/src/utils/Base64.sol"; import "erc721a/contracts/ERC721A.sol"; import "solady/src/utils/DynamicBufferLib.sol"; import "./StringUtilsLib.sol"; interface PunkDataInterface { function punkImage(uint16 index) external view returns (bytes memory); function punkAttributes(uint16 index) external view returns (string memory); } interface AsciiPunksRendererInterface { function tokenURI(uint256 tokenId) external view returns (string memory); function baguette() external view returns (string memory); } interface ExtendedPunkDataInterface { enum PunkAttributeType {SEX, HAIR, EYES, BEARD, EARS, LIPS, MOUTH, FACE, EMOTION, NECK, NOSE, CHEEKS, TEETH} enum PunkAttributeValue {NONE, ALIEN, APE, BANDANA, BEANIE, BIG_BEARD, BIG_SHADES, BLACK_LIPSTICK, BLONDE_BOB, BLONDE_SHORT, BLUE_EYE_SHADOW, BUCK_TEETH, CAP, CAP_FORWARD, CHINSTRAP, CHOKER, CIGARETTE, CLASSIC_SHADES, CLOWN_EYES_BLUE, CLOWN_EYES_GREEN, CLOWN_HAIR_GREEN, CLOWN_NOSE, COWBOY_HAT, CRAZY_HAIR, DARK_HAIR, DO_RAG, EARRING, EYE_MASK, EYE_PATCH, FEDORA, FEMALE, FRONT_BEARD, FRONT_BEARD_DARK, FROWN, FRUMPY_HAIR, GOAT, GOLD_CHAIN, GREEN_EYE_SHADOW, HALF_SHAVED, HANDLEBARS, HEADBAND, HOODIE, HORNED_RIM_GLASSES, HOT_LIPSTICK, KNITTED_CAP, LUXURIOUS_BEARD, MALE, MEDICAL_MASK, MESSY_HAIR, MOHAWK, MOHAWK_DARK, MOHAWK_THIN, MOLE, MUSTACHE, MUTTONCHOPS, NERD_GLASSES, NORMAL_BEARD, NORMAL_BEARD_BLACK, ORANGE_SIDE, PEAK_SPIKE, PIGTAILS, PILOT_HELMET, PINK_WITH_HAT, PIPE, POLICE_CAP, PURPLE_EYE_SHADOW, PURPLE_HAIR, PURPLE_LIPSTICK, RED_MOHAWK, REGULAR_SHADES, ROSY_CHEEKS, SHADOW_BEARD, SHAVED_HEAD, SILVER_CHAIN, SMALL_SHADES, SMILE, SPOTS, STRAIGHT_HAIR, STRAIGHT_HAIR_BLONDE, STRAIGHT_HAIR_DARK, STRINGY_HAIR, TASSLE_HAT, THREE_D_GLASSES, TIARA, TOP_HAT, VAMPIRE_HAIR, VAPE, VR, WELDING_GOGGLES, WILD_BLONDE, WILD_HAIR, WILD_WHITE_HAIR, ZOMBIE} function attrStringToEnumMapping(string memory) external view returns (ExtendedPunkDataInterface.PunkAttributeValue); function attrEnumToStringMapping(PunkAttributeValue) external view returns (string memory); function attrValueToTypeEnumMapping(PunkAttributeValue) external view returns (ExtendedPunkDataInterface.PunkAttributeType); } contract AsciiPunks is Ownable, ERC721A { enum PunkAttributeType {SEX, HAIR, EYES, BEARD, EARS, LIPS, MOUTH, FACE, EMOTION, NECK, NOSE, CHEEKS, TEETH} enum PunkAttributeValue {NONE, ALIEN, APE, BANDANA, BEANIE, BIG_BEARD, BIG_SHADES, BLACK_LIPSTICK, BLONDE_BOB, BLONDE_SHORT, BLUE_EYE_SHADOW, BUCK_TEETH, CAP, CAP_FORWARD, CHINSTRAP, CHOKER, CIGARETTE, CLASSIC_SHADES, CLOWN_EYES_BLUE, CLOWN_EYES_GREEN, CLOWN_HAIR_GREEN, CLOWN_NOSE, COWBOY_HAT, CRAZY_HAIR, DARK_HAIR, DO_RAG, EARRING, EYE_MASK, EYE_PATCH, FEDORA, FEMALE, FRONT_BEARD, FRONT_BEARD_DARK, FROWN, FRUMPY_HAIR, GOAT, GOLD_CHAIN, GREEN_EYE_SHADOW, HALF_SHAVED, HANDLEBARS, HEADBAND, HOODIE, HORNED_RIM_GLASSES, HOT_LIPSTICK, KNITTED_CAP, LUXURIOUS_BEARD, MALE, MEDICAL_MASK, MESSY_HAIR, MOHAWK, MOHAWK_DARK, MOHAWK_THIN, MOLE, MUSTACHE, MUTTONCHOPS, NERD_GLASSES, NORMAL_BEARD, NORMAL_BEARD_BLACK, ORANGE_SIDE, PEAK_SPIKE, PIGTAILS, PILOT_HELMET, PINK_WITH_HAT, PIPE, POLICE_CAP, PURPLE_EYE_SHADOW, PURPLE_HAIR, PURPLE_LIPSTICK, RED_MOHAWK, REGULAR_SHADES, ROSY_CHEEKS, SHADOW_BEARD, SHAVED_HEAD, SILVER_CHAIN, SMALL_SHADES, SMILE, SPOTS, STRAIGHT_HAIR, STRAIGHT_HAIR_BLONDE, STRAIGHT_HAIR_DARK, STRINGY_HAIR, TASSLE_HAT, THREE_D_GLASSES, TIARA, TOP_HAT, VAMPIRE_HAIR, VAPE, VR, WELDING_GOGGLES, WILD_BLONDE, WILD_HAIR, WILD_WHITE_HAIR, ZOMBIE} struct Punk { uint16 id; PunkAttributeValue sex; PunkAttributeValue hair; PunkAttributeValue eyes; PunkAttributeValue beard; PunkAttributeValue ears; PunkAttributeValue lips; PunkAttributeValue mouth; PunkAttributeValue face; PunkAttributeValue emotion; PunkAttributeValue neck; PunkAttributeValue nose; PunkAttributeValue cheeks; PunkAttributeValue teeth; } using StringUtils for string; using Address for address; using DynamicBufferLib for DynamicBufferLib.DynamicBuffer; using Strings for uint256; using Strings for uint16; using Strings for uint8; uint public constant costPerToken = 0.005 ether; uint[] public prices = [0 ether, .01 ether, .02 ether, .028 ether, .036 ether, .042 ether, .048 ether, .052 ether, .056 ether, .058 ether, .06 ether]; uint public constant maxSupply = 10_001; bool public isMintActive; bool public contractSealed; bytes constant tokenDescription = "Ascii Punks is a generative homage to the original CryptoPunks. Each Ascii Punk's traits are retrieved on-chain from the CryptoPunksData contract."; PunkDataInterface public immutable punkDataContract; ExtendedPunkDataInterface public immutable extendedPunkDataContract; AsciiPunksRendererInterface public asciiPunksRenderer; modifier unsealed() { require(!contractSealed, "Contract sealed."); _; } function seal() external onlyOwner unsealed { contractSealed = !contractSealed; } function flipMintState() external onlyOwner { isMintActive = !isMintActive; } constructor(address punkDataContractAddress, address extendedPunkDataContractAddress, address asciiPunksRendererAddress) ERC721A("Ascii Punks", "ASCII") { punkDataContract = PunkDataInterface(punkDataContractAddress); extendedPunkDataContract = ExtendedPunkDataInterface(extendedPunkDataContractAddress); setRenderer(asciiPunksRendererAddress); _safeMint(0x41538872240Ef02D6eD9aC45cf4Ff864349D51ED, 10); _safeMint(0x1B3FEA07590E63Ce68Cb21951f3C133a35032473, 10); _safeMint(0x4FD3F94bb056057737DC835757Ba6714692F8a4d, 1); _safeMint(0x477EA7A022e51B6eB0DCb6d802fb5F0cFc3b4A81, 10); _safeMint(0x32bd27BF11c971aD9536b34Fd02A19Fc3D93E527, 2); _safeMint(0xC2172a6315c1D7f6855768F843c420EbB36eDa97, 1); _safeMint(0xF400700bdDb05fBc38657B871E313Db3de8d07ff, 1); _safeMint(0x3c1b27e8f900ce78dCA46C55F413d60794195867, 6); _safeMint(0xA2b1DB1D846d368489B7211831BEdb50b94aE83D, 1); } function _internalMint(address toAddress, uint numTokens) private { if (msg.sender != YS && msg.sender != WG) { require(numTokens < 11, "max tokens per tx 10"); require(isMintActive, "Mint is not active"); require(msg.value == prices[numTokens], "Need exact payment"); } require(numTokens + totalSupply() <= maxSupply, "Supply limit reached."); require(tx.origin == msg.sender, "no contract minters"); _safeMint(toAddress, numTokens); } function airdrop(address toAddress, uint numTokens) external payable { _internalMint(toAddress, numTokens); } function mint(uint numTokens) external payable { _internalMint(msg.sender, numTokens); } function exists(uint tokenId) external view returns (bool) { return _exists(tokenId); } function tokenURI(uint256 id) public view override returns (string memory) { require(_exists(id), "Token does not exist"); if (id == 10_000) { return baguette(); } return constructTokenURI(uint16(id)); } function constructTokenURI(uint16 tokenId) public view returns (string memory) { bytes memory title = abi.encodePacked("Ascii Punk #", tokenId.toString()); return string( abi.encodePacked( "data:application/json;base64,", Base64.encode( bytes( abi.encodePacked( '{', '"name":"', title, '",' '"description":"', tokenDescription, '",' '"image_data":"', asciiPunksRenderer.tokenURI(tokenId), '",' '"attributes": ', punkAttributesAsJSON(tokenId), '}' ) ) ) ) ); } function baguette() public view returns (string memory) { bytes memory title = abi.encodePacked("Ascii Punk #10000 (Baguette)"); bytes memory desc = abi.encodePacked("Oui Oui"); return string( abi.encodePacked( "data:application/json;base64,", Base64.encode( bytes( abi.encodePacked( '{', '"name":"', title, '",' '"description":"', desc, '",' '"image_data":"', asciiPunksRenderer.baguette(), '",' '"attributes": [{"trait_type":"1/1","value":"Baguette"}]}' ) ) ) ) ); } function stringCompare(string memory a, string memory b) internal pure returns (bool) { return keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b)); } bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; function tokenImage(uint16 punkId) public view returns (string memory) { return asciiPunksRenderer.tokenURI(punkId); } address constant YS = 0x32bd27BF11c971aD9536b34Fd02A19Fc3D93E527; address constant WG = 0x41538872240Ef02D6eD9aC45cf4Ff864349D51ED; function withdraw() external { require(address(this).balance > 0, "Nothing to withdraw"); uint total = address(this).balance; uint half = total / 2; Address.sendValue(payable(WG), half); Address.sendValue(payable(YS), total - half); } function creators() external pure returns (address[2] memory) { return [YS, WG]; } function walletOfOwner(address _owner) external view returns (uint[] memory, uint) { uint ownerTokenCount = balanceOf(_owner); uint[] memory ownedTokenIds = new uint[](ownerTokenCount); uint currentTokenId = 0; uint ownedTokenIndex = 0; while (ownedTokenIndex < ownerTokenCount && currentTokenId < totalSupply()) { address currentTokenOwner = _exists(currentTokenId) ? ownerOf(currentTokenId) : address(0); if (currentTokenOwner == _owner) { ownedTokenIds[ownedTokenIndex] = currentTokenId; ownedTokenIndex++; } currentTokenId++; } return (ownedTokenIds, ownedTokenIndex); } function initializePunk(uint16 punkId) private view returns (Punk memory) { Punk memory punk = Punk({ id: punkId, sex: PunkAttributeValue.NONE, hair: PunkAttributeValue.NONE, eyes: PunkAttributeValue.NONE, beard: PunkAttributeValue.NONE, ears: PunkAttributeValue.NONE, lips: PunkAttributeValue.NONE, mouth: PunkAttributeValue.NONE, face: PunkAttributeValue.NONE, emotion: PunkAttributeValue.NONE, neck: PunkAttributeValue.NONE, nose: PunkAttributeValue.NONE, cheeks: PunkAttributeValue.NONE, teeth: PunkAttributeValue.NONE }); punk.id = punkId; string memory attributes = punkDataContract.punkAttributes(punk.id); string[] memory attributeArray = attributes.split(","); for (uint i = 0; i < attributeArray.length; i++) { string memory untrimmedAttribute = attributeArray[i]; string memory trimmedAttribute; if (i < 1) { trimmedAttribute = untrimmedAttribute.split(' ')[0]; } else { trimmedAttribute = untrimmedAttribute._substring(int(bytes(untrimmedAttribute).length - 1), 1); } PunkAttributeValue attrValue = PunkAttributeValue(uint(extendedPunkDataContract.attrStringToEnumMapping(trimmedAttribute))); PunkAttributeType attrType = PunkAttributeType(uint(extendedPunkDataContract.attrValueToTypeEnumMapping(ExtendedPunkDataInterface.PunkAttributeValue(uint(attrValue))))); if (attrType == PunkAttributeType.SEX) { punk.sex = attrValue; } else if (attrType == PunkAttributeType.HAIR) { punk.hair = attrValue; } else if (attrType == PunkAttributeType.EYES) { punk.eyes = attrValue; } else if (attrType == PunkAttributeType.BEARD) { punk.beard = attrValue; } else if (attrType == PunkAttributeType.EARS) { punk.ears = attrValue; } else if (attrType == PunkAttributeType.LIPS) { punk.lips = attrValue; } else if (attrType == PunkAttributeType.MOUTH) { punk.mouth = attrValue; } else if (attrType == PunkAttributeType.FACE) { punk.face = attrValue; } else if (attrType == PunkAttributeType.EMOTION) { punk.emotion = attrValue; } else if (attrType == PunkAttributeType.NECK) { punk.neck = attrValue; } else if (attrType == PunkAttributeType.NOSE) { punk.nose = attrValue; } else if (attrType == PunkAttributeType.CHEEKS) { punk.cheeks = attrValue; } else if (attrType == PunkAttributeType.TEETH) { punk.teeth = attrValue; } } return punk; } function punkAttributeCount(Punk memory punk) public view returns (uint totalCount) { PunkAttributeValue[13] memory attrArray = [ punk.sex, punk.hair, punk.eyes, punk.beard, punk.ears, punk.lips, punk.mouth, punk.face, punk.emotion, punk.neck, punk.nose, punk.cheeks, punk.teeth ]; for (uint i = 0; i < 13; ++i) { if (attrArray[i] != PunkAttributeValue.NONE) { totalCount++; } } // Don't count sex as an attribute totalCount--; } function punkAttributesAsJSON(uint16 punkId) public view returns (string memory json) { Punk memory punk = initializePunk(punkId); PunkAttributeValue none = PunkAttributeValue.NONE; DynamicBufferLib.DynamicBuffer memory outputBytes = DynamicBufferLib.DynamicBuffer('['); PunkAttributeValue[13] memory attrArray = [ punk.sex, punk.hair, punk.eyes, punk.beard, punk.ears, punk.lips, punk.mouth, punk.face, punk.emotion, punk.neck, punk.nose, punk.cheeks, punk.teeth ]; uint attrCount = punkAttributeCount(punk); for (uint i = 0; i < 13; ++i) { PunkAttributeValue attrVal = attrArray[i]; if (attrVal != none) { outputBytes.append(bytes(punkAttributeAsJSON(attrVal))); if (i != (attrCount-1)) { outputBytes.append(','); } else { outputBytes.append(']'); } } } return string(outputBytes.data); } function punkAttributeAsJSON(PunkAttributeValue attribute) internal view returns (string memory json) { require(attribute != PunkAttributeValue.NONE); string memory attributeAsString = extendedPunkDataContract.attrEnumToStringMapping(ExtendedPunkDataInterface.PunkAttributeValue(uint(attribute))); string memory attributeTypeAsString; PunkAttributeType attrType = PunkAttributeType( uint( extendedPunkDataContract.attrValueToTypeEnumMapping( ExtendedPunkDataInterface.PunkAttributeValue( uint( attribute ))))); if (attrType == PunkAttributeType.SEX) { attributeTypeAsString = "Sex"; } else if (attrType == PunkAttributeType.HAIR) { string memory WWH = "Wild White Hair"; if (StringUtils.compareToIgnoreCase(attributeAsString, WWH)) { attributeAsString = "Female Hoodie"; } attributeTypeAsString = "Hair"; } else if (attrType == PunkAttributeType.EYES) { attributeTypeAsString = "Eyes"; } else if (attrType == PunkAttributeType.BEARD) { attributeTypeAsString = "Beard"; } else if (attrType == PunkAttributeType.EARS) { attributeTypeAsString = "Ears"; } else if (attrType == PunkAttributeType.LIPS) { attributeTypeAsString = "Lips"; } else if (attrType == PunkAttributeType.MOUTH) { attributeTypeAsString = "Mouth"; } else if (attrType == PunkAttributeType.FACE) { attributeTypeAsString = "Face"; } else if (attrType == PunkAttributeType.EMOTION) { attributeTypeAsString = "Emotion"; } else if (attrType == PunkAttributeType.NECK) { attributeTypeAsString = "Neck"; } else if (attrType == PunkAttributeType.NOSE) { attributeTypeAsString = "Nose"; } else if (attrType == PunkAttributeType.CHEEKS) { attributeTypeAsString = "Cheeks"; } else if (attrType == PunkAttributeType.TEETH) { attributeTypeAsString = "Teeth"; } return string(abi.encodePacked('{"trait_type":"', attributeTypeAsString, '", "value":"', attributeAsString, '"}')); } function getPrices() external view returns (uint[] memory) { return prices; } function getIsSaleActive() external view returns (bool) { return isMintActive; } event RendererSet(address _new); function setRenderer(address newRendererAddress) public onlyOwner unsealed { asciiPunksRenderer = AsciiPunksRendererInterface(newRendererAddress); emit RendererSet(newRendererAddress); } }
pragma solidity ^0.8.0; /** * Strings Library * * In summary this is a simple library of string functions which make simple * string operations less tedious in solidity. * * Please be aware these functions can be quite gas heavy so use them only when * necessary not to clog the blockchain with expensive transactions. * * @author James Lockhart <[email protected]> */ library StringUtils { /** * Concat (High gas cost) * * Appends two strings together and returns a new value * * @param _base When being used for a data type this is the extended object * otherwise this is the string which will be the concatenated * prefix * @param _value The value to be the concatenated suffix * @return string The resulting string from combinging the base and value */ function concat(string memory _base, string memory _value) internal pure returns (string memory) { bytes memory _baseBytes = bytes(_base); bytes memory _valueBytes = bytes(_value); assert(_valueBytes.length > 0); string memory _tmpValue = new string(_baseBytes.length + _valueBytes.length); bytes memory _newValue = bytes(_tmpValue); uint i; uint j; for (i = 0; i < _baseBytes.length; i++) { _newValue[j++] = _baseBytes[i]; } for (i = 0; i < _valueBytes.length; i++) { _newValue[j++] = _valueBytes[i]; } return string(_newValue); } /** * Index Of * * Locates and returns the position of a character within a string * * @param _base When being used for a data type this is the extended object * otherwise this is the string acting as the haystack to be * searched * @param _value The needle to search for, at present this is currently * limited to one character * @return int The position of the needle starting from 0 and returning -1 * in the case of no matches found */ function indexOf(string memory _base, string memory _value) internal pure returns (int) { return _indexOf(_base, _value, 0); } /** * Index Of * * Locates and returns the position of a character within a string starting * from a defined offset * * @param _base When being used for a data type this is the extended object * otherwise this is the string acting as the haystack to be * searched * @param _value The needle to search for, at present this is currently * limited to one character * @param _offset The starting point to start searching from which can start * from 0, but must not exceed the length of the string * @return int The position of the needle starting from 0 and returning -1 * in the case of no matches found */ function _indexOf(string memory _base, string memory _value, uint _offset) internal pure returns (int) { bytes memory _baseBytes = bytes(_base); bytes memory _valueBytes = bytes(_value); assert(_valueBytes.length == 1); for (uint i = _offset; i < _baseBytes.length; i++) { if (_baseBytes[i] == _valueBytes[0]) { return int(i); } } return -1; } /** * Length * * Returns the length of the specified string * * @param _base When being used for a data type this is the extended object * otherwise this is the string to be measured * @return uint The length of the passed string */ function length(string memory _base) internal pure returns (uint) { bytes memory _baseBytes = bytes(_base); return _baseBytes.length; } /** * Sub String * * Extracts the beginning part of a string based on the desired length * * @param _base When being used for a data type this is the extended object * otherwise this is the string that will be used for * extracting the sub string from * @param _length The length of the sub string to be extracted from the base * @return string The extracted sub string */ function substring(string memory _base, int _length) internal pure returns (string memory) { return _substring(_base, _length, 0); } /** * Sub String * * Extracts the part of a string based on the desired length and offset. The * offset and length must not exceed the lenth of the base string. * * @param _base When being used for a data type this is the extended object * otherwise this is the string that will be used for * extracting the sub string from * @param _length The length of the sub string to be extracted from the base * @param _offset The starting point to extract the sub string from * @return string The extracted sub string */ function _substring(string memory _base, int _length, int _offset) internal pure returns (string memory) { bytes memory _baseBytes = bytes(_base); assert(uint(_offset + _length) <= _baseBytes.length); string memory _tmp = new string(uint(_length)); bytes memory _tmpBytes = bytes(_tmp); uint j = 0; for (uint i = uint(_offset); i < uint(_offset + _length); i++) { _tmpBytes[j++] = _baseBytes[i]; } return string(_tmpBytes); } function split(string memory _base, string memory _value) internal pure returns (string[] memory splitArr) { bytes memory _baseBytes = bytes(_base); uint _offset = 0; uint _splitsCount = 1; while (_offset < _baseBytes.length - 1) { int _limit = _indexOf(_base, _value, _offset); if (_limit == -1) break; else { _splitsCount++; _offset = uint(_limit) + 1; } } splitArr = new string[](_splitsCount); _offset = 0; _splitsCount = 0; while (_offset < _baseBytes.length - 1) { int _limit = _indexOf(_base, _value, _offset); if (_limit == - 1) { _limit = int(_baseBytes.length); } string memory _tmp = new string(uint(_limit) - _offset); bytes memory _tmpBytes = bytes(_tmp); uint j = 0; for (uint i = _offset; i < uint(_limit); i++) { _tmpBytes[j++] = _baseBytes[i]; } _offset = uint(_limit) + 1; splitArr[_splitsCount++] = string(_tmpBytes); } return splitArr; } /** * Compare To * * Compares the characters of two strings, to ensure that they have an * identical footprint * * @param _base When being used for a data type this is the extended object * otherwise this is the string base to compare against * @param _value The string the base is being compared to * @return bool Simply notates if the two string have an equivalent */ function compareTo(string memory _base, string memory _value) internal pure returns (bool) { bytes memory _baseBytes = bytes(_base); bytes memory _valueBytes = bytes(_value); if (_baseBytes.length != _valueBytes.length) { return false; } for (uint i = 0; i < _baseBytes.length; i++) { if (_baseBytes[i] != _valueBytes[i]) { return false; } } return true; } /** * Compare To Ignore Case (High gas cost) * * Compares the characters of two strings, converting them to the same case * where applicable to alphabetic characters to distinguish if the values * match. * * @param _base When being used for a data type this is the extended object * otherwise this is the string base to compare against * @param _value The string the base is being compared to * @return bool Simply notates if the two string have an equivalent value * discarding case */ function compareToIgnoreCase(string memory _base, string memory _value) internal pure returns (bool) { bytes memory _baseBytes = bytes(_base); bytes memory _valueBytes = bytes(_value); if (_baseBytes.length != _valueBytes.length) { return false; } for (uint i = 0; i < _baseBytes.length; i++) { if (_baseBytes[i] != _valueBytes[i] && _upper(_baseBytes[i]) != _upper(_valueBytes[i])) { return false; } } return true; } /** * Upper * * Converts all the values of a string to their corresponding upper case * value. * * @param _base When being used for a data type this is the extended object * otherwise this is the string base to convert to upper case * @return string */ function upper(string memory _base) internal pure returns (string memory) { bytes memory _baseBytes = bytes(_base); for (uint i = 0; i < _baseBytes.length; i++) { _baseBytes[i] = _upper(_baseBytes[i]); } return string(_baseBytes); } /** * Lower * * Converts all the values of a string to their corresponding lower case * value. * * @param _base When being used for a data type this is the extended object * otherwise this is the string base to convert to lower case * @return string */ function lower(string memory _base) internal pure returns (string memory) { bytes memory _baseBytes = bytes(_base); for (uint i = 0; i < _baseBytes.length; i++) { _baseBytes[i] = _lower(_baseBytes[i]); } return string(_baseBytes); } /** * Upper * * Convert an alphabetic character to upper case and return the original * value when not alphabetic * * @param _b1 The byte to be converted to upper case * @return bytes1 The converted value if the passed value was alphabetic * and in a lower case otherwise returns the original value */ function _upper(bytes1 _b1) private pure returns (bytes1) { if (_b1 >= 0x61 && _b1 <= 0x7A) { return bytes1(uint8(_b1) - 32); } return _b1; } /** * Lower * * Convert an alphabetic character to lower case and return the original * value when not alphabetic * * @param _b1 The byte to be converted to lower case * @return bytes1 The converted value if the passed value was alphabetic * and in a upper case otherwise returns the original value */ function _lower(bytes1 _b1) private pure returns (bytes1) { if (_b1 >= 0x41 && _b1 <= 0x5A) { return bytes1(uint8(_b1) + 32); } return _b1; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /// @notice Library for buffers with automatic capacity resizing. /// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/DynamicBuffer.sol) /// @author Modified from cozyco (https://github.com/samkingco/cozyco/blob/main/contracts/utils/DynamicBuffer.sol) library DynamicBufferLib { /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* STRUCTS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Type to represent a dynamic buffer in memory. /// You can directly assign to `data`, and the `append` function will /// take care of the memory allocation. struct DynamicBuffer { bytes data; } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* OPERATIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Appends `data` to `buffer`. function append(DynamicBuffer memory buffer, bytes memory data) internal pure { /// @solidity memory-safe-assembly assembly { if mload(data) { let w := not(31) let bufferData := mload(buffer) let bufferDataLength := mload(bufferData) let newBufferDataLength := add(mload(data), bufferDataLength) // Some random prime number to multiply `capacity`, so that // we know that the `capacity` is for a dynamic buffer. // Selected to be larger than any memory pointer realistically. let prime := 1621250193422201 let capacity := mload(add(bufferData, w)) // Extract `capacity`, and set it to 0, if it is not a multiple of `prime`. capacity := mul(div(capacity, prime), iszero(mod(capacity, prime))) // Expand / Reallocate memory if required. // Note that we need to allocate an exta word for the length, and // and another extra word as a safety word (giving a total of 0x40 bytes). // Without the safety word, the data at the next free memory word can be overwritten, // because the backwards copying can exceed the buffer space used for storage. for {} iszero(lt(newBufferDataLength, capacity)) {} { // Approximately double the memory with a heuristic, // ensuring more than enough space for the combined data, // rounding up to the next multiple of 32. let newCapacity := and(add(capacity, add(or(capacity, newBufferDataLength), 32)), w) // If next word after current buffer is not eligible for use. if iszero(eq(mload(0x40), add(bufferData, add(0x40, capacity)))) { // Set the `newBufferData` to point to the word after capacity. let newBufferData := add(mload(0x40), 0x20) // Reallocate the memory. mstore(0x40, add(newBufferData, add(0x40, newCapacity))) // Store the `newBufferData`. mstore(buffer, newBufferData) // Copy `bufferData` one word at a time, backwards. for { let o := and(add(bufferDataLength, 32), w) } 1 {} { mstore(add(newBufferData, o), mload(add(bufferData, o))) o := add(o, w) // `sub(o, 0x20)`. if iszero(o) { break } } // Store the `capacity` multiplied by `prime` in the word before the `length`. mstore(add(newBufferData, w), mul(prime, newCapacity)) // Assign `newBufferData` to `bufferData`. bufferData := newBufferData break } // Expand the memory. mstore(0x40, add(bufferData, add(0x40, newCapacity))) // Store the `capacity` multiplied by `prime` in the word before the `length`. mstore(add(bufferData, w), mul(prime, newCapacity)) break } // Initalize `output` to the next empty position in `bufferData`. let output := add(bufferData, bufferDataLength) // Copy `data` one word at a time, backwards. for { let o := and(add(mload(data), 32), w) } 1 {} { mstore(add(output, o), mload(add(data, o))) o := add(o, w) // `sub(o, 0x20)`. if iszero(o) { break } } // Zeroize the word after the buffer. mstore(add(add(bufferData, 0x20), newBufferDataLength), 0) // Store the `newBufferDataLength`. mstore(bufferData, newBufferDataLength) } } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721A.sol'; /** * @dev Interface of ERC721 token receiver. */ interface ERC721A__IERC721Receiver { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } /** * @title ERC721A * * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721) * Non-Fungible Token Standard, including the Metadata extension. * Optimized for lower gas during batch mints. * * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...) * starting from `_startTokenId()`. * * Assumptions: * * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is IERC721A { // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364). struct TokenApprovalRef { address value; } // ============================================================= // CONSTANTS // ============================================================= // Mask of an entry in packed address data. uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant _BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant _BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant _BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant _BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant _BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant _BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225; // The bit position of `extraData` in packed ownership. uint256 private constant _BITPOS_EXTRA_DATA = 232; // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`. uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1; // The mask of the lower 160 bits for addresses. uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1; // The maximum `quantity` that can be minted with {_mintERC2309}. // This limit is to prevent overflows on the address data entries. // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309} // is required to cause an overflow, which is unrealistic. uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000; // The `Transfer` event signature is given by: // `keccak256(bytes("Transfer(address,address,uint256)"))`. bytes32 private constant _TRANSFER_EVENT_SIGNATURE = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; // ============================================================= // STORAGE // ============================================================= // The next token ID to be minted. uint256 private _currentIndex; // The number of tokens burned. uint256 private _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. // See {_packedOwnershipOf} implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` // - [232..255] `extraData` mapping(uint256 => uint256) private _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) private _packedAddressData; // Mapping from token ID to approved address. mapping(uint256 => TokenApprovalRef) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // ============================================================= // CONSTRUCTOR // ============================================================= constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } // ============================================================= // TOKEN COUNTING OPERATIONS // ============================================================= /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view virtual returns (uint256) { return _currentIndex; } /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() public view virtual override returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than `_currentIndex - _startTokenId()` times. unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view virtual returns (uint256) { // Counter underflow is impossible as `_currentIndex` does not decrement, // and it is initialized to `_startTokenId()`. unchecked { return _currentIndex - _startTokenId(); } } /** * @dev Returns the total number of tokens burned. */ function _totalBurned() internal view virtual returns (uint256) { return _burnCounter; } // ============================================================= // ADDRESS DATA OPERATIONS // ============================================================= /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) public view virtual override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return uint64(_packedAddressData[owner] >> _BITPOS_AUX); } /** * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal virtual { uint256 packed = _packedAddressData[owner]; uint256 auxCasted; // Cast `aux` with assembly to avoid redundant masking. assembly { auxCasted := aux } packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX); _packedAddressData[owner] = packed; } // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { // The interface IDs are constants representing the first 4 bytes // of the XOR of all function selectors in the interface. // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165) // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`) return interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165. interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721. interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata. } // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the token collection symbol. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : ''; } /** * @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, it can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } // ============================================================= // OWNERSHIPS OPERATIONS // ============================================================= /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { return address(uint160(_packedOwnershipOf(tokenId))); } /** * @dev Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around over time. */ function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnershipOf(tokenId)); } /** * @dev Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnerships[index]); } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal virtual { if (_packedOwnerships[index] == 0) { _packedOwnerships[index] = _packedOwnershipOf(index); } } /** * Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr) if (curr < _currentIndex) { uint256 packed = _packedOwnerships[curr]; // If not burned. if (packed & _BITMASK_BURNED == 0) { // Invariant: // There will always be an initialized ownership slot // (i.e. `ownership.addr != address(0) && ownership.burned == false`) // before an unintialized ownership slot // (i.e. `ownership.addr == address(0) && ownership.burned == false`) // Hence, `curr` will not underflow. // // We can directly compare the packed value. // If the address is zero, packed will be zero. while (packed == 0) { packed = _packedOwnerships[--curr]; } return packed; } } } revert OwnerQueryForNonexistentToken(); } /** * @dev Returns the unpacked `TokenOwnership` struct from `packed`. */ function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) { ownership.addr = address(uint160(packed)); ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP); ownership.burned = packed & _BITMASK_BURNED != 0; ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA); } /** * @dev Packs ownership data into a single uint256. */ function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`. result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags)) } } /** * @dev Returns the `nextInitialized` flag set if `quantity` equals 1. */ function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) { // For branchless setting of the `nextInitialized` flag. assembly { // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`. result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1)) } } // ============================================================= // APPROVAL OPERATIONS // ============================================================= /** * @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) public payable virtual override { address owner = ownerOf(tokenId); if (_msgSenderERC721A() != owner) if (!isApprovedForAll(owner, _msgSenderERC721A())) { revert ApprovalCallerNotOwnerNorApproved(); } _tokenApprovals[tokenId].value = to; emit Approval(owner, to, tokenId); } /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId].value; } /** * @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) public virtual override { _operatorApprovals[_msgSenderERC721A()][operator] = approved; emit ApprovalForAll(_msgSenderERC721A(), operator, approved); } /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @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. See {_mint}. */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && // If within bounds, _packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned. } /** * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`. */ function _isSenderApprovedOrOwner( address approvedAddress, address owner, address msgSender ) private pure returns (bool result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean. msgSender := and(msgSender, _BITMASK_ADDRESS) // `msgSender == owner || msgSender == approvedAddress`. result := or(eq(msgSender, owner), eq(msgSender, approvedAddress)) } } /** * @dev Returns the storage slot and value for the approved address of `tokenId`. */ function _getApprovedSlotAndAddress(uint256 tokenId) private view returns (uint256 approvedAddressSlot, address approvedAddress) { TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId]; // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`. assembly { approvedAddressSlot := tokenApproval.slot approvedAddress := sload(approvedAddressSlot) } } // ============================================================= // TRANSFER OPERATIONS // ============================================================= /** * @dev Transfers `tokenId` from `from` to `to`. * * 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 ) public payable virtual override { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner(); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // We can directly increment and decrement the balances. --_packedAddressData[from]; // Updates: `balance -= 1`. ++_packedAddressData[to]; // Updates: `balance += 1`. // Updates: // - `address` to the next owner. // - `startTimestamp` to the timestamp of transfering. // - `burned` to `false`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( to, _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public payable virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @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 memory _data ) public payable virtual override { transferFrom(from, to, tokenId); if (to.code.length != 0) if (!_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @dev Hook that is called before a set of serially-ordered token IDs * are about to be transferred. This includes minting. * And also called before burning one token. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * 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, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token IDs * have been transferred. This includes minting. * And also called after one token has been burned. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * `from` - Previous owner of the given token ID. * `to` - Target address that will receive the token. * `tokenId` - Token ID to be transferred. * `_data` - Optional data to send along with the call. * * Returns whether the call correctly returned the expected magic value. */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns ( bytes4 retval ) { return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } // ============================================================= // MINT OPERATIONS // ============================================================= /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event for each mint. */ function _mint(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // `balance` and `numberMinted` have a maximum limit of 2**64. // `tokenId` has a maximum limit of 2**256. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); uint256 toMasked; uint256 end = startTokenId + quantity; // Use assembly to loop and emit the `Transfer` event for gas savings. // The duplicated `log4` removes an extra check and reduces stack juggling. // The assembly, together with the surrounding Solidity code, have been // delicately arranged to nudge the compiler into producing optimized opcodes. assembly { // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. toMasked := and(to, _BITMASK_ADDRESS) // Emit the `Transfer` event. log4( 0, // Start of data (0, since no data). 0, // End of data (0, since no data). _TRANSFER_EVENT_SIGNATURE, // Signature. 0, // `address(0)`. toMasked, // `to`. startTokenId // `tokenId`. ) // The `iszero(eq(,))` check ensures that large values of `quantity` // that overflows uint256 will make the loop run out of gas. // The compiler will optimize the `iszero` away for performance. for { let tokenId := add(startTokenId, 1) } iszero(eq(tokenId, end)) { tokenId := add(tokenId, 1) } { // Emit the `Transfer` event. Similar to above. log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId) } } if (toMasked == 0) revert MintToZeroAddress(); _currentIndex = end; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * This function is intended for efficient minting only during contract creation. * * It emits only one {ConsecutiveTransfer} as defined in * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309), * instead of a sequence of {Transfer} event(s). * * Calling this function outside of contract creation WILL make your contract * non-compliant with the ERC721 standard. * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309 * {ConsecutiveTransfer} event is only permissible during contract creation. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {ConsecutiveTransfer} event. */ function _mintERC2309(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are unrealistic due to the above check for `quantity` to be below the limit. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to); _currentIndex = startTokenId + quantity; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * See {_mint}. * * Emits a {Transfer} event for each mint. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal virtual { _mint(to, quantity); unchecked { if (to.code.length != 0) { uint256 end = _currentIndex; uint256 index = end - quantity; do { if (!_checkContractOnERC721Received(address(0), to, index++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (index < end); // Reentrancy protection. if (_currentIndex != end) revert(); } } } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal virtual { _safeMint(to, quantity, ''); } // ============================================================= // BURN OPERATIONS // ============================================================= /** * @dev Equivalent to `_burn(tokenId, false)`. */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); address from = address(uint160(prevOwnershipPacked)); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); if (approvalCheck) { // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // Updates: // - `balance -= 1`. // - `numberBurned += 1`. // // We can directly decrement the balance, and increment the number burned. // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`. _packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1; // Updates: // - `address` to the last owner. // - `startTimestamp` to the timestamp of burning. // - `burned` to `true`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( from, (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } // ============================================================= // EXTRA DATA OPERATIONS // ============================================================= /** * @dev Directly sets the extra data for the ownership data `index`. */ function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual { uint256 packed = _packedOwnerships[index]; if (packed == 0) revert OwnershipNotInitializedForExtraData(); uint256 extraDataCasted; // Cast `extraData` with assembly to avoid redundant masking. assembly { extraDataCasted := extraData } packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA); _packedOwnerships[index] = packed; } /** * @dev Called during each token transfer to set the 24bit `extraData` field. * Intended to be overridden by the cosumer contract. * * `previousExtraData` - the value of `extraData` before transfer. * * 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, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _extraData( address from, address to, uint24 previousExtraData ) internal view virtual returns (uint24) {} /** * @dev Returns the next extra data for the packed ownership data. * The returned result is shifted into position. */ function _nextExtraData( address from, address to, uint256 prevOwnershipPacked ) private view returns (uint256) { uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA); return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA; } // ============================================================= // OTHER OPERATIONS // ============================================================= /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { return msg.sender; } /** * @dev Converts a uint256 to its ASCII string decimal representation. */ function _toString(uint256 value) internal pure virtual returns (string memory str) { assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), but // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned. // We will need 1 word for the trailing zeros padding, 1 word for the length, // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0. let m := add(mload(0x40), 0xa0) // Update the free memory pointer to allocate. mstore(0x40, m) // Assign the `str` to the end. str := sub(m, 0x20) // Zeroize the slot after the string. mstore(str, 0) // Cache the end of the memory to calculate the length later. let end := str // We write the string from rightmost digit to leftmost digit. // The following is essentially a do-while loop that also handles the zero case. // prettier-ignore for { let temp := value } 1 {} { str := sub(str, 1) // Write the character to the pointer. // The ASCII index of the '0' character is 48. mstore8(str, add(48, mod(temp, 10))) // Keep dividing `temp` until zero. temp := div(temp, 10) // prettier-ignore if iszero(temp) { break } } let length := sub(end, str) // Move the pointer 32 bytes leftwards to make room for the length. str := sub(str, 0x20) // Store the length. mstore(str, length) } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /// @notice Library to encode strings in Base64. /// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/Base64.sol) /// @author Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/Base64.sol) /// @author Modified from (https://github.com/Brechtpd/base64/blob/main/base64.sol) by Brecht Devos - <[email protected]>. library Base64 { /// @dev Encodes `data` using the base64 encoding described in RFC 4648. /// See: https://datatracker.ietf.org/doc/html/rfc4648 /// @param fileSafe Whether to replace '+' with '-' and '/' with '_'. /// @param noPadding Whether to strip away the padding. function encode(bytes memory data, bool fileSafe, bool noPadding) internal pure returns (string memory result) { /// @solidity memory-safe-assembly assembly { let dataLength := mload(data) if dataLength { // Multiply by 4/3 rounded up. // The `shl(2, ...)` is equivalent to multiplying by 4. let encodedLength := shl(2, div(add(dataLength, 2), 3)) // Set `result` to point to the start of the free memory. result := mload(0x40) // Store the table into the scratch space. // Offsetted by -1 byte so that the `mload` will load the character. // We will rewrite the free memory pointer at `0x40` later with // the allocated size. // The magic constant 0x0230 will translate "-_" + "+/". mstore(0x1f, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdef") mstore(0x3f, sub("ghijklmnopqrstuvwxyz0123456789-_", mul(iszero(fileSafe), 0x0230))) // Skip the first slot, which stores the length. let ptr := add(result, 0x20) let end := add(ptr, encodedLength) // Run over the input, 3 bytes at a time. for {} 1 {} { data := add(data, 3) // Advance 3 bytes. let input := mload(data) // Write 4 bytes. Optimized for fewer stack operations. mstore8(0, mload(and(shr(18, input), 0x3F))) mstore8(1, mload(and(shr(12, input), 0x3F))) mstore8(2, mload(and(shr(6, input), 0x3F))) mstore8(3, mload(and(input, 0x3F))) mstore(ptr, mload(0x00)) ptr := add(ptr, 4) // Advance 4 bytes. if iszero(lt(ptr, end)) { break } } // Allocate the memory for the string. // Add 31 and mask with `not(31)` to round the // free memory pointer up the next multiple of 32. mstore(0x40, and(add(end, 31), not(31))) // Equivalent to `o = [0, 2, 1][dataLength % 3]`. let o := div(2, mod(dataLength, 3)) // Offset `ptr` and pad with '='. We can simply write over the end. mstore(sub(ptr, o), shl(240, 0x3d3d)) // Set `o` to zero if there is padding. o := mul(iszero(iszero(noPadding)), o) // Zeroize the slot after the string. mstore(sub(ptr, o), 0) // Write the length of the string. mstore(result, sub(encodedLength, o)) } } } /// @dev Encodes `data` using the base64 encoding described in RFC 4648. /// Equivalent to `encode(data, false, false)`. function encode(bytes memory data) internal pure returns (string memory result) { result = encode(data, false, false); } /// @dev Encodes `data` using the base64 encoding described in RFC 4648. /// Equivalent to `encode(data, fileSafe, false)`. function encode(bytes memory data, bool fileSafe) internal pure returns (string memory result) { result = encode(data, fileSafe, false); } /// @dev Encodes base64 encoded `data`. /// /// Supports: /// - RFC 4648 (both standard and file-safe mode). /// - RFC 3501 (63: ','). /// /// Does not support: /// - Line breaks. /// /// Note: For performance reasons, /// this function will NOT revert on invalid `data` inputs. /// Outputs for invalid inputs will simply be undefined behaviour. /// It is the user's responsibility to ensure that the `data` /// is a valid base64 encoded string. function decode(string memory data) internal pure returns (bytes memory result) { /// @solidity memory-safe-assembly assembly { let dataLength := mload(data) if dataLength { let decodedLength := mul(shr(2, dataLength), 3) for {} 1 {} { // If padded. if iszero(and(dataLength, 3)) { let t := xor(mload(add(data, dataLength)), 0x3d3d) // forgefmt: disable-next-item decodedLength := sub( decodedLength, add(iszero(byte(30, t)), iszero(byte(31, t))) ) break } // If non-padded. decodedLength := add(decodedLength, sub(and(dataLength, 3), 1)) break } result := mload(0x40) // Write the length of the bytes. mstore(result, decodedLength) // Skip the first slot, which stores the length. let ptr := add(result, 0x20) let end := add(ptr, decodedLength) // Load the table into the scratch space. // Constants are optimized for smaller bytecode with zero gas overhead. // `m` also doubles as the mask of the upper 6 bits. let m := 0xfc000000fc00686c7074787c8084888c9094989ca0a4a8acb0b4b8bcc0c4c8cc mstore(0x5b, m) mstore(0x3b, 0x04080c1014181c2024282c3034383c4044484c5054585c6064) mstore(0x1a, 0xf8fcf800fcd0d4d8dce0e4e8ecf0f4) for {} 1 {} { // Read 4 bytes. data := add(data, 4) let input := mload(data) // Write 3 bytes. // forgefmt: disable-next-item mstore(ptr, or( and(m, mload(byte(28, input))), shr(6, or( and(m, mload(byte(29, input))), shr(6, or( and(m, mload(byte(30, input))), shr(6, mload(byte(31, input))) )) )) )) ptr := add(ptr, 3) if iszero(lt(ptr, end)) { break } } // Allocate the memory for the string. // Add 31 and mask with `not(31)` to round the // free memory pointer up the next multiple of 32. mstore(0x40, and(add(end, 31), not(31))) // Zeroize the slot after the bytes. mstore(end, 0) // Restore the zero slot. mstore(0x60, 0) } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.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 /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @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); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (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 Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { 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 // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; /** * @dev Interface of ERC721A. */ interface IERC721A { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * The token does not exist. */ error ApprovalQueryForNonexistentToken(); /** * Cannot query the balance for the zero address. */ error BalanceQueryForZeroAddress(); /** * Cannot mint to the zero address. */ error MintToZeroAddress(); /** * The quantity of tokens minted must be more than zero. */ error MintZeroQuantity(); /** * The token does not exist. */ error OwnerQueryForNonexistentToken(); /** * The caller must own the token or be an approved operator. */ error TransferCallerNotOwnerNorApproved(); /** * The token must be owned by `from`. */ error TransferFromIncorrectOwner(); /** * Cannot safely transfer to a contract that does not implement the * ERC721Receiver interface. */ error TransferToNonERC721ReceiverImplementer(); /** * Cannot transfer to the zero address. */ error TransferToZeroAddress(); /** * The token does not exist. */ error URIQueryForNonexistentToken(); /** * The `quantity` minted with ERC2309 exceeds the safety limit. */ error MintERC2309QuantityExceedsLimit(); /** * The `extraData` cannot be set on an unintialized ownership slot. */ error OwnershipNotInitializedForExtraData(); // ============================================================= // STRUCTS // ============================================================= struct TokenOwnership { // The address of the owner. address addr; // Stores the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}. uint24 extraData; } // ============================================================= // TOKEN COUNTERS // ============================================================= /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() external view returns (uint256); // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); // ============================================================= // IERC721 // ============================================================= /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables * (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, * checking first that contract recipients are aware of the ERC721 protocol * to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move * this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external payable; /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Transfers `tokenId` 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 payable; /** * @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 payable; /** * @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); // ============================================================= // IERC721Metadata // ============================================================= /** * @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); // ============================================================= // IERC2309 // ============================================================= /** * @dev Emitted when tokens in `fromTokenId` to `toTokenId` * (inclusive) is transferred from `from` to `to`, as defined in the * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard. * * See {_mintERC2309} for more details. */ event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to); }
// 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; } }
{ "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
[{"inputs":[{"internalType":"address","name":"punkDataContractAddress","type":"address"},{"internalType":"address","name":"extendedPunkDataContractAddress","type":"address"},{"internalType":"address","name":"asciiPunksRendererAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"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":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_new","type":"address"}],"name":"RendererSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"toAddress","type":"address"},{"internalType":"uint256","name":"numTokens","type":"uint256"}],"name":"airdrop","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"asciiPunksRenderer","outputs":[{"internalType":"contract AsciiPunksRendererInterface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baguette","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"tokenId","type":"uint16"}],"name":"constructTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractSealed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"costPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"creators","outputs":[{"internalType":"address[2]","name":"","type":"address[2]"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"extendedPunkDataContract","outputs":[{"internalType":"contract ExtendedPunkDataInterface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"flipMintState","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":"getIsSaleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPrices","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":"isMintActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"numTokens","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"prices","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint16","name":"id","type":"uint16"},{"internalType":"enum AsciiPunks.PunkAttributeValue","name":"sex","type":"uint8"},{"internalType":"enum AsciiPunks.PunkAttributeValue","name":"hair","type":"uint8"},{"internalType":"enum AsciiPunks.PunkAttributeValue","name":"eyes","type":"uint8"},{"internalType":"enum AsciiPunks.PunkAttributeValue","name":"beard","type":"uint8"},{"internalType":"enum AsciiPunks.PunkAttributeValue","name":"ears","type":"uint8"},{"internalType":"enum AsciiPunks.PunkAttributeValue","name":"lips","type":"uint8"},{"internalType":"enum AsciiPunks.PunkAttributeValue","name":"mouth","type":"uint8"},{"internalType":"enum AsciiPunks.PunkAttributeValue","name":"face","type":"uint8"},{"internalType":"enum AsciiPunks.PunkAttributeValue","name":"emotion","type":"uint8"},{"internalType":"enum AsciiPunks.PunkAttributeValue","name":"neck","type":"uint8"},{"internalType":"enum AsciiPunks.PunkAttributeValue","name":"nose","type":"uint8"},{"internalType":"enum AsciiPunks.PunkAttributeValue","name":"cheeks","type":"uint8"},{"internalType":"enum AsciiPunks.PunkAttributeValue","name":"teeth","type":"uint8"}],"internalType":"struct AsciiPunks.Punk","name":"punk","type":"tuple"}],"name":"punkAttributeCount","outputs":[{"internalType":"uint256","name":"totalCount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"punkId","type":"uint16"}],"name":"punkAttributesAsJSON","outputs":[{"internalType":"string","name":"json","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"punkDataContract","outputs":[{"internalType":"contract PunkDataInterface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","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":"payable","type":"function"},{"inputs":[],"name":"seal","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":"address","name":"newRendererAddress","type":"address"}],"name":"setRenderer","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":"uint16","name":"punkId","type":"uint16"}],"name":"tokenImage","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"walletOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
610220604052600060c0908152662386f26fc1000060e05266470de4df82000061010052666379da05b6000061012052667fe5cf2bea000061014052669536c7089100006101605266aa87bee53800006101805266b8bdb9785200006101a05266c6f3b40b6c00006101c05266ce0eb154f900006101e05266d529ae9e860000610200526200009390600990600b62000671565b50348015620000a157600080fd5b506040516200488838038062004888833981016040819052620000c49162000700565b6040518060400160405280600b81526020016a41736369692050756e6b7360a81b81525060405180604001604052806005815260200164415343494960d81b815250620001206200011a6200029560201b60201c565b62000299565b60036200012e8382620007ee565b5060046200013d8282620007ee565b50600060015550506001600160a01b03808416608052821660a0526200016381620002e9565b620001847341538872240ef02d6ed9ac45cf4ff864349d51ed600a620003a2565b620001a5731b3fea07590e63ce68cb21951f3c133a35032473600a620003a2565b620001c6734fd3f94bb056057737dc835757ba6714692f8a4d6001620003a2565b620001e773477ea7a022e51b6eb0dcb6d802fb5f0cfc3b4a81600a620003a2565b620002087332bd27bf11c971ad9536b34fd02a19fc3d93e5276002620003a2565b6200022973c2172a6315c1d7f6855768f843c420ebb36eda976001620003a2565b6200024a73f400700bddb05fbc38657b871e313db3de8d07ff6001620003a2565b6200026b733c1b27e8f900ce78dca46c55f413d607941958676006620003a2565b6200028c73a2b1db1d846d368489b7211831bedb50b94ae83d6001620003a2565b50505062000960565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b620002f3620003c8565b600a54610100900460ff1615620003445760405162461bcd60e51b815260206004820152601060248201526f21b7b73a3930b1ba1039b2b0b632b21760811b60448201526064015b60405180910390fd5b600a805462010000600160b01b031916620100006001600160a01b038416908102919091179091556040519081527f869c6ebc45b752b03abf2550b2114eed8d11ba3a40ea9da00d3ef99fd004af729060200160405180910390a150565b620003c48282604051806020016040528060008152506200042660201b60201c565b5050565b6000546001600160a01b03163314620004245760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016200033b565b565b6200043283836200049d565b6001600160a01b0383163b1562000498576001548281035b600181019062000460906000908790866200057d565b6200047e576040516368d2bf6b60e11b815260040160405180910390fd5b8181106200044a5781600154146200049557600080fd5b50505b505050565b6001546000829003620004c35760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526006602090815260408083208054680100000000000000018802019055848352600590915281206001851460e11b4260a01b17831790558284019083908390600080516020620048688339815191528180a4600183015b81811462000552578083600060008051602062004868833981519152600080a460010162000529565b50816000036200057457604051622e076360e81b815260040160405180910390fd5b60015550505050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290620005b4903390899088908890600401620008ba565b6020604051808303816000875af1925050508015620005f2575060408051601f3d908101601f19168201909252620005ef918101906200092d565b60015b62000654573d80801562000623576040519150601f19603f3d011682016040523d82523d6000602084013e62000628565b606091505b5080516000036200064c576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b828054828255906000526020600020908101928215620006ba579160200282015b82811115620006ba578251829066ffffffffffffff1690559160200191906001019062000692565b50620006c8929150620006cc565b5090565b5b80821115620006c85760008155600101620006cd565b80516001600160a01b0381168114620006fb57600080fd5b919050565b6000806000606084860312156200071657600080fd5b6200072184620006e3565b92506200073160208501620006e3565b91506200074160408501620006e3565b90509250925092565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200077557607f821691505b6020821081036200079657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200049857600081815260208120601f850160051c81016020861015620007c55750805b601f850160051c820191505b81811015620007e657828155600101620007d1565b505050505050565b81516001600160401b038111156200080a576200080a6200074a565b62000822816200081b845462000760565b846200079c565b602080601f8311600181146200085a5760008415620008415750858301515b600019600386901b1c1916600185901b178555620007e6565b600085815260208120601f198616915b828110156200088b578886015182559484019460019091019084016200086a565b5085821015620008aa5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060018060a01b038087168352602081871681850152856040850152608060608501528451915081608085015260005b82811015620009095785810182015185820160a001528101620008eb565b5050600060a0828501015260a0601f19601f83011684010191505095945050505050565b6000602082840312156200094057600080fd5b81516001600160e01b0319811681146200095957600080fd5b9392505050565b60805160a051613ebf620009a96000396000818161035501528181611bee01528181611c8c0152818161203d01526120f60152600081816103210152611a950152613ebf6000f3fe6080604052600436106102465760003560e01c80636352211e11610139578063b6501637116100b6578063c077da9e1161007a578063c077da9e14610681578063c87b56dd14610699578063d5abeb01146106b9578063e3da42b0146106cf578063e985e9c5146106ef578063f2fde38b1461070f57600080fd5b8063b6501637146105f8578063b88d4fde14610617578063bc31c1c11461062a578063bd089f421461064a578063bd9a548b1461065f57600080fd5b80638da5cb5b116100fd5780638da5cb5b1461057257806395d89b41146105905780639896ed11146105a5578063a0712d68146105c5578063a22cb465146105d857600080fd5b80636352211e146104e457806370a0823114610504578063715018a614610524578063788263a2146105395780638ba4cc3c1461055f57600080fd5b80633ba523c7116101c75780634f02f4d21161018b5780634f02f4d2146104555780634f558e791461047557806356d3163d1461049557806359c74f29146104b55780635b92ac0d146104ca57600080fd5b80633ba523c7146103cf5780633ccfd60b146103ea5780633fb27b85146103ff57806342842e0e14610414578063438b63001461042757600080fd5b80630f5a9f891161020e5780630f5a9f891461030f578063137fee321461034357806318160ddd1461037757806323b872dd1461039a5780632f2fc416146103ad57600080fd5b806301ffc9a71461024b578063023abe2b1461028057806306fdde03146102ad578063081812fc146102c2578063095ea7b3146102fa575b600080fd5b34801561025757600080fd5b5061026b6102663660046133c5565b61072f565b60405190151581526020015b60405180910390f35b34801561028c57600080fd5b506102a061029b3660046133f9565b610781565b6040516102779190613464565b3480156102b957600080fd5b506102a0610aed565b3480156102ce57600080fd5b506102e26102dd366004613477565b610b7f565b6040516001600160a01b039091168152602001610277565b61030d6103083660046134a7565b610bc3565b005b34801561031b57600080fd5b506102e27f000000000000000000000000000000000000000000000000000000000000000081565b34801561034f57600080fd5b506102e27f000000000000000000000000000000000000000000000000000000000000000081565b34801561038357600080fd5b50600254600154035b604051908152602001610277565b61030d6103a83660046134d1565b610c63565b3480156103b957600080fd5b506103c2610dfb565b604051610277919061350d565b3480156103db57600080fd5b5061038c6611c37937e0800081565b3480156103f657600080fd5b5061030d610e42565b34801561040b57600080fd5b5061030d610ee6565b61030d6104223660046134d1565b610f56565b34801561043357600080fd5b5061044761044236600461353e565b610f76565b604051610277929190613594565b34801561046157600080fd5b5061038c61047036600461363f565b611070565b34801561048157600080fd5b5061026b610490366004613477565b61132c565b3480156104a157600080fd5b5061030d6104b036600461353e565b611337565b3480156104c157600080fd5b5061030d6113e8565b3480156104d657600080fd5b50600a5461026b9060ff1681565b3480156104f057600080fd5b506102e26104ff366004613477565b611404565b34801561051057600080fd5b5061038c61051f36600461353e565b61140f565b34801561053057600080fd5b5061030d61145e565b34801561054557600080fd5b50600a546102e2906201000090046001600160a01b031681565b61030d61056d3660046134a7565b611472565b34801561057e57600080fd5b506000546001600160a01b03166102e2565b34801561059c57600080fd5b506102a061147c565b3480156105b157600080fd5b506102a06105c03660046133f9565b61148b565b61030d6105d3366004613477565b611506565b3480156105e457600080fd5b5061030d6105f336600461374f565b611513565b34801561060457600080fd5b50600a5461026b90610100900460ff1681565b61030d6106253660046137b3565b61157f565b34801561063657600080fd5b5061038c610645366004613477565b6115c9565b34801561065657600080fd5b506102a06115ea565b34801561066b57600080fd5b50610674611727565b604051610277919061385e565b34801561068d57600080fd5b50600a5460ff1661026b565b3480156106a557600080fd5b506102a06106b4366004613477565b61177e565b3480156106c557600080fd5b5061038c61271181565b3480156106db57600080fd5b506102a06106ea3660046133f9565b6117e2565b3480156106fb57600080fd5b5061026b61070a366004613871565b6118e9565b34801561071b57600080fd5b5061030d61072a36600461353e565b611917565b60006301ffc9a760e01b6001600160e01b03198316148061076057506380ac58cd60e01b6001600160e01b03198316145b8061077b5750635b5e139f60e01b6001600160e01b03198316145b92915050565b6060600061078e8361198d565b6040805160608101825260016020808301918252605b60f81b8385015290825282516101a08101909352830151929350600092909183918190605c8111156107d8576107d86138a4565b605c8111156107e9576107e96138a4565b81526020018560400151605c811115610804576108046138a4565b605c811115610815576108156138a4565b81526020018560600151605c811115610830576108306138a4565b605c811115610841576108416138a4565b81526020018560800151605c81111561085c5761085c6138a4565b605c81111561086d5761086d6138a4565b81526020018560a00151605c811115610888576108886138a4565b605c811115610899576108996138a4565b81526020018560c00151605c8111156108b4576108b46138a4565b605c8111156108c5576108c56138a4565b81526020018560e00151605c8111156108e0576108e06138a4565b605c8111156108f1576108f16138a4565b8152602001856101000151605c81111561090d5761090d6138a4565b605c81111561091e5761091e6138a4565b8152602001856101200151605c81111561093a5761093a6138a4565b605c81111561094b5761094b6138a4565b8152602001856101400151605c811115610967576109676138a4565b605c811115610978576109786138a4565b8152602001856101600151605c811115610994576109946138a4565b605c8111156109a5576109a56138a4565b8152602001856101800151605c8111156109c1576109c16138a4565b605c8111156109d2576109d26138a4565b8152602001856101a00151605c8111156109ee576109ee6138a4565b605c8111156109ff576109ff6138a4565b905290506000610a0e85611070565b905060005b600d811015610ae05760008382600d8110610a3057610a306138ba565b6020020151905085605c811115610a4957610a496138a4565b81605c811115610a5b57610a5b6138a4565b14610acf57610a73610a6c82612019565b869061256e565b610a7e6001846138e6565b8214610aac576040805180820190915260018152600b60fa1b6020820152610aa790869061256e565b610acf565b6040805180820190915260018152605d60f81b6020820152610acf90869061256e565b50610ad9816138f9565b9050610a13565b5050905195945050505050565b606060038054610afc90613912565b80601f0160208091040260200160405190810160405280929190818152602001828054610b2890613912565b8015610b755780601f10610b4a57610100808354040283529160200191610b75565b820191906000526020600020905b815481529060010190602001808311610b5857829003601f168201915b5050505050905090565b6000610b8a8261262e565b610ba7576040516333d1c03960e21b815260040160405180910390fd5b506000908152600760205260409020546001600160a01b031690565b6000610bce82611404565b9050336001600160a01b03821614610c0757610bea81336118e9565b610c07576040516367d9dca160e11b815260040160405180910390fd5b60008281526007602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000610c6e82612656565b9050836001600160a01b0316816001600160a01b031614610ca15760405162a1148160e81b815260040160405180910390fd5b60008281526007602052604090208054338082146001600160a01b03881690911417610cee57610cd186336118e9565b610cee57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516610d1557604051633a954ecd60e21b815260040160405180910390fd5b8015610d2057600082555b6001600160a01b038681166000908152600660205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260056020526040812091909155600160e11b84169003610db257600184016000818152600560205260408120549003610db0576001548114610db05760008181526005602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b610e03613391565b50604080518082019091527332bd27bf11c971ad9536b34fd02a19fc3d93e52781527341538872240ef02d6ed9ac45cf4ff864349d51ed602082015290565b60004711610e8d5760405162461bcd60e51b81526020600482015260136024820152724e6f7468696e6720746f20776974686472617760681b60448201526064015b60405180910390fd5b476000610e9b600283613962565b9050610ebb7341538872240ef02d6ed9ac45cf4ff864349d51ed826126c4565b610ee27332bd27bf11c971ad9536b34fd02a19fc3d93e527610edd83856138e6565b6126c4565b5050565b610eee6127dd565b600a54610100900460ff1615610f395760405162461bcd60e51b815260206004820152601060248201526f21b7b73a3930b1ba1039b2b0b632b21760811b6044820152606401610e84565b600a805461ff001981166101009182900460ff1615909102179055565b610f718383836040518060200160405280600081525061157f565b505050565b6060600080610f848461140f565b905060008167ffffffffffffffff811115610fa157610fa16135b6565b604051908082528060200260200182016040528015610fca578160200160208202803683370190505b5090506000805b8381108015610fe557506002546001540382105b15611063576000610ff58361262e565b611000576000611009565b61100983611404565b9050876001600160a01b0316816001600160a01b0316036110505782848381518110611037576110376138ba565b60209081029190910101528161104c816138f9565b9250505b8261105a816138f9565b93505050610fd1565b9196919550909350505050565b600080604051806101a001604052808460200151605c811115611095576110956138a4565b605c8111156110a6576110a66138a4565b81526020018460400151605c8111156110c1576110c16138a4565b605c8111156110d2576110d26138a4565b81526020018460600151605c8111156110ed576110ed6138a4565b605c8111156110fe576110fe6138a4565b81526020018460800151605c811115611119576111196138a4565b605c81111561112a5761112a6138a4565b81526020018460a00151605c811115611145576111456138a4565b605c811115611156576111566138a4565b81526020018460c00151605c811115611171576111716138a4565b605c811115611182576111826138a4565b81526020018460e00151605c81111561119d5761119d6138a4565b605c8111156111ae576111ae6138a4565b8152602001846101000151605c8111156111ca576111ca6138a4565b605c8111156111db576111db6138a4565b8152602001846101200151605c8111156111f7576111f76138a4565b605c811115611208576112086138a4565b8152602001846101400151605c811115611224576112246138a4565b605c811115611235576112356138a4565b8152602001846101600151605c811115611251576112516138a4565b605c811115611262576112626138a4565b8152602001846101800151605c81111561127e5761127e6138a4565b605c81111561128f5761128f6138a4565b8152602001846101a00151605c8111156112ab576112ab6138a4565b605c8111156112bc576112bc6138a4565b9052905060005b600d8110156113195760008282600d81106112e0576112e06138ba565b6020020151605c8111156112f6576112f66138a4565b146113095782611305816138f9565b9350505b611312816138f9565b90506112c3565b508161132481613976565b949350505050565b600061077b8261262e565b61133f6127dd565b600a54610100900460ff161561138a5760405162461bcd60e51b815260206004820152601060248201526f21b7b73a3930b1ba1039b2b0b632b21760811b6044820152606401610e84565b600a805462010000600160b01b031916620100006001600160a01b038416908102919091179091556040519081527f869c6ebc45b752b03abf2550b2114eed8d11ba3a40ea9da00d3ef99fd004af729060200160405180910390a150565b6113f06127dd565b600a805460ff19811660ff90911615179055565b600061077b82612656565b60006001600160a01b038216611438576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526006602052604090205467ffffffffffffffff1690565b6114666127dd565b6114706000612837565b565b610ee28282612887565b606060048054610afc90613912565b600a5460405163c87b56dd60e01b815261ffff831660048201526060916201000090046001600160a01b03169063c87b56dd90602401600060405180830381865afa1580156114de573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261077b919081019061398d565b6115103382612887565b50565b3360008181526008602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b61158a848484610c63565b6001600160a01b0383163b156115c3576115a684848484612a62565b6115c3576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b600981815481106115d957600080fd5b600091825260209091200154905081565b60606000604051602001611621907f41736369692050756e6b202331303030302028426167756574746529000000008152601c0190565b60408051601f1981840301815290829052664f7569204f756960c81b6020830152915060009060270160405160208183030381529060405290506117018282600a60029054906101000a90046001600160a01b03166001600160a01b031663bd089f426040518163ffffffff1660e01b8152600401600060405180830381865afa1580156116b3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526116db919081019061398d565b6040516020016116ed93929190613a04565b604051602081830303815290604052612b4d565b6040516020016117119190613af1565b6040516020818303038152906040529250505090565b60606009805480602002602001604051908101604052809291908181526020018280548015610b7557602002820191906000526020600020905b815481526020019060010190808311611761575050505050905090565b60606117898261262e565b6117cc5760405162461bcd60e51b8152602060048201526014602482015273151bdad95b88191bd95cc81b9bdd08195e1a5cdd60621b6044820152606401610e84565b81612710036117dd5761077b6115ea565b61077b825b606060006117f38361ffff16612b5b565b6040516020016118039190613b36565b60408051601f1981840301815260c0830190915260928083529092506118c2918391613df86020830139600a5460405163c87b56dd60e01b815261ffff88166004820152620100009091046001600160a01b03169063c87b56dd90602401600060405180830381865afa15801561187e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526118a6919081019061398d565b6118af87610781565b6040516020016116ed9493929190613b6a565b6040516020016118d29190613af1565b604051602081830303815290604052915050919050565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205460ff1690565b61191f6127dd565b6001600160a01b0381166119845760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610e84565b61151081612837565b6119ff604080516101c0810190915260008082526020820190815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000905290565b604080516101c0810190915261ffff831681526000906020810182815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000905261ffff84168082526040516376dfe29760e01b815260048101919091529091506000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906376dfe29790602401600060405180830381865afa158015611ae4573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611b0c919081019061398d565b90506000611b3c604051806040016040528060018152602001600b60fa1b81525083612c5c90919063ffffffff16565b905060005b815181101561200f576000828281518110611b5e57611b5e6138ba565b6020026020010151905060606001831015611bb7576040805180820190915260018152600160fd1b6020820152611b96908390612c5c565b600081518110611ba857611ba86138ba565b60200260200101519050611bd4565b611bd160018351611bc891906138e6565b83906001612e49565b90505b604051631a2d891b60e31b81526000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063d16c48d890611c23908590600401613464565b602060405180830381865afa158015611c40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c649190613c47565b605c811115611c7557611c756138a4565b605c811115611c8657611c866138a4565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663683375c483605c811115611ccb57611ccb6138a4565b605c811115611cdc57611cdc6138a4565b6040518263ffffffff1660e01b8152600401611cf89190613c64565b602060405180830381865afa158015611d15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d399190613c8c565b600c811115611d4a57611d4a6138a4565b600c811115611d5b57611d5b6138a4565b9050600081600c811115611d7157611d716138a4565b03611da7576020880182605c811115611d8c57611d8c6138a4565b9081605c811115611d9f57611d9f6138a4565b905250611ff8565b600181600c811115611dbb57611dbb6138a4565b03611dd6576040880182605c811115611d8c57611d8c6138a4565b600281600c811115611dea57611dea6138a4565b03611e05576060880182605c811115611d8c57611d8c6138a4565b600381600c811115611e1957611e196138a4565b03611e34576080880182605c811115611d8c57611d8c6138a4565b600481600c811115611e4857611e486138a4565b03611e635760a0880182605c811115611d8c57611d8c6138a4565b600581600c811115611e7757611e776138a4565b03611e925760c0880182605c811115611d8c57611d8c6138a4565b600681600c811115611ea657611ea66138a4565b03611ec15760e0880182605c811115611d8c57611d8c6138a4565b600781600c811115611ed557611ed56138a4565b03611ef157610100880182605c811115611d8c57611d8c6138a4565b600881600c811115611f0557611f056138a4565b03611f2157610120880182605c811115611d8c57611d8c6138a4565b600981600c811115611f3557611f356138a4565b03611f5157610140880182605c811115611d8c57611d8c6138a4565b600a81600c811115611f6557611f656138a4565b03611f8157610160880182605c811115611d8c57611d8c6138a4565b600b81600c811115611f9557611f956138a4565b03611fb157610180880182605c811115611d8c57611d8c6138a4565b600c81600c811115611fc557611fc56138a4565b03611ff8576101a0880182605c811115611fe157611fe16138a4565b9081605c811115611ff457611ff46138a4565b9052505b505050508080612007906138f9565b915050611b41565b5091949350505050565b6060600082605c81111561202f5761202f6138a4565b0361203957600080fd5b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663fc9faca584605c81111561207c5761207c6138a4565b605c81111561208d5761208d6138a4565b6040518263ffffffff1660e01b81526004016120a99190613c64565b600060405180830381865afa1580156120c6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526120ee919081019061398d565b9050606060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663683375c486605c811115612135576121356138a4565b605c811115612146576121466138a4565b6040518263ffffffff1660e01b81526004016121629190613c64565b602060405180830381865afa15801561217f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121a39190613c8c565b600c8111156121b4576121b46138a4565b600c8111156121c5576121c56138a4565b9050600081600c8111156121db576121db6138a4565b0361220357604051806040016040528060038152602001620a6caf60eb1b8152509150612542565b600181600c811115612217576122176138a4565b0361229f5760408051808201909152600f81526e2bb4b632102bb434ba32902430b4b960891b602082015261224c8482612f3a565b1561227a576040518060400160405280600d81526020016c46656d616c6520486f6f64696560981b81525093505b604051806040016040528060048152602001632430b4b960e11b815250925050612542565b600281600c8111156122b3576122b36138a4565b036122dc57604051806040016040528060048152602001634579657360e01b8152509150612542565b600381600c8111156122f0576122f06138a4565b0361231a57604051806040016040528060058152602001641099585c9960da1b8152509150612542565b600481600c81111561232e5761232e6138a4565b0361235757604051806040016040528060048152602001634561727360e01b8152509150612542565b600581600c81111561236b5761236b6138a4565b0361239457604051806040016040528060048152602001634c69707360e01b8152509150612542565b600681600c8111156123a8576123a86138a4565b036123d2576040518060400160405280600581526020016409adeeae8d60db1b8152509150612542565b600781600c8111156123e6576123e66138a4565b0361240f57604051806040016040528060048152602001634661636560e01b8152509150612542565b600881600c811115612423576124236138a4565b0361244f576040518060400160405280600781526020016622b6b7ba34b7b760c91b8152509150612542565b600981600c811115612463576124636138a4565b0361248c57604051806040016040528060048152602001634e65636b60e01b8152509150612542565b600a81600c8111156124a0576124a06138a4565b036124c957604051806040016040528060048152602001634e6f736560e01b8152509150612542565b600b81600c8111156124dd576124dd6138a4565b036125085760405180604001604052806006815260200165436865656b7360d01b8152509150612542565b600c81600c81111561251c5761251c6138a4565b0361254257604051806040016040528060058152602001640a8cacae8d60db1b81525091505b8183604051602001612555929190613cad565b6040516020818303038152906040529350505050919050565b805115610ee257601f1982518051808451016605c284b9def77984840151818106158282040290508083106125fe5785602084831701820116816040018601604051146125ec57602060405101816040018101604052808a528760208701165b87810151828201528801806125ce57509083028188015294506125fe565b80604001860160405280830287870152505b505084519183019160200184165b858101518382015284018061260c575060008382016020015290915250505050565b60006001548210801561077b575050600090815260056020526040902054600160e01b161590565b6000816001548110156126ab5760008181526005602052604081205490600160e01b821690036126a9575b806000036126a2575060001901600081815260056020526040902054612681565b9392505050565b505b604051636f96cda160e11b815260040160405180910390fd5b804710156127145760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610e84565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612761576040519150601f19603f3d011682016040523d82523d6000602084013e612766565b606091505b5050905080610f715760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610e84565b6000546001600160a01b031633146114705760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e84565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b337332bd27bf11c971ad9536b34fd02a19fc3d93e527148015906128bf5750337341538872240ef02d6ed9ac45cf4ff864349d51ed14155b156129b357600b811061290b5760405162461bcd60e51b815260206004820152601460248201527306d617820746f6b656e73207065722074782031360641b6044820152606401610e84565b600a5460ff166129525760405162461bcd60e51b81526020600482015260126024820152714d696e74206973206e6f742061637469766560701b6044820152606401610e84565b60098181548110612965576129656138ba565b906000526020600020015434146129b35760405162461bcd60e51b81526020600482015260126024820152711399595908195e1858dd081c185e5b595b9d60721b6044820152606401610e84565b6127116129c36002546001540390565b6129cd9083613d1f565b1115612a135760405162461bcd60e51b815260206004820152601560248201527429bab838363c903634b6b4ba103932b0b1b432b21760591b6044820152606401610e84565b323314612a585760405162461bcd60e51b81526020600482015260136024820152726e6f20636f6e7472616374206d696e7465727360681b6044820152606401610e84565b610ee28282613036565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290612a97903390899088908890600401613d32565b6020604051808303816000875af1925050508015612ad2575060408051601f3d908101601f19168201909252612acf91810190613d6f565b60015b612b30573d808015612b00576040519150601f19603f3d011682016040523d82523d6000602084013e612b05565b606091505b508051600003612b28576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b606061077b82600080613050565b606081600003612b825750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612bac5780612b96816138f9565b9150612ba59050600a83613962565b9150612b86565b60008167ffffffffffffffff811115612bc757612bc76135b6565b6040519080825280601f01601f191660200182016040528015612bf1576020820181803683370190505b5090505b841561132457612c066001836138e6565b9150612c13600a86613d8c565b612c1e906030613d1f565b60f81b818381518110612c3357612c336138ba565b60200101906001600160f81b031916908160001a905350612c55600a86613962565b9450612bf5565b606082600060015b60018351612c7291906138e6565b821015612cb5576000612c8687878561313c565b90508019612c945750612cb5565b81612c9e816138f9565b9250612cad9050816001613d1f565b925050612c64565b8067ffffffffffffffff811115612cce57612cce6135b6565b604051908082528060200260200182016040528015612d0157816020015b6060815260200190600190039081612cec5790505b50935060009150600090505b60018351612d1b91906138e6565b821015612e40576000612d2f87878561313c565b90508019612d3b575082515b6000612d4784836138e6565b67ffffffffffffffff811115612d5f57612d5f6135b6565b6040519080825280601f01601f191660200182016040528015612d89576020820181803683370190505b509050806000855b84811015612e0057878181518110612dab57612dab6138ba565b01602001516001600160f81b0319168383612dc5816138f9565b945081518110612dd757612dd76138ba565b60200101906001600160f81b031916908160001a90535080612df8816138f9565b915050612d91565b50612e0c846001613d1f565b9550818886612e1a816138f9565b975081518110612e2c57612e2c6138ba565b602002602001018190525050505050612d0d565b50505092915050565b82516060908490612e5a8585613da0565b1115612e6857612e68613dc8565b60008467ffffffffffffffff811115612e8357612e836135b6565b6040519080825280601f01601f191660200182016040528015612ead576020820181803683370190505b509050806000855b612ebf8888613da0565b811015612f2d57848181518110612ed857612ed86138ba565b01602001516001600160f81b0319168383612ef2816138f9565b945081518110612f0457612f046138ba565b60200101906001600160f81b031916908160001a90535080612f25816138f9565b915050612eb5565b5090979650505050505050565b805182516000918491849114612f555760009250505061077b565b60005b825181101561302a57818181518110612f7357612f736138ba565b602001015160f81c60f81b6001600160f81b031916838281518110612f9a57612f9a6138ba565b01602001516001600160f81b031916148015906130075750612fdb828281518110612fc757612fc76138ba565b01602001516001600160f81b0319166131d7565b6001600160f81b031916612ffa848381518110612fc757612fc76138ba565b6001600160f81b03191614155b15613018576000935050505061077b565b80613022816138f9565b915050612f58565b50600195945050505050565b610ee2828260405180602001604052806000815250613226565b606083518015613134576003600282010460021b60405192507f4142434445464748494a4b4c4d4e4f505152535455565758595a616263646566601f526102308515027f6768696a6b6c6d6e6f707172737475767778797a303132333435363738392d5f03603f52602083018181015b6003880197508751603f8160121c1651600053603f81600c1c1651600153603f8160061c1651600253603f8116516003535060005182526004820191508082106130c057601f01601f1916604052613d3d60f01b600384066002048083039190915260008615159091029182900352900382525b509392505050565b81516000908490849060011461315457613154613dc8565b835b82518110156131c95781600081518110613172576131726138ba565b602001015160f81c60f81b6001600160f81b031916838281518110613199576131996138ba565b01602001516001600160f81b031916036131b75792506126a2915050565b806131c1816138f9565b915050613156565b506000199695505050505050565b6000606160f81b6001600160f81b03198316108015906132055750603d60f91b6001600160f81b0319831611155b1561322257613219602060f884901c613dde565b60f81b92915050565b5090565b6132308383613293565b6001600160a01b0383163b15610f71576001548281035b61325a6000868380600101945086612a62565b613277576040516368d2bf6b60e11b815260040160405180910390fd5b81811061324757816001541461328c57600080fd5b5050505050565b60015460008290036132b85760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526006602090815260408083208054680100000000000000018802019055848352600590915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b81811461336757808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a460010161332f565b508160000361338857604051622e076360e81b815260040160405180910390fd5b60015550505050565b60405180604001604052806002906020820280368337509192915050565b6001600160e01b03198116811461151057600080fd5b6000602082840312156133d757600080fd5b81356126a2816133af565b803561ffff811681146133f457600080fd5b919050565b60006020828403121561340b57600080fd5b6126a2826133e2565b60005b8381101561342f578181015183820152602001613417565b50506000910152565b60008151808452613450816020860160208601613414565b601f01601f19169290920160200192915050565b6020815260006126a26020830184613438565b60006020828403121561348957600080fd5b5035919050565b80356001600160a01b03811681146133f457600080fd5b600080604083850312156134ba57600080fd5b6134c383613490565b946020939093013593505050565b6000806000606084860312156134e657600080fd5b6134ef84613490565b92506134fd60208501613490565b9150604084013590509250925092565b60408101818360005b6002811015612e405781516001600160a01b0316835260209283019290910190600101613516565b60006020828403121561355057600080fd5b6126a282613490565b600081518084526020808501945080840160005b838110156135895781518752958201959082019060010161356d565b509495945050505050565b6040815260006135a76040830185613559565b90508260208301529392505050565b634e487b7160e01b600052604160045260246000fd5b6040516101c0810167ffffffffffffffff811182821017156135f0576135f06135b6565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561361f5761361f6135b6565b604052919050565b605d811061151057600080fd5b80356133f481613627565b60006101c0828403121561365257600080fd5b61365a6135cc565b613663836133e2565b815261367160208401613634565b602082015261368260408401613634565b604082015261369360608401613634565b60608201526136a460808401613634565b60808201526136b560a08401613634565b60a08201526136c660c08401613634565b60c08201526136d760e08401613634565b60e08201526101006136ea818501613634565b908201526101206136fc848201613634565b9082015261014061370e848201613634565b90820152610160613720848201613634565b90820152610180613732848201613634565b908201526101a0613744848201613634565b908201529392505050565b6000806040838503121561376257600080fd5b61376b83613490565b91506020830135801515811461378057600080fd5b809150509250929050565b600067ffffffffffffffff8211156137a5576137a56135b6565b50601f01601f191660200190565b600080600080608085870312156137c957600080fd5b6137d285613490565b93506137e060208601613490565b925060408501359150606085013567ffffffffffffffff81111561380357600080fd5b8501601f8101871361381457600080fd5b80356138276138228261378b565b6135f6565b81815288602083850101111561383c57600080fd5b8160208401602083013760006020838301015280935050505092959194509250565b6020815260006126a26020830184613559565b6000806040838503121561388457600080fd5b61388d83613490565b915061389b60208401613490565b90509250929050565b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561077b5761077b6138d0565b60006001820161390b5761390b6138d0565b5060010190565b600181811c9082168061392657607f821691505b60208210810361394657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601260045260246000fd5b6000826139715761397161394c565b500490565b600081613985576139856138d0565b506000190190565b60006020828403121561399f57600080fd5b815167ffffffffffffffff8111156139b657600080fd5b8201601f810184136139c757600080fd5b80516139d56138228261378b565b8181528560208385010111156139ea57600080fd5b6139fb826020830160208601613414565b95945050505050565b607b60f81b815267113730b6b2911d1160c11b60018201528351600090613a32816009850160208901613414565b701116113232b9b1b934b83a34b7b7111d1160791b6009918401918201528451613a6381601a840160208901613414565b6f11161134b6b0b3b2afb230ba30911d1160811b601a92909101918201528351613a9481602a840160208801613414565b7f222c2261747472696275746573223a205b7b2274726169745f74797065223a22602a92909101918201527f312f31222c2276616c7565223a224261677565747465227d5d7d000000000000604a82015260640195945050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000815260008251613b2981601d850160208701613414565b91909101601d0192915050565b6b41736369692050756e6b202360a01b815260008251613b5d81600c850160208701613414565b91909101600c0192915050565b607b60f81b815267113730b6b2911d1160c11b60018201528451600090613b98816009850160208a01613414565b701116113232b9b1b934b83a34b7b7111d1160791b6009918401918201528551613bc981601a840160208a01613414565b6f11161134b6b0b3b2afb230ba30911d1160811b601a92909101918201528451613bfa81602a840160208901613414565b6f011161130ba3a3934b13aba32b9911d160851b602a92909101918201528351613c2b81603a840160208801613414565b607d60f81b603a9290910191820152603b019695505050505050565b600060208284031215613c5957600080fd5b81516126a281613627565b60208101605d8310613c8657634e487b7160e01b600052602160045260246000fd5b91905290565b600060208284031215613c9e57600080fd5b8151600d81106126a257600080fd5b6e3d913a3930b4ba2fba3cb832911d1160891b81528251600090613cd881600f850160208801613414565b6b111610113b30b63ab2911d1160a11b600f918401918201528351613d0481601b840160208801613414565b61227d60f01b601b9290910191820152601d01949350505050565b8082018082111561077b5761077b6138d0565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613d6590830184613438565b9695505050505050565b600060208284031215613d8157600080fd5b81516126a2816133af565b600082613d9b57613d9b61394c565b500690565b8082018281126000831280158216821582161715613dc057613dc06138d0565b505092915050565b634e487b7160e01b600052600160045260246000fd5b60ff828116828216039081111561077b5761077b6138d056fe41736369692050756e6b7320697320612067656e6572617469766520686f6d61676520746f20746865206f726967696e616c2043727970746f50756e6b732e20456163682041736369692050756e6b2773207472616974732061726520726574726965766564206f6e2d636861696e2066726f6d207468652043727970746f50756e6b734461746120636f6e74726163742ea2646970667358221220d451534f415e868eae0aaf34273a0bd201958de7f74029aec62b2a9d6596a5b464736f6c63430008110033ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef00000000000000000000000016f5a35647d6f03d5d3da7b35409d65ba03af3b2000000000000000000000000f03e345bb89dc9cfaf8fda381a9e4417bfb46e7a0000000000000000000000006a0000d6d3fc96235e14b6523474ee63ff9933d8
Deployed Bytecode
0x6080604052600436106102465760003560e01c80636352211e11610139578063b6501637116100b6578063c077da9e1161007a578063c077da9e14610681578063c87b56dd14610699578063d5abeb01146106b9578063e3da42b0146106cf578063e985e9c5146106ef578063f2fde38b1461070f57600080fd5b8063b6501637146105f8578063b88d4fde14610617578063bc31c1c11461062a578063bd089f421461064a578063bd9a548b1461065f57600080fd5b80638da5cb5b116100fd5780638da5cb5b1461057257806395d89b41146105905780639896ed11146105a5578063a0712d68146105c5578063a22cb465146105d857600080fd5b80636352211e146104e457806370a0823114610504578063715018a614610524578063788263a2146105395780638ba4cc3c1461055f57600080fd5b80633ba523c7116101c75780634f02f4d21161018b5780634f02f4d2146104555780634f558e791461047557806356d3163d1461049557806359c74f29146104b55780635b92ac0d146104ca57600080fd5b80633ba523c7146103cf5780633ccfd60b146103ea5780633fb27b85146103ff57806342842e0e14610414578063438b63001461042757600080fd5b80630f5a9f891161020e5780630f5a9f891461030f578063137fee321461034357806318160ddd1461037757806323b872dd1461039a5780632f2fc416146103ad57600080fd5b806301ffc9a71461024b578063023abe2b1461028057806306fdde03146102ad578063081812fc146102c2578063095ea7b3146102fa575b600080fd5b34801561025757600080fd5b5061026b6102663660046133c5565b61072f565b60405190151581526020015b60405180910390f35b34801561028c57600080fd5b506102a061029b3660046133f9565b610781565b6040516102779190613464565b3480156102b957600080fd5b506102a0610aed565b3480156102ce57600080fd5b506102e26102dd366004613477565b610b7f565b6040516001600160a01b039091168152602001610277565b61030d6103083660046134a7565b610bc3565b005b34801561031b57600080fd5b506102e27f00000000000000000000000016f5a35647d6f03d5d3da7b35409d65ba03af3b281565b34801561034f57600080fd5b506102e27f000000000000000000000000f03e345bb89dc9cfaf8fda381a9e4417bfb46e7a81565b34801561038357600080fd5b50600254600154035b604051908152602001610277565b61030d6103a83660046134d1565b610c63565b3480156103b957600080fd5b506103c2610dfb565b604051610277919061350d565b3480156103db57600080fd5b5061038c6611c37937e0800081565b3480156103f657600080fd5b5061030d610e42565b34801561040b57600080fd5b5061030d610ee6565b61030d6104223660046134d1565b610f56565b34801561043357600080fd5b5061044761044236600461353e565b610f76565b604051610277929190613594565b34801561046157600080fd5b5061038c61047036600461363f565b611070565b34801561048157600080fd5b5061026b610490366004613477565b61132c565b3480156104a157600080fd5b5061030d6104b036600461353e565b611337565b3480156104c157600080fd5b5061030d6113e8565b3480156104d657600080fd5b50600a5461026b9060ff1681565b3480156104f057600080fd5b506102e26104ff366004613477565b611404565b34801561051057600080fd5b5061038c61051f36600461353e565b61140f565b34801561053057600080fd5b5061030d61145e565b34801561054557600080fd5b50600a546102e2906201000090046001600160a01b031681565b61030d61056d3660046134a7565b611472565b34801561057e57600080fd5b506000546001600160a01b03166102e2565b34801561059c57600080fd5b506102a061147c565b3480156105b157600080fd5b506102a06105c03660046133f9565b61148b565b61030d6105d3366004613477565b611506565b3480156105e457600080fd5b5061030d6105f336600461374f565b611513565b34801561060457600080fd5b50600a5461026b90610100900460ff1681565b61030d6106253660046137b3565b61157f565b34801561063657600080fd5b5061038c610645366004613477565b6115c9565b34801561065657600080fd5b506102a06115ea565b34801561066b57600080fd5b50610674611727565b604051610277919061385e565b34801561068d57600080fd5b50600a5460ff1661026b565b3480156106a557600080fd5b506102a06106b4366004613477565b61177e565b3480156106c557600080fd5b5061038c61271181565b3480156106db57600080fd5b506102a06106ea3660046133f9565b6117e2565b3480156106fb57600080fd5b5061026b61070a366004613871565b6118e9565b34801561071b57600080fd5b5061030d61072a36600461353e565b611917565b60006301ffc9a760e01b6001600160e01b03198316148061076057506380ac58cd60e01b6001600160e01b03198316145b8061077b5750635b5e139f60e01b6001600160e01b03198316145b92915050565b6060600061078e8361198d565b6040805160608101825260016020808301918252605b60f81b8385015290825282516101a08101909352830151929350600092909183918190605c8111156107d8576107d86138a4565b605c8111156107e9576107e96138a4565b81526020018560400151605c811115610804576108046138a4565b605c811115610815576108156138a4565b81526020018560600151605c811115610830576108306138a4565b605c811115610841576108416138a4565b81526020018560800151605c81111561085c5761085c6138a4565b605c81111561086d5761086d6138a4565b81526020018560a00151605c811115610888576108886138a4565b605c811115610899576108996138a4565b81526020018560c00151605c8111156108b4576108b46138a4565b605c8111156108c5576108c56138a4565b81526020018560e00151605c8111156108e0576108e06138a4565b605c8111156108f1576108f16138a4565b8152602001856101000151605c81111561090d5761090d6138a4565b605c81111561091e5761091e6138a4565b8152602001856101200151605c81111561093a5761093a6138a4565b605c81111561094b5761094b6138a4565b8152602001856101400151605c811115610967576109676138a4565b605c811115610978576109786138a4565b8152602001856101600151605c811115610994576109946138a4565b605c8111156109a5576109a56138a4565b8152602001856101800151605c8111156109c1576109c16138a4565b605c8111156109d2576109d26138a4565b8152602001856101a00151605c8111156109ee576109ee6138a4565b605c8111156109ff576109ff6138a4565b905290506000610a0e85611070565b905060005b600d811015610ae05760008382600d8110610a3057610a306138ba565b6020020151905085605c811115610a4957610a496138a4565b81605c811115610a5b57610a5b6138a4565b14610acf57610a73610a6c82612019565b869061256e565b610a7e6001846138e6565b8214610aac576040805180820190915260018152600b60fa1b6020820152610aa790869061256e565b610acf565b6040805180820190915260018152605d60f81b6020820152610acf90869061256e565b50610ad9816138f9565b9050610a13565b5050905195945050505050565b606060038054610afc90613912565b80601f0160208091040260200160405190810160405280929190818152602001828054610b2890613912565b8015610b755780601f10610b4a57610100808354040283529160200191610b75565b820191906000526020600020905b815481529060010190602001808311610b5857829003601f168201915b5050505050905090565b6000610b8a8261262e565b610ba7576040516333d1c03960e21b815260040160405180910390fd5b506000908152600760205260409020546001600160a01b031690565b6000610bce82611404565b9050336001600160a01b03821614610c0757610bea81336118e9565b610c07576040516367d9dca160e11b815260040160405180910390fd5b60008281526007602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000610c6e82612656565b9050836001600160a01b0316816001600160a01b031614610ca15760405162a1148160e81b815260040160405180910390fd5b60008281526007602052604090208054338082146001600160a01b03881690911417610cee57610cd186336118e9565b610cee57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516610d1557604051633a954ecd60e21b815260040160405180910390fd5b8015610d2057600082555b6001600160a01b038681166000908152600660205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260056020526040812091909155600160e11b84169003610db257600184016000818152600560205260408120549003610db0576001548114610db05760008181526005602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b610e03613391565b50604080518082019091527332bd27bf11c971ad9536b34fd02a19fc3d93e52781527341538872240ef02d6ed9ac45cf4ff864349d51ed602082015290565b60004711610e8d5760405162461bcd60e51b81526020600482015260136024820152724e6f7468696e6720746f20776974686472617760681b60448201526064015b60405180910390fd5b476000610e9b600283613962565b9050610ebb7341538872240ef02d6ed9ac45cf4ff864349d51ed826126c4565b610ee27332bd27bf11c971ad9536b34fd02a19fc3d93e527610edd83856138e6565b6126c4565b5050565b610eee6127dd565b600a54610100900460ff1615610f395760405162461bcd60e51b815260206004820152601060248201526f21b7b73a3930b1ba1039b2b0b632b21760811b6044820152606401610e84565b600a805461ff001981166101009182900460ff1615909102179055565b610f718383836040518060200160405280600081525061157f565b505050565b6060600080610f848461140f565b905060008167ffffffffffffffff811115610fa157610fa16135b6565b604051908082528060200260200182016040528015610fca578160200160208202803683370190505b5090506000805b8381108015610fe557506002546001540382105b15611063576000610ff58361262e565b611000576000611009565b61100983611404565b9050876001600160a01b0316816001600160a01b0316036110505782848381518110611037576110376138ba565b60209081029190910101528161104c816138f9565b9250505b8261105a816138f9565b93505050610fd1565b9196919550909350505050565b600080604051806101a001604052808460200151605c811115611095576110956138a4565b605c8111156110a6576110a66138a4565b81526020018460400151605c8111156110c1576110c16138a4565b605c8111156110d2576110d26138a4565b81526020018460600151605c8111156110ed576110ed6138a4565b605c8111156110fe576110fe6138a4565b81526020018460800151605c811115611119576111196138a4565b605c81111561112a5761112a6138a4565b81526020018460a00151605c811115611145576111456138a4565b605c811115611156576111566138a4565b81526020018460c00151605c811115611171576111716138a4565b605c811115611182576111826138a4565b81526020018460e00151605c81111561119d5761119d6138a4565b605c8111156111ae576111ae6138a4565b8152602001846101000151605c8111156111ca576111ca6138a4565b605c8111156111db576111db6138a4565b8152602001846101200151605c8111156111f7576111f76138a4565b605c811115611208576112086138a4565b8152602001846101400151605c811115611224576112246138a4565b605c811115611235576112356138a4565b8152602001846101600151605c811115611251576112516138a4565b605c811115611262576112626138a4565b8152602001846101800151605c81111561127e5761127e6138a4565b605c81111561128f5761128f6138a4565b8152602001846101a00151605c8111156112ab576112ab6138a4565b605c8111156112bc576112bc6138a4565b9052905060005b600d8110156113195760008282600d81106112e0576112e06138ba565b6020020151605c8111156112f6576112f66138a4565b146113095782611305816138f9565b9350505b611312816138f9565b90506112c3565b508161132481613976565b949350505050565b600061077b8261262e565b61133f6127dd565b600a54610100900460ff161561138a5760405162461bcd60e51b815260206004820152601060248201526f21b7b73a3930b1ba1039b2b0b632b21760811b6044820152606401610e84565b600a805462010000600160b01b031916620100006001600160a01b038416908102919091179091556040519081527f869c6ebc45b752b03abf2550b2114eed8d11ba3a40ea9da00d3ef99fd004af729060200160405180910390a150565b6113f06127dd565b600a805460ff19811660ff90911615179055565b600061077b82612656565b60006001600160a01b038216611438576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526006602052604090205467ffffffffffffffff1690565b6114666127dd565b6114706000612837565b565b610ee28282612887565b606060048054610afc90613912565b600a5460405163c87b56dd60e01b815261ffff831660048201526060916201000090046001600160a01b03169063c87b56dd90602401600060405180830381865afa1580156114de573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261077b919081019061398d565b6115103382612887565b50565b3360008181526008602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b61158a848484610c63565b6001600160a01b0383163b156115c3576115a684848484612a62565b6115c3576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b600981815481106115d957600080fd5b600091825260209091200154905081565b60606000604051602001611621907f41736369692050756e6b202331303030302028426167756574746529000000008152601c0190565b60408051601f1981840301815290829052664f7569204f756960c81b6020830152915060009060270160405160208183030381529060405290506117018282600a60029054906101000a90046001600160a01b03166001600160a01b031663bd089f426040518163ffffffff1660e01b8152600401600060405180830381865afa1580156116b3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526116db919081019061398d565b6040516020016116ed93929190613a04565b604051602081830303815290604052612b4d565b6040516020016117119190613af1565b6040516020818303038152906040529250505090565b60606009805480602002602001604051908101604052809291908181526020018280548015610b7557602002820191906000526020600020905b815481526020019060010190808311611761575050505050905090565b60606117898261262e565b6117cc5760405162461bcd60e51b8152602060048201526014602482015273151bdad95b88191bd95cc81b9bdd08195e1a5cdd60621b6044820152606401610e84565b81612710036117dd5761077b6115ea565b61077b825b606060006117f38361ffff16612b5b565b6040516020016118039190613b36565b60408051601f1981840301815260c0830190915260928083529092506118c2918391613df86020830139600a5460405163c87b56dd60e01b815261ffff88166004820152620100009091046001600160a01b03169063c87b56dd90602401600060405180830381865afa15801561187e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526118a6919081019061398d565b6118af87610781565b6040516020016116ed9493929190613b6a565b6040516020016118d29190613af1565b604051602081830303815290604052915050919050565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205460ff1690565b61191f6127dd565b6001600160a01b0381166119845760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610e84565b61151081612837565b6119ff604080516101c0810190915260008082526020820190815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000905290565b604080516101c0810190915261ffff831681526000906020810182815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000905261ffff84168082526040516376dfe29760e01b815260048101919091529091506000907f00000000000000000000000016f5a35647d6f03d5d3da7b35409d65ba03af3b26001600160a01b0316906376dfe29790602401600060405180830381865afa158015611ae4573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611b0c919081019061398d565b90506000611b3c604051806040016040528060018152602001600b60fa1b81525083612c5c90919063ffffffff16565b905060005b815181101561200f576000828281518110611b5e57611b5e6138ba565b6020026020010151905060606001831015611bb7576040805180820190915260018152600160fd1b6020820152611b96908390612c5c565b600081518110611ba857611ba86138ba565b60200260200101519050611bd4565b611bd160018351611bc891906138e6565b83906001612e49565b90505b604051631a2d891b60e31b81526000906001600160a01b037f000000000000000000000000f03e345bb89dc9cfaf8fda381a9e4417bfb46e7a169063d16c48d890611c23908590600401613464565b602060405180830381865afa158015611c40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c649190613c47565b605c811115611c7557611c756138a4565b605c811115611c8657611c866138a4565b905060007f000000000000000000000000f03e345bb89dc9cfaf8fda381a9e4417bfb46e7a6001600160a01b031663683375c483605c811115611ccb57611ccb6138a4565b605c811115611cdc57611cdc6138a4565b6040518263ffffffff1660e01b8152600401611cf89190613c64565b602060405180830381865afa158015611d15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d399190613c8c565b600c811115611d4a57611d4a6138a4565b600c811115611d5b57611d5b6138a4565b9050600081600c811115611d7157611d716138a4565b03611da7576020880182605c811115611d8c57611d8c6138a4565b9081605c811115611d9f57611d9f6138a4565b905250611ff8565b600181600c811115611dbb57611dbb6138a4565b03611dd6576040880182605c811115611d8c57611d8c6138a4565b600281600c811115611dea57611dea6138a4565b03611e05576060880182605c811115611d8c57611d8c6138a4565b600381600c811115611e1957611e196138a4565b03611e34576080880182605c811115611d8c57611d8c6138a4565b600481600c811115611e4857611e486138a4565b03611e635760a0880182605c811115611d8c57611d8c6138a4565b600581600c811115611e7757611e776138a4565b03611e925760c0880182605c811115611d8c57611d8c6138a4565b600681600c811115611ea657611ea66138a4565b03611ec15760e0880182605c811115611d8c57611d8c6138a4565b600781600c811115611ed557611ed56138a4565b03611ef157610100880182605c811115611d8c57611d8c6138a4565b600881600c811115611f0557611f056138a4565b03611f2157610120880182605c811115611d8c57611d8c6138a4565b600981600c811115611f3557611f356138a4565b03611f5157610140880182605c811115611d8c57611d8c6138a4565b600a81600c811115611f6557611f656138a4565b03611f8157610160880182605c811115611d8c57611d8c6138a4565b600b81600c811115611f9557611f956138a4565b03611fb157610180880182605c811115611d8c57611d8c6138a4565b600c81600c811115611fc557611fc56138a4565b03611ff8576101a0880182605c811115611fe157611fe16138a4565b9081605c811115611ff457611ff46138a4565b9052505b505050508080612007906138f9565b915050611b41565b5091949350505050565b6060600082605c81111561202f5761202f6138a4565b0361203957600080fd5b60007f000000000000000000000000f03e345bb89dc9cfaf8fda381a9e4417bfb46e7a6001600160a01b031663fc9faca584605c81111561207c5761207c6138a4565b605c81111561208d5761208d6138a4565b6040518263ffffffff1660e01b81526004016120a99190613c64565b600060405180830381865afa1580156120c6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526120ee919081019061398d565b9050606060007f000000000000000000000000f03e345bb89dc9cfaf8fda381a9e4417bfb46e7a6001600160a01b031663683375c486605c811115612135576121356138a4565b605c811115612146576121466138a4565b6040518263ffffffff1660e01b81526004016121629190613c64565b602060405180830381865afa15801561217f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121a39190613c8c565b600c8111156121b4576121b46138a4565b600c8111156121c5576121c56138a4565b9050600081600c8111156121db576121db6138a4565b0361220357604051806040016040528060038152602001620a6caf60eb1b8152509150612542565b600181600c811115612217576122176138a4565b0361229f5760408051808201909152600f81526e2bb4b632102bb434ba32902430b4b960891b602082015261224c8482612f3a565b1561227a576040518060400160405280600d81526020016c46656d616c6520486f6f64696560981b81525093505b604051806040016040528060048152602001632430b4b960e11b815250925050612542565b600281600c8111156122b3576122b36138a4565b036122dc57604051806040016040528060048152602001634579657360e01b8152509150612542565b600381600c8111156122f0576122f06138a4565b0361231a57604051806040016040528060058152602001641099585c9960da1b8152509150612542565b600481600c81111561232e5761232e6138a4565b0361235757604051806040016040528060048152602001634561727360e01b8152509150612542565b600581600c81111561236b5761236b6138a4565b0361239457604051806040016040528060048152602001634c69707360e01b8152509150612542565b600681600c8111156123a8576123a86138a4565b036123d2576040518060400160405280600581526020016409adeeae8d60db1b8152509150612542565b600781600c8111156123e6576123e66138a4565b0361240f57604051806040016040528060048152602001634661636560e01b8152509150612542565b600881600c811115612423576124236138a4565b0361244f576040518060400160405280600781526020016622b6b7ba34b7b760c91b8152509150612542565b600981600c811115612463576124636138a4565b0361248c57604051806040016040528060048152602001634e65636b60e01b8152509150612542565b600a81600c8111156124a0576124a06138a4565b036124c957604051806040016040528060048152602001634e6f736560e01b8152509150612542565b600b81600c8111156124dd576124dd6138a4565b036125085760405180604001604052806006815260200165436865656b7360d01b8152509150612542565b600c81600c81111561251c5761251c6138a4565b0361254257604051806040016040528060058152602001640a8cacae8d60db1b81525091505b8183604051602001612555929190613cad565b6040516020818303038152906040529350505050919050565b805115610ee257601f1982518051808451016605c284b9def77984840151818106158282040290508083106125fe5785602084831701820116816040018601604051146125ec57602060405101816040018101604052808a528760208701165b87810151828201528801806125ce57509083028188015294506125fe565b80604001860160405280830287870152505b505084519183019160200184165b858101518382015284018061260c575060008382016020015290915250505050565b60006001548210801561077b575050600090815260056020526040902054600160e01b161590565b6000816001548110156126ab5760008181526005602052604081205490600160e01b821690036126a9575b806000036126a2575060001901600081815260056020526040902054612681565b9392505050565b505b604051636f96cda160e11b815260040160405180910390fd5b804710156127145760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610e84565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612761576040519150601f19603f3d011682016040523d82523d6000602084013e612766565b606091505b5050905080610f715760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610e84565b6000546001600160a01b031633146114705760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e84565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b337332bd27bf11c971ad9536b34fd02a19fc3d93e527148015906128bf5750337341538872240ef02d6ed9ac45cf4ff864349d51ed14155b156129b357600b811061290b5760405162461bcd60e51b815260206004820152601460248201527306d617820746f6b656e73207065722074782031360641b6044820152606401610e84565b600a5460ff166129525760405162461bcd60e51b81526020600482015260126024820152714d696e74206973206e6f742061637469766560701b6044820152606401610e84565b60098181548110612965576129656138ba565b906000526020600020015434146129b35760405162461bcd60e51b81526020600482015260126024820152711399595908195e1858dd081c185e5b595b9d60721b6044820152606401610e84565b6127116129c36002546001540390565b6129cd9083613d1f565b1115612a135760405162461bcd60e51b815260206004820152601560248201527429bab838363c903634b6b4ba103932b0b1b432b21760591b6044820152606401610e84565b323314612a585760405162461bcd60e51b81526020600482015260136024820152726e6f20636f6e7472616374206d696e7465727360681b6044820152606401610e84565b610ee28282613036565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290612a97903390899088908890600401613d32565b6020604051808303816000875af1925050508015612ad2575060408051601f3d908101601f19168201909252612acf91810190613d6f565b60015b612b30573d808015612b00576040519150601f19603f3d011682016040523d82523d6000602084013e612b05565b606091505b508051600003612b28576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b606061077b82600080613050565b606081600003612b825750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612bac5780612b96816138f9565b9150612ba59050600a83613962565b9150612b86565b60008167ffffffffffffffff811115612bc757612bc76135b6565b6040519080825280601f01601f191660200182016040528015612bf1576020820181803683370190505b5090505b841561132457612c066001836138e6565b9150612c13600a86613d8c565b612c1e906030613d1f565b60f81b818381518110612c3357612c336138ba565b60200101906001600160f81b031916908160001a905350612c55600a86613962565b9450612bf5565b606082600060015b60018351612c7291906138e6565b821015612cb5576000612c8687878561313c565b90508019612c945750612cb5565b81612c9e816138f9565b9250612cad9050816001613d1f565b925050612c64565b8067ffffffffffffffff811115612cce57612cce6135b6565b604051908082528060200260200182016040528015612d0157816020015b6060815260200190600190039081612cec5790505b50935060009150600090505b60018351612d1b91906138e6565b821015612e40576000612d2f87878561313c565b90508019612d3b575082515b6000612d4784836138e6565b67ffffffffffffffff811115612d5f57612d5f6135b6565b6040519080825280601f01601f191660200182016040528015612d89576020820181803683370190505b509050806000855b84811015612e0057878181518110612dab57612dab6138ba565b01602001516001600160f81b0319168383612dc5816138f9565b945081518110612dd757612dd76138ba565b60200101906001600160f81b031916908160001a90535080612df8816138f9565b915050612d91565b50612e0c846001613d1f565b9550818886612e1a816138f9565b975081518110612e2c57612e2c6138ba565b602002602001018190525050505050612d0d565b50505092915050565b82516060908490612e5a8585613da0565b1115612e6857612e68613dc8565b60008467ffffffffffffffff811115612e8357612e836135b6565b6040519080825280601f01601f191660200182016040528015612ead576020820181803683370190505b509050806000855b612ebf8888613da0565b811015612f2d57848181518110612ed857612ed86138ba565b01602001516001600160f81b0319168383612ef2816138f9565b945081518110612f0457612f046138ba565b60200101906001600160f81b031916908160001a90535080612f25816138f9565b915050612eb5565b5090979650505050505050565b805182516000918491849114612f555760009250505061077b565b60005b825181101561302a57818181518110612f7357612f736138ba565b602001015160f81c60f81b6001600160f81b031916838281518110612f9a57612f9a6138ba565b01602001516001600160f81b031916148015906130075750612fdb828281518110612fc757612fc76138ba565b01602001516001600160f81b0319166131d7565b6001600160f81b031916612ffa848381518110612fc757612fc76138ba565b6001600160f81b03191614155b15613018576000935050505061077b565b80613022816138f9565b915050612f58565b50600195945050505050565b610ee2828260405180602001604052806000815250613226565b606083518015613134576003600282010460021b60405192507f4142434445464748494a4b4c4d4e4f505152535455565758595a616263646566601f526102308515027f6768696a6b6c6d6e6f707172737475767778797a303132333435363738392d5f03603f52602083018181015b6003880197508751603f8160121c1651600053603f81600c1c1651600153603f8160061c1651600253603f8116516003535060005182526004820191508082106130c057601f01601f1916604052613d3d60f01b600384066002048083039190915260008615159091029182900352900382525b509392505050565b81516000908490849060011461315457613154613dc8565b835b82518110156131c95781600081518110613172576131726138ba565b602001015160f81c60f81b6001600160f81b031916838281518110613199576131996138ba565b01602001516001600160f81b031916036131b75792506126a2915050565b806131c1816138f9565b915050613156565b506000199695505050505050565b6000606160f81b6001600160f81b03198316108015906132055750603d60f91b6001600160f81b0319831611155b1561322257613219602060f884901c613dde565b60f81b92915050565b5090565b6132308383613293565b6001600160a01b0383163b15610f71576001548281035b61325a6000868380600101945086612a62565b613277576040516368d2bf6b60e11b815260040160405180910390fd5b81811061324757816001541461328c57600080fd5b5050505050565b60015460008290036132b85760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526006602090815260408083208054680100000000000000018802019055848352600590915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b81811461336757808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a460010161332f565b508160000361338857604051622e076360e81b815260040160405180910390fd5b60015550505050565b60405180604001604052806002906020820280368337509192915050565b6001600160e01b03198116811461151057600080fd5b6000602082840312156133d757600080fd5b81356126a2816133af565b803561ffff811681146133f457600080fd5b919050565b60006020828403121561340b57600080fd5b6126a2826133e2565b60005b8381101561342f578181015183820152602001613417565b50506000910152565b60008151808452613450816020860160208601613414565b601f01601f19169290920160200192915050565b6020815260006126a26020830184613438565b60006020828403121561348957600080fd5b5035919050565b80356001600160a01b03811681146133f457600080fd5b600080604083850312156134ba57600080fd5b6134c383613490565b946020939093013593505050565b6000806000606084860312156134e657600080fd5b6134ef84613490565b92506134fd60208501613490565b9150604084013590509250925092565b60408101818360005b6002811015612e405781516001600160a01b0316835260209283019290910190600101613516565b60006020828403121561355057600080fd5b6126a282613490565b600081518084526020808501945080840160005b838110156135895781518752958201959082019060010161356d565b509495945050505050565b6040815260006135a76040830185613559565b90508260208301529392505050565b634e487b7160e01b600052604160045260246000fd5b6040516101c0810167ffffffffffffffff811182821017156135f0576135f06135b6565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561361f5761361f6135b6565b604052919050565b605d811061151057600080fd5b80356133f481613627565b60006101c0828403121561365257600080fd5b61365a6135cc565b613663836133e2565b815261367160208401613634565b602082015261368260408401613634565b604082015261369360608401613634565b60608201526136a460808401613634565b60808201526136b560a08401613634565b60a08201526136c660c08401613634565b60c08201526136d760e08401613634565b60e08201526101006136ea818501613634565b908201526101206136fc848201613634565b9082015261014061370e848201613634565b90820152610160613720848201613634565b90820152610180613732848201613634565b908201526101a0613744848201613634565b908201529392505050565b6000806040838503121561376257600080fd5b61376b83613490565b91506020830135801515811461378057600080fd5b809150509250929050565b600067ffffffffffffffff8211156137a5576137a56135b6565b50601f01601f191660200190565b600080600080608085870312156137c957600080fd5b6137d285613490565b93506137e060208601613490565b925060408501359150606085013567ffffffffffffffff81111561380357600080fd5b8501601f8101871361381457600080fd5b80356138276138228261378b565b6135f6565b81815288602083850101111561383c57600080fd5b8160208401602083013760006020838301015280935050505092959194509250565b6020815260006126a26020830184613559565b6000806040838503121561388457600080fd5b61388d83613490565b915061389b60208401613490565b90509250929050565b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561077b5761077b6138d0565b60006001820161390b5761390b6138d0565b5060010190565b600181811c9082168061392657607f821691505b60208210810361394657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601260045260246000fd5b6000826139715761397161394c565b500490565b600081613985576139856138d0565b506000190190565b60006020828403121561399f57600080fd5b815167ffffffffffffffff8111156139b657600080fd5b8201601f810184136139c757600080fd5b80516139d56138228261378b565b8181528560208385010111156139ea57600080fd5b6139fb826020830160208601613414565b95945050505050565b607b60f81b815267113730b6b2911d1160c11b60018201528351600090613a32816009850160208901613414565b701116113232b9b1b934b83a34b7b7111d1160791b6009918401918201528451613a6381601a840160208901613414565b6f11161134b6b0b3b2afb230ba30911d1160811b601a92909101918201528351613a9481602a840160208801613414565b7f222c2261747472696275746573223a205b7b2274726169745f74797065223a22602a92909101918201527f312f31222c2276616c7565223a224261677565747465227d5d7d000000000000604a82015260640195945050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000815260008251613b2981601d850160208701613414565b91909101601d0192915050565b6b41736369692050756e6b202360a01b815260008251613b5d81600c850160208701613414565b91909101600c0192915050565b607b60f81b815267113730b6b2911d1160c11b60018201528451600090613b98816009850160208a01613414565b701116113232b9b1b934b83a34b7b7111d1160791b6009918401918201528551613bc981601a840160208a01613414565b6f11161134b6b0b3b2afb230ba30911d1160811b601a92909101918201528451613bfa81602a840160208901613414565b6f011161130ba3a3934b13aba32b9911d160851b602a92909101918201528351613c2b81603a840160208801613414565b607d60f81b603a9290910191820152603b019695505050505050565b600060208284031215613c5957600080fd5b81516126a281613627565b60208101605d8310613c8657634e487b7160e01b600052602160045260246000fd5b91905290565b600060208284031215613c9e57600080fd5b8151600d81106126a257600080fd5b6e3d913a3930b4ba2fba3cb832911d1160891b81528251600090613cd881600f850160208801613414565b6b111610113b30b63ab2911d1160a11b600f918401918201528351613d0481601b840160208801613414565b61227d60f01b601b9290910191820152601d01949350505050565b8082018082111561077b5761077b6138d0565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613d6590830184613438565b9695505050505050565b600060208284031215613d8157600080fd5b81516126a2816133af565b600082613d9b57613d9b61394c565b500690565b8082018281126000831280158216821582161715613dc057613dc06138d0565b505092915050565b634e487b7160e01b600052600160045260246000fd5b60ff828116828216039081111561077b5761077b6138d056fe41736369692050756e6b7320697320612067656e6572617469766520686f6d61676520746f20746865206f726967696e616c2043727970746f50756e6b732e20456163682041736369692050756e6b2773207472616974732061726520726574726965766564206f6e2d636861696e2066726f6d207468652043727970746f50756e6b734461746120636f6e74726163742ea2646970667358221220d451534f415e868eae0aaf34273a0bd201958de7f74029aec62b2a9d6596a5b464736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000016f5a35647d6f03d5d3da7b35409d65ba03af3b2000000000000000000000000f03e345bb89dc9cfaf8fda381a9e4417bfb46e7a0000000000000000000000006a0000d6d3fc96235e14b6523474ee63ff9933d8
-----Decoded View---------------
Arg [0] : punkDataContractAddress (address): 0x16F5A35647D6F03D5D3da7b35409D65ba03aF3B2
Arg [1] : extendedPunkDataContractAddress (address): 0xf03e345bB89Dc9cFaf8Fda381a9E4417BFB46e7A
Arg [2] : asciiPunksRendererAddress (address): 0x6A0000D6d3fC96235E14B6523474ee63fF9933d8
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000016f5a35647d6f03d5d3da7b35409d65ba03af3b2
Arg [1] : 000000000000000000000000f03e345bb89dc9cfaf8fda381a9e4417bfb46e7a
Arg [2] : 0000000000000000000000006a0000d6d3fc96235e14b6523474ee63ff9933d8
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.