Feature Tip: Add private address tag to any address under My Name Tag !
ERC-721
Overview
Max Total Supply
545 CAIC
Holders
250
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 CAICLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
CaicGrids
Compiler Version
v0.8.0+commit.c7dfd78e
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; import '@openzeppelin/contracts/utils/Strings.sol'; import './CAIC.sol'; import './Randomize.sol'; import "./IBMP.sol"; /// @title CaicGrids /// @author tfs128 (@trickerfs128) contract CaicGrids is CAIC { using Strings for uint256; using Strings for uint32; using Randomize for Randomize.Random; IBMP public immutable _bmp; /// @notice constructor /// @param contractURI can be empty /// @param openseaProxyRegistry can be address zero /// @param bmp encoder address constructor( string memory contractURI, address openseaProxyRegistry, address bmp ) CAIC(contractURI, openseaProxyRegistry) { _bmp = IBMP(bmp); } /// @dev Rendering function; should be overrode /// @param tokenId the tokenId /// @param seed the seed /// @param isSvg true=svg, false=base64 encoded function _render(uint256 tokenId, bytes32 seed, bool isSvg) internal view override returns (string memory) { Randomize.Random memory random = Randomize.Random({ seed: uint256(seed), offsetBit: 0 }); uint256 rule = random.next(1,255); bytes memory pixels = getCells(rule,random); bytes memory bmpImage = _bmp.bmp(pixels,SIZE,SIZE,_bmp.grayscale()); if(isSvg == true) { string memory sizeInString = SIZE.toString(); bytes memory image = abi.encodePacked( '"image":"data:image/svg+xml;utf8,', "<svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' height='",sizeInString,"' width='",sizeInString,"'>" "<image style='image-rendering: pixelated;' height='",sizeInString,"' width='",sizeInString,"' xlink:href='",_bmp.bmpDataURI(bmpImage),"'></image>", '</svg>"' ); return string(abi.encodePacked( 'data:application/json;utf8,' '{"name":"Grid #',tokenId.toString(),'",', '"description":"A grid completely generated onchain using 1D cellular automaton.",', '"properties":{ "Rule":"',rule.toString(),'"},', image, '}' )); } else { return string(abi.encodePacked( _bmp.bmpDataURI(bmpImage) )); } } /// @notice Gas eater function, to generate cells on grid /// @param rule CA rule 1-255 /// @param random to generate random initial row. function getCells(uint256 rule, Randomize.Random memory random) internal view returns(bytes memory) { unchecked { bytes memory pixels = new bytes(uint256(SIZE * SIZE)); bytes memory oldRow = new bytes(SIZE); uint256 x; for(x=1; x < SIZE; x++) { uint256 random = random.next(1,255); oldRow[x] = random % 2 == 0 ? bytes1(uint8(1)) : bytes1(uint8(0)); } uint8 increment; if(SIZE <= 256) { increment = 3; } else if(SIZE <= 384) { increment = 2; } else { increment = 1; } for(uint256 y=0; y< SIZE; y+=4) { bytes memory newRow = new bytes(uint256(SIZE)); uint8 gr = 0; for(x = 0; x < SIZE; x+=4) { gr += increment; bytes1 px = uint8(oldRow[x]) == 1 ? bytes1(uint8(1)) : bytes1(uint8(255-gr)); { uint yp1 = y + 1; uint yp2 = y + 2; uint xp1 = x + 1; uint xp2 = x + 2; pixels[y * SIZE + x ] = px; pixels[y * SIZE + xp1] = px; pixels[y * SIZE + xp2] = px; pixels[ yp1 * SIZE + x ] = px; pixels[ yp1 * SIZE + xp1] = px; pixels[ yp1 * SIZE + xp2] = px; pixels[ yp2 * SIZE + x ] = px; pixels[ yp2 * SIZE + xp1] = px; pixels[ yp2 * SIZE + xp2] = px; } uint8 combine; if(x == 0) { combine = (uint8(1) << 2) + (uint8(oldRow[x]) << 1) + (uint8(oldRow[x+4]) << 0); } else if(x == SIZE - 4) { combine = (uint8(oldRow[x-4]) << 2) + (uint8(oldRow[x]) << 1) + (uint8(1) << 0); } else { combine = (uint8(oldRow[x-4]) << 2) + (uint8(oldRow[x]) << 1) + (uint8(oldRow[x+4]) << 0); } uint8 nValue = ( uint8(rule) >> combine ) & 1; newRow[x] = nValue == 1 ? bytes1(uint8(1)) : bytes1(uint8(0)); } oldRow = newRow; } return pixels; } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant alphabet = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = alphabet[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import './BaseOpenSea.sol'; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; /// @title CAIC (Cellular Automaton In Chain) /// @author Tfs128 (@trickerfs128) /// @dev most of the code borrowed from [sol]Seedlings contract written by Simon Fremaux (@dievardump) contract CAIC is BaseOpenSea, ERC721Enumerable,Ownable,ReentrancyGuard { event SeedChangeRequest(uint256 indexed tokenId, address indexed operator); event Collected(address indexed operator, uint256 indexed count,uint256 value); event Claimed(address indexed operator); event SizeUpdated(uint32 size); // Last Token Id Generated. uint256 public LAST_TOKEN_ID; //public minting start time. uint256 public PUBLIC_MINTING_TIME = block.timestamp + 36 hours; // 0.00768 uint256 public PRICE = 7680000000000000; // Max Available for mint `Available` - `Reserved` uint256 public AVAILABLE = 509; // 257 reserved for blockglyphs holders + 2 for owner uint256 public BG_RESERVED_LEFT = 259; // Max mints allowed in single transaction uint256 public MAX_MINT = 11; // Last Seed Generated bytes32 public LAST_SEED; // Size of image height:=SIZE, width:=SIZE uint32 public SIZE = 256; // each token seed mapping(uint256 => bytes32) internal _tokenSeed; // tokenIds with a request for seeds change mapping(uint256 => bool) private _seedChangeRequests; // blockGlyph holders mapping(address => bool) public _bgHolders; /// @notice constructor /// @param contractURI can be empty /// @param openseaProxyRegistry can be address zero constructor( string memory contractURI, address openseaProxyRegistry ) ERC721('CAIC', 'CAIC') { //CAIC (Cellular Automaton In Chain) if (bytes(contractURI).length > 0) { _setContractURI(contractURI); } if (address(0) != openseaProxyRegistry) { _setOpenSeaRegistry(openseaProxyRegistry); } } /// @notice function to mint `count` token(s) to `msg.sender` /// @param count numbers of tokens function mint(uint256 count) external payable nonReentrant { require (block.timestamp >= PUBLIC_MINTING_TIME, 'Wait'); require(count > 0, 'Must be greater than 0'); require(count <= MAX_MINT, 'More Than Max Allowed.' ); require(count <= AVAILABLE, 'Too Many Requested.'); require(msg.value == PRICE * count , 'Not Enough Amount.'); uint256 tokenId = LAST_TOKEN_ID; bytes32 blockHash = blockhash(block.number - 1); bytes32 nextSeed; for (uint256 i; i < count; i++) { tokenId++; _safeMint(msg.sender, tokenId); nextSeed = keccak256( abi.encodePacked( LAST_SEED, block.timestamp, msg.sender, blockHash, block.coinbase, block.difficulty, tx.gasprice ) ); LAST_SEED = nextSeed; _tokenSeed[tokenId] = nextSeed; } LAST_TOKEN_ID = tokenId; AVAILABLE -= count; emit Collected(msg.sender, count, msg.value); } /// @notice func for free token claim for blockglyph holders function claim() external { require (block.timestamp < PUBLIC_MINTING_TIME, 'You are late.'); //I had made a blunder in previouse deployment, so had to redeploy again. //rather than storing whole reserve list again, will use it from //previouse contract. require (CAIC(0xb742848B5971cE5D0628E351714AF5F1F4e4A8A2)._bgHolders(msg.sender) == true, 'Not a bg holder.'); require (_bgHolders[msg.sender] == false , 'Already claimed.'); uint256 tokenId = LAST_TOKEN_ID + 1; _safeMint(msg.sender, tokenId); bytes32 blockHash = blockhash(block.number - 1); bytes32 nextSeed = keccak256( abi.encodePacked( LAST_SEED, block.timestamp, msg.sender, blockHash, block.coinbase, block.difficulty, tx.gasprice ) ); LAST_TOKEN_ID = tokenId; LAST_SEED = nextSeed; _tokenSeed[tokenId] = nextSeed; BG_RESERVED_LEFT -= 1; _bgHolders[msg.sender] = true; emit Claimed(msg.sender); } /// @notice function to request seed change by token owner. /// @param tokenId of which seed change requested function requestSeedChange(uint256 tokenId) external { require(ownerOf(tokenId) == msg.sender, 'Not token owner.'); _seedChangeRequests[tokenId] = true; emit SeedChangeRequest(tokenId, msg.sender); } /// opensea config (https://docs.opensea.io/docs/contract-level-metadata) function setContractURI(string memory contractURI) external onlyOwner { _setContractURI(contractURI); } ///@notice function to update image res ///@param imageSize height X width = 'imageSize * imageSize' function updateImageSize(uint32 imageSize) external onlyOwner { require(imageSize % 4 == 0, 'Should be a multiple of 4'); require(imageSize > 63 && imageSize < 513, 'Must be between 64-512'); SIZE = imageSize; emit SizeUpdated(imageSize); } /// @dev blockglyphs holders struct. struct bgHolderAddresses { address addr; bool available; } /// @notice function to add blockglyph holders + 2 owner reserved function addBgHolders(bgHolderAddresses[] calldata addresses) external onlyOwner { for (uint i = 0; i < addresses.length; i++) { _bgHolders[addresses[i].addr] = addresses[i].available; } } ///@notice function to respond to seed change requests ///@param tokenId of which seed needs to be change function changeSeedAfterRequest(uint256 tokenId) external onlyOwner { require(_seedChangeRequests[tokenId] == true, 'No request for token.'); _seedChangeRequests[tokenId] = false; _tokenSeed[tokenId] = keccak256( abi.encode( _tokenSeed[tokenId], block.timestamp, block.difficulty, blockhash(block.number - 1) ) ); } /// @notice function to withdraw balance. function withdraw() external onlyOwner { require(address(this).balance > 0, "0 Balance."); bool success; (success, ) = msg.sender.call{value: address(this).balance}(''); require(success, 'Failed'); } /// @notice this function returns the seed associated to a tokenId /// @param tokenId to get the seed of function getTokenSeed(uint256 tokenId) external view returns (bytes32) { require(_exists(tokenId), 'TokenSeed query for nonexistent token'); return _tokenSeed[tokenId]; } /// @notice function to get raw based64 encoded image /// @param tokenId id of token function getRaw(uint256 tokenId) public view returns (string memory) { require( _exists(tokenId), 'Query for nonexistent token' ); return _render(tokenId, _tokenSeed[tokenId],false); } /// @notice tokenURI override that returns a data:json application /// @inheritdoc ERC721 function tokenURI(uint256 tokenId) public view override returns (string memory) { require( _exists(tokenId), 'ERC721Metadata: URI query for nonexistent token' ); return _render(tokenId, _tokenSeed[tokenId],true); } /// @notice Called with the sale price to determine how much royalty /// @param tokenId - the NFT asset queried for royalty information /// @param value - the sale price of the NFT asset specified by _tokenId /// @return receiver - address of who should be sent the royalty payment /// @return royaltyAmount - the royalty payment amount for value sale price function royaltyInfo(uint256 tokenId, uint256 value) public view returns (address receiver, uint256 royaltyAmount) { receiver = owner(); royaltyAmount = (value * 300) / 10000; } /// @notice Function allowing to check the rendering for a given seed /// @param seed the seed to render function renderSeed(bytes32 seed) public view returns (string memory) { return _render(1, seed, false); } /// @dev Rendering function; /// @param tokenId which needs to be render /// @param seed seed which needs to be render /// @param isSvg true=svg, false=base64 encoded function _render(uint256 tokenId, bytes32 seed, bool isSvg) internal view virtual returns (string memory) { seed; return string( abi.encodePacked( 'data:application/json,{"name":"', tokenId, '"}' ) ); } }
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; // small library to randomize using (min, max, seed, offsetBit etc...) library Randomize { struct Random { uint256 seed; uint256 offsetBit; } /// @notice get an random number between (min and max) using seed and offseting bits /// this function assumes that max is never bigger than 0xffffff (hex color with opacity included) /// @dev this function is simply used to get random number using a seed. /// if does bitshifting operations to try to reuse the same seed as much as possible. /// should be enough for anyth /// @param random the randomizer /// @param min the minimum /// @param max the maximum /// @return result the resulting pseudo random number function next( Random memory random, uint256 min, uint256 max ) internal pure returns (uint256 result) { uint256 newSeed = random.seed; uint256 newOffset = random.offsetBit + 3; uint256 maxOffset = 4; uint256 mask = 0xf; if (max > 0xfffff) { mask = 0xffffff; maxOffset = 24; } else if (max > 0xffff) { mask = 0xfffff; maxOffset = 20; } else if (max > 0xfff) { mask = 0xffff; maxOffset = 16; } else if (max > 0xff) { mask = 0xfff; maxOffset = 12; } else if (max > 0xf) { mask = 0xff; maxOffset = 8; } // if offsetBit is too high to get the max number // just get new seed and restart offset to 0 if (newOffset > (256 - maxOffset)) { newOffset = 0; newSeed = uint256(keccak256(abi.encode(newSeed))); } uint256 offseted = (newSeed >> newOffset); uint256 part = offseted & mask; result = min + (part % (max - min)); random.seed = newSeed; random.offsetBit = newOffset; } function nextInt( Random memory random, uint256 min, uint256 max ) internal pure returns (int256 result) { result = int256(Randomize.next(random, min, max)); } }
// SPDX-License-Identifier: MIT // Copyright 2021 Arran Schlosberg / Twitter @divergence_art pragma solidity >=0.8.0 <0.9.0; /// @title IBMP interface /// @dev interface of BMP.sol originally used in brotchain (0xd31fc221d2b0e0321c43e9f6824b26ebfff01d7d) interface IBMP { /// @notice Returns an 8-bit grayscale palette for bitmap images. function grayscale() external pure returns (bytes memory); /// @notice Returns an 8-bit BMP encoding of the pixels. /// @param pixels bytes array of pixels /// @param width - /// @param height - /// @param palette bytes array function bmp(bytes memory pixels, uint32 width, uint32 height, bytes memory palette) external pure returns (bytes memory); /// @notice Returns the buffer, presumably from bmp(), as a base64 data URI. /// @param bmpBuf encoded bytes of pixels function bmpDataURI(bytes memory bmpBuf) external pure returns (string memory); /// @notice Scale pixels by repetition along both axes. /// @param pixels bytes array of pixels /// @param width - /// @param height - /// @param scale - function scalePixels(bytes memory pixels, uint32 width, uint32 height, uint32 scale) external pure returns (bytes memory); }
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @title OpenSea contract helper that defines a few things /// @author Simon Fremaux (@dievardump) /// @dev This is a contract used to add OpenSea's support contract BaseOpenSea { string private _contractURI; ProxyRegistry private _proxyRegistry; /// @notice Returns the contract URI function. Used on OpenSea to get details // about a contract (owner, royalties etc...) function contractURI() public view returns (string memory) { return _contractURI; } /// @notice Helper for OpenSea gas-less trading /// @dev Allows to check if `operator` is owner's OpenSea proxy /// @param owner the owner we check for /// @param operator the operator (proxy) we check for function isOwnersOpenSeaProxy(address owner, address operator) public view returns (bool) { ProxyRegistry proxyRegistry = _proxyRegistry; return // we have a proxy registry address address(proxyRegistry) != address(0) && // current operator is owner's proxy address address(proxyRegistry.proxies(owner)) == operator; } /// @dev Internal function to set the _contractURI /// @param contractURI_ the new contract uri function _setContractURI(string memory contractURI_) internal { _contractURI = contractURI_; } /// @dev Internal function to set the _proxyRegistry /// @param proxyRegistryAddress the new proxy registry address function _setOpenSeaRegistry(address proxyRegistryAddress) internal { _proxyRegistry = ProxyRegistry(proxyRegistryAddress); } } contract OwnableDelegateProxy {} contract ProxyRegistry { mapping(address => OwnableDelegateProxy) public proxies; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../ERC721.sol"; import "./IERC721Enumerable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor () { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = 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"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "./extensions/IERC721Enumerable.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping (uint256 => address) private _owners; // Mapping owner address to token count mapping (address => uint256) private _balances; // Mapping from token ID to approved address mapping (uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping (address => mapping (address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor (string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ''; } /** * @dev Base URI for computing {tokenURI}. Empty by default, can be overriden * in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require(_msgSender() == owner || ERC721.isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { require(operator != _msgSender(), "ERC721: approve to caller"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom(address from, address to, uint256 tokenId) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer(address from, address to, uint256 tokenId, bytes memory _data) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || ERC721.isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint(address to, uint256 tokenId, bytes memory _data) internal virtual { _mint(to, tokenId); require(_checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer(address from, address to, uint256 tokenId) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory _data) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { // solhint-disable-next-line no-inline-assembly assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual { } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 tokenId) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (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"); // solhint-disable-next-line avoid-low-level-calls (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"); // solhint-disable-next-line avoid-low-level-calls (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"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "istanbul", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"contractURI","type":"string"},{"internalType":"address","name":"openseaProxyRegistry","type":"address"},{"internalType":"address","name":"bmp","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"uint256","name":"count","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Collected","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"operator","type":"address"}],"name":"SeedChangeRequest","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"size","type":"uint32"}],"name":"SizeUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"AVAILABLE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BG_RESERVED_LEFT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LAST_SEED","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LAST_TOKEN_ID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_MINT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PUBLIC_MINTING_TIME","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SIZE","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"_bgHolders","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_bmp","outputs":[{"internalType":"contract IBMP","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"bool","name":"available","type":"bool"}],"internalType":"struct CAIC.bgHolderAddresses[]","name":"addresses","type":"tuple[]"}],"name":"addBgHolders","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"changeSeedAfterRequest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getRaw","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTokenSeed","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isOwnersOpenSeaProxy","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"count","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":"bytes32","name":"seed","type":"bytes32"}],"name":"renderSeed","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"requestSeedChange","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"contractURI","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"imageSize","type":"uint32"}],"name":"updateImageSize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a060405262000013426201fa4062000375565b600f55661b48eb57e000006010556101fd601155610103601255600b6013556015805463ffffffff19166101001790553480156200005057600080fd5b50604051620042f5380380620042f583398101604081905262000073916200027f565b6040805180820182526004808252634341494360e01b60208084018281528551808701909652928552840152815186938693929091620000b691600291620001bc565b508051620000cc906003906020840190620001bc565b5050506000620000e16200017d60201b60201c565b600c80546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506001600d558151156200014757620001478262000181565b6001600160a01b03811615620001625762000162816200019a565b505060601b6001600160601b03191660805250620003ed9050565b3390565b805162000196906000906020840190620001bc565b5050565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b828054620001ca906200039a565b90600052602060002090601f016020900481019282620001ee576000855562000239565b82601f106200020957805160ff191683800117855562000239565b8280016001018555821562000239579182015b82811115620002395782518255916020019190600101906200021c565b50620002479291506200024b565b5090565b5b808211156200024757600081556001016200024c565b80516001600160a01b03811681146200027a57600080fd5b919050565b60008060006060848603121562000294578283fd5b83516001600160401b0380821115620002ab578485fd5b818601915086601f830112620002bf578485fd5b815181811115620002d457620002d4620003d7565b6040516020601f8301601f1916820181018481118382101715620002fc57620002fc620003d7565b60405282825284830181018a101562000313578788fd5b8793505b8284101562000336578484018101518285018201529283019262000317565b828411156200034757878184840101525b81975062000357818a0162000262565b965050505050506200036c6040850162000262565b90509250925092565b600082198211156200039557634e487b7160e01b81526011600452602481fd5b500190565b600281046001821680620003af57607f821691505b60208210811415620003d157634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b60805160601c613ed46200042160003960008181610c0901528181611a8f01528181611bc50152611ce00152613ed46000f3fe60806040526004361061025c5760003560e01c806370a0823111610144578063b88d4fde116100b6578063c87b56dd1161007a578063c87b56dd146106a9578063dd98e3c9146106c9578063e8a3d485146106e9578063e985e9c5146106fe578063f0292a031461071e578063f2fde38b146107335761025c565b8063b88d4fde14610607578063ba30b2c814610627578063bc36ff8114610647578063bdffd28214610667578063bf40e75c146106895761025c565b8063938e3d7b11610108578063938e3d7b1461057557806395d89b41146105955780639d42026e146105aa578063a0712d68146105bf578063a22cb465146105d2578063a2dc2365146105f25761025c565b806370a08231146104f6578063715018a614610516578063811886181461052b5780638d859f3e1461054b5780638da5cb5b146105605761025c565b80632f745c59116101dd5780634e71d92d116101a15780634e71d92d1461044c5780634f6ccce7146104615780635a4c1624146104815780636102de98146104a15780636352211e146104c157806367621b0a146104e15761025c565b80632f745c59146103cd5780633ccfd60b146103ed57806342137f081461040257806342842e0e14610417578063469a4b75146104375761025c565b806308fc929f1161022457806308fc929f14610328578063095ea7b31461034a57806318160ddd1461036a57806323b872dd1461037f5780632a55205a1461039f5761025c565b806301ffc9a71461026157806304d884961461029757806306fdde03146102b9578063079d371d146102db578063081812fc146102fb575b600080fd5b34801561026d57600080fd5b5061028161027c366004612edd565b610753565b60405161028e9190613424565b60405180910390f35b3480156102a357600080fd5b506102b76102b2366004612ec5565b610780565b005b3480156102c557600080fd5b506102ce6107ff565b60405161028e9190613453565b3480156102e757600080fd5b506102b76102f6366004612fde565b610891565b34801561030757600080fd5b5061031b610316366004612ec5565b610987565b60405161028e91906133ba565b34801561033457600080fd5b5061033d6109ca565b60405161028e919061342f565b34801561035657600080fd5b506102b7610365366004612df2565b6109d0565b34801561037657600080fd5b5061033d610a68565b34801561038b57600080fd5b506102b761039a366004612d08565b610a6e565b3480156103ab57600080fd5b506103bf6103ba366004612fbd565b610aa6565b60405161028e92919061340b565b3480156103d957600080fd5b5061033d6103e8366004612df2565b610ad5565b3480156103f957600080fd5b506102b7610b27565b34801561040e57600080fd5b5061031b610c07565b34801561042357600080fd5b506102b7610432366004612d08565b610c2b565b34801561044357600080fd5b5061033d610c46565b34801561045857600080fd5b506102b7610c4c565b34801561046d57600080fd5b5061033d61047c366004612ec5565b610e26565b34801561048d57600080fd5b5061033d61049c366004612ec5565b610e81565b3480156104ad57600080fd5b506102816104bc366004612cd0565b610ebb565b3480156104cd57600080fd5b5061031b6104dc366004612ec5565b610f6d565b3480156104ed57600080fd5b5061033d610fa2565b34801561050257600080fd5b5061033d610511366004612cb4565b610fa8565b34801561052257600080fd5b506102b7610fec565b34801561053757600080fd5b50610281610546366004612cb4565b611075565b34801561055757600080fd5b5061033d61108a565b34801561056c57600080fd5b5061031b611090565b34801561058157600080fd5b506102b7610590366004612f77565b61109f565b3480156105a157600080fd5b506102ce6110e7565b3480156105b657600080fd5b5061033d6110f6565b6102b76105cd366004612ec5565b6110fc565b3480156105de57600080fd5b506102b76105ed366004612dc5565b6112d1565b3480156105fe57600080fd5b5061033d61139f565b34801561061357600080fd5b506102b7610622366004612d48565b6113a5565b34801561063357600080fd5b506102b7610642366004612e1d565b6113e4565b34801561065357600080fd5b506102ce610662366004612ec5565b6114da565b34801561067357600080fd5b5061067c6114e9565b60405161028e9190613ca5565b34801561069557600080fd5b506102b76106a4366004612ec5565b6114f5565b3480156106b557600080fd5b506102ce6106c4366004612ec5565b6115d1565b3480156106d557600080fd5b506102ce6106e4366004612ec5565b611614565b3480156106f557600080fd5b506102ce611656565b34801561070a57600080fd5b50610281610719366004612cd0565b611665565b34801561072a57600080fd5b5061033d611693565b34801561073f57600080fd5b506102b761074e366004612cb4565b611699565b60006001600160e01b0319821663780e9d6360e01b148061077857506107788261175a565b90505b919050565b3361078a82610f6d565b6001600160a01b0316146107b95760405162461bcd60e51b81526004016107b09061349f565b60405180910390fd5b600081815260176020526040808220805460ff1916600117905551339183917f8832fb65003c6ac4dc53a073ae148a6464e937eb2f153567f4aca8f1d431a7469190a350565b60606002805461080e90613d96565b80601f016020809104026020016040519081016040528092919081815260200182805461083a90613d96565b80156108875780601f1061085c57610100808354040283529160200191610887565b820191906000526020600020905b81548152906001019060200180831161086a57829003601f168201915b5050505050905090565b61089961179a565b6001600160a01b03166108aa611090565b6001600160a01b0316146108d05760405162461bcd60e51b81526004016107b090613986565b6108db600482613e00565b63ffffffff16156108fe5760405162461bcd60e51b81526004016107b090613c0a565b603f8163ffffffff1611801561091b57506102018163ffffffff16105b6109375760405162461bcd60e51b81526004016107b090613b19565b6015805463ffffffff191663ffffffff83161790556040517f1a7001bdd21ff7f01233fe01d7206d98895f609af272d6a61dd41beb1326e4839061097c908390613ca5565b60405180910390a150565b60006109928261179e565b6109ae5760405162461bcd60e51b81526004016107b09061393a565b506000908152600660205260409020546001600160a01b031690565b600f5481565b60006109db82610f6d565b9050806001600160a01b0316836001600160a01b03161415610a0f5760405162461bcd60e51b81526004016107b090613ad8565b806001600160a01b0316610a2161179a565b6001600160a01b03161480610a3d5750610a3d8161071961179a565b610a595760405162461bcd60e51b81526004016107b0906137d0565b610a6383836117bb565b505050565b600a5490565b610a7f610a7961179a565b82611829565b610a9b5760405162461bcd60e51b81526004016107b090613b49565b610a638383836118a6565b600080610ab1611090565b9150612710610ac28461012c613d34565b610acc9190613d20565b90509250929050565b6000610ae083610fa8565b8210610afe5760405162461bcd60e51b81526004016107b090613500565b506001600160a01b03919091166000908152600860209081526040808320938352929052205490565b610b2f61179a565b6001600160a01b0316610b40611090565b6001600160a01b031614610b665760405162461bcd60e51b81526004016107b090613986565b60004711610b865760405162461bcd60e51b81526004016107b090613be6565b6000336001600160a01b031647604051610b9f906133b7565b60006040518083038185875af1925050503d8060008114610bdc576040519150601f19603f3d011682016040523d82523d6000602084013e610be1565b606091505b50508091505080610c045760405162461bcd60e51b81526004016107b09061361a565b50565b7f000000000000000000000000000000000000000000000000000000000000000081565b610a63838383604051806020016040528060008152506113a5565b60125481565b600f544210610c6d5760405162461bcd60e51b81526004016107b09061369c565b60405163102310c360e31b815273b742848b5971ce5d0628e351714af5f1f4e4a8a290638118861890610ca49033906004016133ba565b60206040518083038186803b158015610cbc57600080fd5b505afa158015610cd0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf49190612ea9565b1515600114610d155760405162461bcd60e51b81526004016107b090613aae565b3360009081526018602052604090205460ff1615610d455760405162461bcd60e51b81526004016107b090613746565b6000600e546001610d569190613d08565b9050610d6233826119d3565b6000610d6f600143613d53565b409050600060145442338441443a604051602001610d9397969594939291906130af565b60408051601f198184030181529181528151602092830120600e869055601481905560008681526016909352908220819055601280549193506001929091610ddc908490613d53565b909155505033600081815260186020526040808220805460ff19166001179055517fb449c24d261a59627b537c8c41c57ab559f4205c56bea745ff61c5521bece2149190a2505050565b6000610e30610a68565b8210610e4e5760405162461bcd60e51b81526004016107b090613b9a565b600a8281548110610e6f57634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b6000610e8c8261179e565b610ea85760405162461bcd60e51b81526004016107b0906138c0565b5060009081526016602052604090205490565b6001546000906001600160a01b03168015801590610f655750826001600160a01b0316816001600160a01b031663c4552791866040518263ffffffff1660e01b8152600401610f0a91906133ba565b60206040518083038186803b158015610f2257600080fd5b505afa158015610f36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f5a9190612f5b565b6001600160a01b0316145b949350505050565b6000818152600460205260408120546001600160a01b0316806107785760405162461bcd60e51b81526004016107b090613877565b60145481565b60006001600160a01b038216610fd05760405162461bcd60e51b81526004016107b09061382d565b506001600160a01b031660009081526005602052604090205490565b610ff461179a565b6001600160a01b0316611005611090565b6001600160a01b03161461102b5760405162461bcd60e51b81526004016107b090613986565b600c546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600c80546001600160a01b0319169055565b60186020526000908152604090205460ff1681565b60105481565b600c546001600160a01b031690565b6110a761179a565b6001600160a01b03166110b8611090565b6001600160a01b0316146110de5760405162461bcd60e51b81526004016107b090613986565b610c04816119f1565b60606003805461080e90613d96565b600e5481565b6002600d54141561111f5760405162461bcd60e51b81526004016107b090613c41565b6002600d55600f544210156111465760405162461bcd60e51b81526004016107b09061363a565b600081116111665760405162461bcd60e51b81526004016107b0906137a0565b6013548111156111885760405162461bcd60e51b81526004016107b090613770565b6011548111156111aa5760405162461bcd60e51b81526004016107b090613c78565b806010546111b89190613d34565b34146111d65760405162461bcd60e51b81526004016107b090613a82565b600e5460006111e6600143613d53565b4090506000805b8481101561126b57836111ff81613dd1565b94505061120c33856119d3565b60145442338541443a60405160200161122b97969594939291906130af565b60408051601f198184030181529181528151602092830120601481905560008781526016909352912081905591508061126381613dd1565b9150506111ed565b5082600e8190555083601160008282546112859190613d53565b9091555050604051849033907f8f0c3d4726e2d22ccf850efced91f2d0c1bea40229449223d795a6cff3276236906112be90349061342f565b60405180910390a350506001600d555050565b6112d961179a565b6001600160a01b0316826001600160a01b0316141561130a5760405162461bcd60e51b81526004016107b0906136c3565b806007600061131761179a565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff19169215159290921790915561135b61179a565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516113939190613424565b60405180910390a35050565b60115481565b6113b66113b061179a565b83611829565b6113d25760405162461bcd60e51b81526004016107b090613b49565b6113de84848484611a04565b50505050565b6113ec61179a565b6001600160a01b03166113fd611090565b6001600160a01b0316146114235760405162461bcd60e51b81526004016107b090613986565b60005b81811015610a635782828281811061144e57634e487b7160e01b600052603260045260246000fd5b90506040020160200160208101906114669190612e8d565b6018600085858581811061148a57634e487b7160e01b600052603260045260246000fd5b6114a09260206040909202019081019150612cb4565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055806114d281613dd1565b915050611426565b60606107786001836000611a37565b60155463ffffffff1681565b6114fd61179a565b6001600160a01b031661150e611090565b6001600160a01b0316146115345760405162461bcd60e51b81526004016107b090613986565b60008181526017602052604090205460ff1615156001146115675760405162461bcd60e51b81526004016107b090613a53565b6000818152601760209081526040808320805460ff1916905560169091529020544244611595600143613d53565b406040516020016115a99493929190613438565b60408051601f1981840301815291815281516020928301206000938452601690925290912055565b60606115dc8261179e565b6115f85760405162461bcd60e51b81526004016107b090613a04565b6000828152601660205260409020546107789083906001611a37565b606061161f8261179e565b61163b5760405162461bcd60e51b81526004016107b0906134c9565b60008281526016602052604081205461077891849190611a37565b60606000805461080e90613d96565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b60135481565b6116a161179a565b6001600160a01b03166116b2611090565b6001600160a01b0316146116d85760405162461bcd60e51b81526004016107b090613986565b6001600160a01b0381166116fe5760405162461bcd60e51b81526004016107b09061359d565b600c546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600c80546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160e01b031982166380ac58cd60e01b148061178b57506001600160e01b03198216635b5e139f60e01b145b80610778575061077882611d96565b3390565b6000908152600460205260409020546001600160a01b0316151590565b600081815260066020526040902080546001600160a01b0319166001600160a01b03841690811790915581906117f082610f6d565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006118348261179e565b6118505760405162461bcd60e51b81526004016107b0906136fa565b600061185b83610f6d565b9050806001600160a01b0316846001600160a01b031614806118965750836001600160a01b031661188b84610987565b6001600160a01b0316145b80610f655750610f658185611665565b826001600160a01b03166118b982610f6d565b6001600160a01b0316146118df5760405162461bcd60e51b81526004016107b0906139bb565b6001600160a01b0382166119055760405162461bcd60e51b81526004016107b090613658565b611910838383611daf565b61191b6000826117bb565b6001600160a01b0383166000908152600560205260408120805460019290611944908490613d53565b90915550506001600160a01b0382166000908152600560205260408120805460019290611972908490613d08565b909155505060008181526004602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6119ed828260405180602001604052806000815250611e38565b5050565b80516119ed906000906020840190612bad565b611a0f8484846118a6565b611a1b84848484611e6b565b6113de5760405162461bcd60e51b81526004016107b09061354b565b6040805180820190915282815260006020820181905260609190611a5e82600160ff611f86565b90506000611a6c8284612093565b60155460408051631abe81a160e01b815290519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263e4c4ed9992869263ffffffff9092169182918691631abe81a1916004808201928b92909190829003018186803b158015611aea57600080fd5b505afa158015611afe573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611b269190810190612f15565b6040518563ffffffff1660e01b8152600401611b459493929190613466565b60006040518083038186803b158015611b5d57600080fd5b505afa158015611b71573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611b999190810190612f15565b905060018615151415611cc957601554600090611bbb9063ffffffff166127af565b90506000818283847f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639f6aaa92886040518263ffffffff1660e01b8152600401611c0f9190613453565b60006040518083038186803b158015611c2757600080fd5b505afa158015611c3b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611c639190810190612f15565b604051602001611c77959493929190613246565b6040516020818303038152906040529050611c918a6127af565b611c9a866127af565b82604051602001611cad93929190613110565b6040516020818303038152906040529650505050505050611d8f565b604051634fb5554960e11b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690639f6aaa9290611d15908490600401613453565b60006040518083038186803b158015611d2d57600080fd5b505afa158015611d41573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611d699190810190612f15565b604051602001611d7991906130f4565b6040516020818303038152906040529450505050505b9392505050565b6001600160e01b031981166301ffc9a760e01b14919050565b611dba838383610a63565b6001600160a01b038316611dd657611dd1816128ca565b611df9565b816001600160a01b0316836001600160a01b031614611df957611df9838261290e565b6001600160a01b038216611e1557611e10816129ab565b610a63565b826001600160a01b0316826001600160a01b031614610a6357610a638282612a84565b611e428383612ac8565b611e4f6000848484611e6b565b610a635760405162461bcd60e51b81526004016107b09061354b565b6000611e7f846001600160a01b0316612ba7565b15611f7b57836001600160a01b031663150b7a02611e9b61179a565b8786866040518563ffffffff1660e01b8152600401611ebd94939291906133ce565b602060405180830381600087803b158015611ed757600080fd5b505af1925050508015611f07575060408051601f3d908101601f19168201909252611f0491810190612ef9565b60015b611f61573d808015611f35576040519150601f19603f3d011682016040523d82523d6000602084013e611f3a565b606091505b508051611f595760405162461bcd60e51b81526004016107b09061354b565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610f65565b506001949350505050565b82516020840151600091908290611f9e906003613d08565b90506004600f620fffff861115611fbd57506018905062ffffff612013565b61ffff861115611fd5575060149050620fffff612013565b610fff861115611fec57506010905061ffff612013565b60ff8611156120025750600c9050610fff612013565b600f86111561201357506008905060ff5b61201f82610100613d53565b83111561205757600092508360405160200161203b919061342f565b6040516020818303038152906040528051906020012060001c93505b83831c8181166120678989613d53565b6120719082613dec565b61207b908a613d08565b958a5250505050602090950194909452509192915050565b60155460609060009063ffffffff90811680021667ffffffffffffffff8111156120cd57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156120f7576020820181803683370190505b5060155490915060009063ffffffff1667ffffffffffffffff81111561212d57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612157576020820181803683370190505b50905060015b60155463ffffffff168110156121d457600061217c86600160ff611f86565b9050600281061561218e576000612194565b600160f81b5b8383815181106121b457634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053505060010161215d565b60155460009061010063ffffffff909116116121f257506003612211565b60155461018063ffffffff9091161161220d57506002612211565b5060015b60005b60155463ffffffff168110156127a35760155460009063ffffffff1667ffffffffffffffff81111561225657634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612280576020820181803683370190505b50905060008094505b60155463ffffffff1685101561279857838101905060008686815181106122c057634e487b7160e01b600052603260045260246000fd5b60209101015160f81c6001146122dc578160ff0360f81b6122e2565b600160f81b5b6015548951919250600180870192600280890193928b0192908b019186918e9163ffffffff9091168b028d0190811061232b57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506015548c5186918e9163ffffffff9091168b02850190811061237457634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506015548c5186918e9163ffffffff9091168b0284019081106123bd57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506015548c5186918e9163ffffffff90911687028d0190811061240657634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506015548c5186918e9163ffffffff9091168702850190811061244f57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506015548c5186918e9163ffffffff9091168702840190811061249857634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506015548c5186918e9163ffffffff90911686028d019081106124e157634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506015548c5186918e9163ffffffff9091168602850190811061252a57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506015548c5186918e9163ffffffff9091168602840190811061257357634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535050505050600086600014156126085760008888600401815181106125be57634e487b7160e01b600052603260045260246000fd5b602001015160f81c60f81b60f81c60ff16901b60018989815181106125f357634e487b7160e01b600052603260045260246000fd5b016020015160f81c901b016004019050612732565b60155460031963ffffffff918216011687141561269157875160019081908a908a90811061264657634e487b7160e01b600052603260045260246000fd5b602001015160f81c60f81b60f81c60ff16901b60028a60048b038151811061267e57634e487b7160e01b600052603260045260246000fd5b016020015160f81c901b01019050612732565b60008888600401815181106126b657634e487b7160e01b600052603260045260246000fd5b602001015160f81c60f81b60f81c60ff16901b60018989815181106126eb57634e487b7160e01b600052603260045260246000fd5b602001015160f81c60f81b60f81c60ff16901b60028a60048b038151811061272357634e487b7160e01b600052603260045260246000fd5b016020015160f81c901b010190505b600160ff8d81169083161c811690811461274d576000612753565b600160f81b5b85898151811061277357634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350505050600485019450612289565b509350600401612214565b50929695505050505050565b6060816127d457506040805180820190915260018152600360fc1b602082015261077b565b8160005b81156127fe57806127e881613dd1565b91506127f79050600a83613d20565b91506127d8565b60008167ffffffffffffffff81111561282757634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612851576020820181803683370190505b5090505b8415610f6557612866600183613d53565b9150612873600a86613dec565b61287e906030613d08565b60f81b8183815181106128a157634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506128c3600a86613d20565b9450612855565b600a80546000838152600b60205260408120829055600182018355919091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80155565b6000600161291b84610fa8565b6129259190613d53565b600083815260096020526040902054909150808214612978576001600160a01b03841660009081526008602090815260408083208584528252808320548484528184208190558352600990915290208190555b5060009182526009602090815260408084208490556001600160a01b039094168352600881528383209183525290812055565b600a546000906129bd90600190613d53565b6000838152600b6020526040812054600a80549394509092849081106129f357634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905080600a8381548110612a2257634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255828152600b9091526040808220849055858252812055600a805480612a6857634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b6000612a8f83610fa8565b6001600160a01b039093166000908152600860209081526040808320868452825280832085905593825260099052919091209190915550565b6001600160a01b038216612aee5760405162461bcd60e51b81526004016107b090613905565b612af78161179e565b15612b145760405162461bcd60e51b81526004016107b0906135e3565b612b2060008383611daf565b6001600160a01b0382166000908152600560205260408120805460019290612b49908490613d08565b909155505060008181526004602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b3b151590565b828054612bb990613d96565b90600052602060002090601f016020900481019282612bdb5760008555612c21565b82601f10612bf457805160ff1916838001178555612c21565b82800160010185558215612c21579182015b82811115612c21578251825591602001919060010190612c06565b50612c2d929150612c31565b5090565b5b80821115612c2d5760008155600101612c32565b6000612c59612c5484613ce0565b613cb6565b9050828152838383011115612c6d57600080fd5b828260208301376000602084830101529392505050565b6000612c92612c5484613ce0565b9050828152838383011115612ca657600080fd5b611d8f836020830184613d6a565b600060208284031215612cc5578081fd5b8135611d8f81613e65565b60008060408385031215612ce2578081fd5b8235612ced81613e65565b91506020830135612cfd81613e65565b809150509250929050565b600080600060608486031215612d1c578081fd5b8335612d2781613e65565b92506020840135612d3781613e65565b929592945050506040919091013590565b60008060008060808587031215612d5d578081fd5b8435612d6881613e65565b93506020850135612d7881613e65565b925060408501359150606085013567ffffffffffffffff811115612d9a578182fd5b8501601f81018713612daa578182fd5b612db987823560208401612c46565b91505092959194509250565b60008060408385031215612dd7578182fd5b8235612de281613e65565b91506020830135612cfd81613e7a565b60008060408385031215612e04578182fd5b8235612e0f81613e65565b946020939093013593505050565b60008060208385031215612e2f578182fd5b823567ffffffffffffffff80821115612e46578384fd5b818501915085601f830112612e59578384fd5b813581811115612e67578485fd5b866020604083028501011115612e7b578485fd5b60209290920196919550909350505050565b600060208284031215612e9e578081fd5b8135611d8f81613e7a565b600060208284031215612eba578081fd5b8151611d8f81613e7a565b600060208284031215612ed6578081fd5b5035919050565b600060208284031215612eee578081fd5b8135611d8f81613e88565b600060208284031215612f0a578081fd5b8151611d8f81613e88565b600060208284031215612f26578081fd5b815167ffffffffffffffff811115612f3c578182fd5b8201601f81018413612f4c578182fd5b610f6584825160208401612c84565b600060208284031215612f6c578081fd5b8151611d8f81613e65565b600060208284031215612f88578081fd5b813567ffffffffffffffff811115612f9e578182fd5b8201601f81018413612fae578182fd5b610f6584823560208401612c46565b60008060408385031215612fcf578182fd5b50508035926020909101359150565b600060208284031215612fef578081fd5b813563ffffffff81168114611d8f578182fd5b6000815180845261301a816020860160208601613d6a565b601f01601f19169290920160200192915050565b60008151613040818560208601613d6a565b9290920192915050565b69139f1e17b4b6b0b3b29f60b11b8152600a0190565b661e17b9bb339f1160c91b815260070190565b607d60f81b815260010190565b6d2720786c696e6b3a687265663d2760901b8152600e0190565b68272077696474683d2760b81b815260090190565b96875260208701959095526bffffffffffffffffffffffff19606094851b811660408801526054870193909352921b166074840152608883015260a882015260c80190565b60008251613106818460208701613d6a565b9190910192915050565b60007f646174613a6170706c69636174696f6e2f6a736f6e3b757466382c7b226e616d82526965223a2247726964202360b01b6020830152845161315b81602a850160208901613d6a565b61088b60f21b602a918401918201527f226465736372697074696f6e223a2241206772696420636f6d706c6574656c79602c8201527f2067656e657261746564206f6e636861696e207573696e672031442063656c6c604c820152701d5b185c88185d5d1bdb585d1bdb8b888b607a1b606c8201527f2270726f70657274696573223a7b202252756c65223a22000000000000000000607d8201528451613209816094840160208901613d6a565b62089f4b60ea1b60949290910191820152835161322d816097840160208801613d6a565b61323b609782840101613073565b979650505050505050565b60007f22696d616765223a22646174613a696d6167652f7376672b786d6c3b757466388252600b60fa1b60208301527f3c73766720786d6c6e733d27687474703a2f2f7777772e77332e6f72672f323060218301527f30302f7376672720786d6c6e733a786c696e6b3d27687474703a2f2f7777772e60418301527f77332e6f72672f313939392f786c696e6b27206865696768743d270000000000606183015286516132fa81607c850160208b01613d6a565b68272077696474683d2760b81b607c918401918201528651613323816085840160208b01613d6a565b7f273e3c696d616765207374796c653d27696d6167652d72656e646572696e673a608592909101918201527420706978656c617465643b27206865696768743d2760581b60a58201526133ab6133a66133a161339b61339661339061338b60ba88018d61302e565b61309a565b8a61302e565b613080565b8761302e565b61304a565b613060565b98975050505050505050565b90565b6001600160a01b0391909116815260200190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061340190830184613002565b9695505050505050565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b90815260200190565b93845260208401929092526040830152606082015260800190565b600060208252611d8f6020830184613002565b6000608082526134796080830187613002565b63ffffffff868116602085015285166040840152828103606084015261323b8185613002565b60208082526010908201526f2737ba103a37b5b2b71037bbb732b91760811b604082015260600190565b6020808252601b908201527f517565727920666f72206e6f6e6578697374656e7420746f6b656e0000000000604082015260600190565b6020808252602b908201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560408201526a74206f6620626f756e647360a81b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b60208082526006908201526511985a5b195960d21b604082015260600190565b60208082526004908201526315d85a5d60e21b604082015260600190565b60208082526024908201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646040820152637265737360e01b606082015260800190565b6020808252600d908201526c2cb7ba9030b932903630ba329760991b604082015260600190565b60208082526019908201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604082015260600190565b6020808252602c908201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b60208082526010908201526f20b63932b0b23c9031b630b4b6b2b21760811b604082015260600190565b60208082526016908201527526b7b932902a3430b71026b0bc1020b63637bbb2b21760511b604082015260600190565b60208082526016908201527504d7573742062652067726561746572207468616e20360541b604082015260600190565b60208082526038908201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760408201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606082015260800190565b6020808252602a908201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604082015269726f206164647265737360b01b606082015260800190565b60208082526029908201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460408201526832b73a103a37b5b2b760b91b606082015260800190565b60208082526025908201527f546f6b656e5365656420717565727920666f72206e6f6e6578697374656e74206040820152643a37b5b2b760d91b606082015260800190565b6020808252818101527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604082015260600190565b6020808252602c908201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526029908201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960408201526839903737ba1037bbb760b91b606082015260800190565b6020808252602f908201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60408201526e3732bc34b9ba32b73a103a37b5b2b760891b606082015260800190565b6020808252601590820152742737903932b8bab2b9ba103337b9103a37b5b2b71760591b604082015260600190565b6020808252601290820152712737ba1022b737bab3b41020b6b7bab73a1760711b604082015260600190565b60208082526010908201526f2737ba1030903133903437b63232b91760811b604082015260600190565b60208082526021908201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656040820152603960f91b606082015260800190565b60208082526016908201527526bab9ba103132903132ba3bb2b2b7101b1a169a989960511b604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252602c908201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60408201526b7574206f6620626f756e647360a01b606082015260800190565b6020808252600a908201526918102130b630b731b29760b11b604082015260600190565b60208082526019908201527f53686f756c642062652061206d756c7469706c65206f66203400000000000000604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6020808252601390820152722a37b79026b0b73c902932b8bab2b9ba32b21760691b604082015260600190565b63ffffffff91909116815260200190565b60405181810167ffffffffffffffff81118282101715613cd857613cd8613e4f565b604052919050565b600067ffffffffffffffff821115613cfa57613cfa613e4f565b50601f01601f191660200190565b60008219821115613d1b57613d1b613e23565b500190565b600082613d2f57613d2f613e39565b500490565b6000816000190483118215151615613d4e57613d4e613e23565b500290565b600082821015613d6557613d65613e23565b500390565b60005b83811015613d85578181015183820152602001613d6d565b838111156113de5750506000910152565b600281046001821680613daa57607f821691505b60208210811415613dcb57634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415613de557613de5613e23565b5060010190565b600082613dfb57613dfb613e39565b500690565b600063ffffffff80841680613e1757613e17613e39565b92169190910692915050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610c0457600080fd5b8015158114610c0457600080fd5b6001600160e01b031981168114610c0457600080fdfea26469706673582212201b389f4b580b54f130ca1be91411c0ae160413eac4fafeb0bb4b880f6387323164736f6c634300080000330000000000000000000000000000000000000000000000000000000000000060000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1000000000000000000000000183c93b6060f997d2d30a10621998fd3a937ea6d0000000000000000000000000000000000000000000000000000000000000044697066733a2f2f697066732f516d52616948625438747977683770543968766378584876436b37774e465041653972544a787a4852324a346d662f636169632e6a736f6e00000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x60806040526004361061025c5760003560e01c806370a0823111610144578063b88d4fde116100b6578063c87b56dd1161007a578063c87b56dd146106a9578063dd98e3c9146106c9578063e8a3d485146106e9578063e985e9c5146106fe578063f0292a031461071e578063f2fde38b146107335761025c565b8063b88d4fde14610607578063ba30b2c814610627578063bc36ff8114610647578063bdffd28214610667578063bf40e75c146106895761025c565b8063938e3d7b11610108578063938e3d7b1461057557806395d89b41146105955780639d42026e146105aa578063a0712d68146105bf578063a22cb465146105d2578063a2dc2365146105f25761025c565b806370a08231146104f6578063715018a614610516578063811886181461052b5780638d859f3e1461054b5780638da5cb5b146105605761025c565b80632f745c59116101dd5780634e71d92d116101a15780634e71d92d1461044c5780634f6ccce7146104615780635a4c1624146104815780636102de98146104a15780636352211e146104c157806367621b0a146104e15761025c565b80632f745c59146103cd5780633ccfd60b146103ed57806342137f081461040257806342842e0e14610417578063469a4b75146104375761025c565b806308fc929f1161022457806308fc929f14610328578063095ea7b31461034a57806318160ddd1461036a57806323b872dd1461037f5780632a55205a1461039f5761025c565b806301ffc9a71461026157806304d884961461029757806306fdde03146102b9578063079d371d146102db578063081812fc146102fb575b600080fd5b34801561026d57600080fd5b5061028161027c366004612edd565b610753565b60405161028e9190613424565b60405180910390f35b3480156102a357600080fd5b506102b76102b2366004612ec5565b610780565b005b3480156102c557600080fd5b506102ce6107ff565b60405161028e9190613453565b3480156102e757600080fd5b506102b76102f6366004612fde565b610891565b34801561030757600080fd5b5061031b610316366004612ec5565b610987565b60405161028e91906133ba565b34801561033457600080fd5b5061033d6109ca565b60405161028e919061342f565b34801561035657600080fd5b506102b7610365366004612df2565b6109d0565b34801561037657600080fd5b5061033d610a68565b34801561038b57600080fd5b506102b761039a366004612d08565b610a6e565b3480156103ab57600080fd5b506103bf6103ba366004612fbd565b610aa6565b60405161028e92919061340b565b3480156103d957600080fd5b5061033d6103e8366004612df2565b610ad5565b3480156103f957600080fd5b506102b7610b27565b34801561040e57600080fd5b5061031b610c07565b34801561042357600080fd5b506102b7610432366004612d08565b610c2b565b34801561044357600080fd5b5061033d610c46565b34801561045857600080fd5b506102b7610c4c565b34801561046d57600080fd5b5061033d61047c366004612ec5565b610e26565b34801561048d57600080fd5b5061033d61049c366004612ec5565b610e81565b3480156104ad57600080fd5b506102816104bc366004612cd0565b610ebb565b3480156104cd57600080fd5b5061031b6104dc366004612ec5565b610f6d565b3480156104ed57600080fd5b5061033d610fa2565b34801561050257600080fd5b5061033d610511366004612cb4565b610fa8565b34801561052257600080fd5b506102b7610fec565b34801561053757600080fd5b50610281610546366004612cb4565b611075565b34801561055757600080fd5b5061033d61108a565b34801561056c57600080fd5b5061031b611090565b34801561058157600080fd5b506102b7610590366004612f77565b61109f565b3480156105a157600080fd5b506102ce6110e7565b3480156105b657600080fd5b5061033d6110f6565b6102b76105cd366004612ec5565b6110fc565b3480156105de57600080fd5b506102b76105ed366004612dc5565b6112d1565b3480156105fe57600080fd5b5061033d61139f565b34801561061357600080fd5b506102b7610622366004612d48565b6113a5565b34801561063357600080fd5b506102b7610642366004612e1d565b6113e4565b34801561065357600080fd5b506102ce610662366004612ec5565b6114da565b34801561067357600080fd5b5061067c6114e9565b60405161028e9190613ca5565b34801561069557600080fd5b506102b76106a4366004612ec5565b6114f5565b3480156106b557600080fd5b506102ce6106c4366004612ec5565b6115d1565b3480156106d557600080fd5b506102ce6106e4366004612ec5565b611614565b3480156106f557600080fd5b506102ce611656565b34801561070a57600080fd5b50610281610719366004612cd0565b611665565b34801561072a57600080fd5b5061033d611693565b34801561073f57600080fd5b506102b761074e366004612cb4565b611699565b60006001600160e01b0319821663780e9d6360e01b148061077857506107788261175a565b90505b919050565b3361078a82610f6d565b6001600160a01b0316146107b95760405162461bcd60e51b81526004016107b09061349f565b60405180910390fd5b600081815260176020526040808220805460ff1916600117905551339183917f8832fb65003c6ac4dc53a073ae148a6464e937eb2f153567f4aca8f1d431a7469190a350565b60606002805461080e90613d96565b80601f016020809104026020016040519081016040528092919081815260200182805461083a90613d96565b80156108875780601f1061085c57610100808354040283529160200191610887565b820191906000526020600020905b81548152906001019060200180831161086a57829003601f168201915b5050505050905090565b61089961179a565b6001600160a01b03166108aa611090565b6001600160a01b0316146108d05760405162461bcd60e51b81526004016107b090613986565b6108db600482613e00565b63ffffffff16156108fe5760405162461bcd60e51b81526004016107b090613c0a565b603f8163ffffffff1611801561091b57506102018163ffffffff16105b6109375760405162461bcd60e51b81526004016107b090613b19565b6015805463ffffffff191663ffffffff83161790556040517f1a7001bdd21ff7f01233fe01d7206d98895f609af272d6a61dd41beb1326e4839061097c908390613ca5565b60405180910390a150565b60006109928261179e565b6109ae5760405162461bcd60e51b81526004016107b09061393a565b506000908152600660205260409020546001600160a01b031690565b600f5481565b60006109db82610f6d565b9050806001600160a01b0316836001600160a01b03161415610a0f5760405162461bcd60e51b81526004016107b090613ad8565b806001600160a01b0316610a2161179a565b6001600160a01b03161480610a3d5750610a3d8161071961179a565b610a595760405162461bcd60e51b81526004016107b0906137d0565b610a6383836117bb565b505050565b600a5490565b610a7f610a7961179a565b82611829565b610a9b5760405162461bcd60e51b81526004016107b090613b49565b610a638383836118a6565b600080610ab1611090565b9150612710610ac28461012c613d34565b610acc9190613d20565b90509250929050565b6000610ae083610fa8565b8210610afe5760405162461bcd60e51b81526004016107b090613500565b506001600160a01b03919091166000908152600860209081526040808320938352929052205490565b610b2f61179a565b6001600160a01b0316610b40611090565b6001600160a01b031614610b665760405162461bcd60e51b81526004016107b090613986565b60004711610b865760405162461bcd60e51b81526004016107b090613be6565b6000336001600160a01b031647604051610b9f906133b7565b60006040518083038185875af1925050503d8060008114610bdc576040519150601f19603f3d011682016040523d82523d6000602084013e610be1565b606091505b50508091505080610c045760405162461bcd60e51b81526004016107b09061361a565b50565b7f000000000000000000000000183c93b6060f997d2d30a10621998fd3a937ea6d81565b610a63838383604051806020016040528060008152506113a5565b60125481565b600f544210610c6d5760405162461bcd60e51b81526004016107b09061369c565b60405163102310c360e31b815273b742848b5971ce5d0628e351714af5f1f4e4a8a290638118861890610ca49033906004016133ba565b60206040518083038186803b158015610cbc57600080fd5b505afa158015610cd0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf49190612ea9565b1515600114610d155760405162461bcd60e51b81526004016107b090613aae565b3360009081526018602052604090205460ff1615610d455760405162461bcd60e51b81526004016107b090613746565b6000600e546001610d569190613d08565b9050610d6233826119d3565b6000610d6f600143613d53565b409050600060145442338441443a604051602001610d9397969594939291906130af565b60408051601f198184030181529181528151602092830120600e869055601481905560008681526016909352908220819055601280549193506001929091610ddc908490613d53565b909155505033600081815260186020526040808220805460ff19166001179055517fb449c24d261a59627b537c8c41c57ab559f4205c56bea745ff61c5521bece2149190a2505050565b6000610e30610a68565b8210610e4e5760405162461bcd60e51b81526004016107b090613b9a565b600a8281548110610e6f57634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b6000610e8c8261179e565b610ea85760405162461bcd60e51b81526004016107b0906138c0565b5060009081526016602052604090205490565b6001546000906001600160a01b03168015801590610f655750826001600160a01b0316816001600160a01b031663c4552791866040518263ffffffff1660e01b8152600401610f0a91906133ba565b60206040518083038186803b158015610f2257600080fd5b505afa158015610f36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f5a9190612f5b565b6001600160a01b0316145b949350505050565b6000818152600460205260408120546001600160a01b0316806107785760405162461bcd60e51b81526004016107b090613877565b60145481565b60006001600160a01b038216610fd05760405162461bcd60e51b81526004016107b09061382d565b506001600160a01b031660009081526005602052604090205490565b610ff461179a565b6001600160a01b0316611005611090565b6001600160a01b03161461102b5760405162461bcd60e51b81526004016107b090613986565b600c546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600c80546001600160a01b0319169055565b60186020526000908152604090205460ff1681565b60105481565b600c546001600160a01b031690565b6110a761179a565b6001600160a01b03166110b8611090565b6001600160a01b0316146110de5760405162461bcd60e51b81526004016107b090613986565b610c04816119f1565b60606003805461080e90613d96565b600e5481565b6002600d54141561111f5760405162461bcd60e51b81526004016107b090613c41565b6002600d55600f544210156111465760405162461bcd60e51b81526004016107b09061363a565b600081116111665760405162461bcd60e51b81526004016107b0906137a0565b6013548111156111885760405162461bcd60e51b81526004016107b090613770565b6011548111156111aa5760405162461bcd60e51b81526004016107b090613c78565b806010546111b89190613d34565b34146111d65760405162461bcd60e51b81526004016107b090613a82565b600e5460006111e6600143613d53565b4090506000805b8481101561126b57836111ff81613dd1565b94505061120c33856119d3565b60145442338541443a60405160200161122b97969594939291906130af565b60408051601f198184030181529181528151602092830120601481905560008781526016909352912081905591508061126381613dd1565b9150506111ed565b5082600e8190555083601160008282546112859190613d53565b9091555050604051849033907f8f0c3d4726e2d22ccf850efced91f2d0c1bea40229449223d795a6cff3276236906112be90349061342f565b60405180910390a350506001600d555050565b6112d961179a565b6001600160a01b0316826001600160a01b0316141561130a5760405162461bcd60e51b81526004016107b0906136c3565b806007600061131761179a565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff19169215159290921790915561135b61179a565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516113939190613424565b60405180910390a35050565b60115481565b6113b66113b061179a565b83611829565b6113d25760405162461bcd60e51b81526004016107b090613b49565b6113de84848484611a04565b50505050565b6113ec61179a565b6001600160a01b03166113fd611090565b6001600160a01b0316146114235760405162461bcd60e51b81526004016107b090613986565b60005b81811015610a635782828281811061144e57634e487b7160e01b600052603260045260246000fd5b90506040020160200160208101906114669190612e8d565b6018600085858581811061148a57634e487b7160e01b600052603260045260246000fd5b6114a09260206040909202019081019150612cb4565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055806114d281613dd1565b915050611426565b60606107786001836000611a37565b60155463ffffffff1681565b6114fd61179a565b6001600160a01b031661150e611090565b6001600160a01b0316146115345760405162461bcd60e51b81526004016107b090613986565b60008181526017602052604090205460ff1615156001146115675760405162461bcd60e51b81526004016107b090613a53565b6000818152601760209081526040808320805460ff1916905560169091529020544244611595600143613d53565b406040516020016115a99493929190613438565b60408051601f1981840301815291815281516020928301206000938452601690925290912055565b60606115dc8261179e565b6115f85760405162461bcd60e51b81526004016107b090613a04565b6000828152601660205260409020546107789083906001611a37565b606061161f8261179e565b61163b5760405162461bcd60e51b81526004016107b0906134c9565b60008281526016602052604081205461077891849190611a37565b60606000805461080e90613d96565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b60135481565b6116a161179a565b6001600160a01b03166116b2611090565b6001600160a01b0316146116d85760405162461bcd60e51b81526004016107b090613986565b6001600160a01b0381166116fe5760405162461bcd60e51b81526004016107b09061359d565b600c546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600c80546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160e01b031982166380ac58cd60e01b148061178b57506001600160e01b03198216635b5e139f60e01b145b80610778575061077882611d96565b3390565b6000908152600460205260409020546001600160a01b0316151590565b600081815260066020526040902080546001600160a01b0319166001600160a01b03841690811790915581906117f082610f6d565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006118348261179e565b6118505760405162461bcd60e51b81526004016107b0906136fa565b600061185b83610f6d565b9050806001600160a01b0316846001600160a01b031614806118965750836001600160a01b031661188b84610987565b6001600160a01b0316145b80610f655750610f658185611665565b826001600160a01b03166118b982610f6d565b6001600160a01b0316146118df5760405162461bcd60e51b81526004016107b0906139bb565b6001600160a01b0382166119055760405162461bcd60e51b81526004016107b090613658565b611910838383611daf565b61191b6000826117bb565b6001600160a01b0383166000908152600560205260408120805460019290611944908490613d53565b90915550506001600160a01b0382166000908152600560205260408120805460019290611972908490613d08565b909155505060008181526004602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6119ed828260405180602001604052806000815250611e38565b5050565b80516119ed906000906020840190612bad565b611a0f8484846118a6565b611a1b84848484611e6b565b6113de5760405162461bcd60e51b81526004016107b09061354b565b6040805180820190915282815260006020820181905260609190611a5e82600160ff611f86565b90506000611a6c8284612093565b60155460408051631abe81a160e01b815290519293506000926001600160a01b037f000000000000000000000000183c93b6060f997d2d30a10621998fd3a937ea6d169263e4c4ed9992869263ffffffff9092169182918691631abe81a1916004808201928b92909190829003018186803b158015611aea57600080fd5b505afa158015611afe573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611b269190810190612f15565b6040518563ffffffff1660e01b8152600401611b459493929190613466565b60006040518083038186803b158015611b5d57600080fd5b505afa158015611b71573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611b999190810190612f15565b905060018615151415611cc957601554600090611bbb9063ffffffff166127af565b90506000818283847f000000000000000000000000183c93b6060f997d2d30a10621998fd3a937ea6d6001600160a01b0316639f6aaa92886040518263ffffffff1660e01b8152600401611c0f9190613453565b60006040518083038186803b158015611c2757600080fd5b505afa158015611c3b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611c639190810190612f15565b604051602001611c77959493929190613246565b6040516020818303038152906040529050611c918a6127af565b611c9a866127af565b82604051602001611cad93929190613110565b6040516020818303038152906040529650505050505050611d8f565b604051634fb5554960e11b81526001600160a01b037f000000000000000000000000183c93b6060f997d2d30a10621998fd3a937ea6d1690639f6aaa9290611d15908490600401613453565b60006040518083038186803b158015611d2d57600080fd5b505afa158015611d41573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611d699190810190612f15565b604051602001611d7991906130f4565b6040516020818303038152906040529450505050505b9392505050565b6001600160e01b031981166301ffc9a760e01b14919050565b611dba838383610a63565b6001600160a01b038316611dd657611dd1816128ca565b611df9565b816001600160a01b0316836001600160a01b031614611df957611df9838261290e565b6001600160a01b038216611e1557611e10816129ab565b610a63565b826001600160a01b0316826001600160a01b031614610a6357610a638282612a84565b611e428383612ac8565b611e4f6000848484611e6b565b610a635760405162461bcd60e51b81526004016107b09061354b565b6000611e7f846001600160a01b0316612ba7565b15611f7b57836001600160a01b031663150b7a02611e9b61179a565b8786866040518563ffffffff1660e01b8152600401611ebd94939291906133ce565b602060405180830381600087803b158015611ed757600080fd5b505af1925050508015611f07575060408051601f3d908101601f19168201909252611f0491810190612ef9565b60015b611f61573d808015611f35576040519150601f19603f3d011682016040523d82523d6000602084013e611f3a565b606091505b508051611f595760405162461bcd60e51b81526004016107b09061354b565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610f65565b506001949350505050565b82516020840151600091908290611f9e906003613d08565b90506004600f620fffff861115611fbd57506018905062ffffff612013565b61ffff861115611fd5575060149050620fffff612013565b610fff861115611fec57506010905061ffff612013565b60ff8611156120025750600c9050610fff612013565b600f86111561201357506008905060ff5b61201f82610100613d53565b83111561205757600092508360405160200161203b919061342f565b6040516020818303038152906040528051906020012060001c93505b83831c8181166120678989613d53565b6120719082613dec565b61207b908a613d08565b958a5250505050602090950194909452509192915050565b60155460609060009063ffffffff90811680021667ffffffffffffffff8111156120cd57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156120f7576020820181803683370190505b5060155490915060009063ffffffff1667ffffffffffffffff81111561212d57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612157576020820181803683370190505b50905060015b60155463ffffffff168110156121d457600061217c86600160ff611f86565b9050600281061561218e576000612194565b600160f81b5b8383815181106121b457634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053505060010161215d565b60155460009061010063ffffffff909116116121f257506003612211565b60155461018063ffffffff9091161161220d57506002612211565b5060015b60005b60155463ffffffff168110156127a35760155460009063ffffffff1667ffffffffffffffff81111561225657634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612280576020820181803683370190505b50905060008094505b60155463ffffffff1685101561279857838101905060008686815181106122c057634e487b7160e01b600052603260045260246000fd5b60209101015160f81c6001146122dc578160ff0360f81b6122e2565b600160f81b5b6015548951919250600180870192600280890193928b0192908b019186918e9163ffffffff9091168b028d0190811061232b57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506015548c5186918e9163ffffffff9091168b02850190811061237457634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506015548c5186918e9163ffffffff9091168b0284019081106123bd57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506015548c5186918e9163ffffffff90911687028d0190811061240657634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506015548c5186918e9163ffffffff9091168702850190811061244f57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506015548c5186918e9163ffffffff9091168702840190811061249857634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506015548c5186918e9163ffffffff90911686028d019081106124e157634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506015548c5186918e9163ffffffff9091168602850190811061252a57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506015548c5186918e9163ffffffff9091168602840190811061257357634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535050505050600086600014156126085760008888600401815181106125be57634e487b7160e01b600052603260045260246000fd5b602001015160f81c60f81b60f81c60ff16901b60018989815181106125f357634e487b7160e01b600052603260045260246000fd5b016020015160f81c901b016004019050612732565b60155460031963ffffffff918216011687141561269157875160019081908a908a90811061264657634e487b7160e01b600052603260045260246000fd5b602001015160f81c60f81b60f81c60ff16901b60028a60048b038151811061267e57634e487b7160e01b600052603260045260246000fd5b016020015160f81c901b01019050612732565b60008888600401815181106126b657634e487b7160e01b600052603260045260246000fd5b602001015160f81c60f81b60f81c60ff16901b60018989815181106126eb57634e487b7160e01b600052603260045260246000fd5b602001015160f81c60f81b60f81c60ff16901b60028a60048b038151811061272357634e487b7160e01b600052603260045260246000fd5b016020015160f81c901b010190505b600160ff8d81169083161c811690811461274d576000612753565b600160f81b5b85898151811061277357634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350505050600485019450612289565b509350600401612214565b50929695505050505050565b6060816127d457506040805180820190915260018152600360fc1b602082015261077b565b8160005b81156127fe57806127e881613dd1565b91506127f79050600a83613d20565b91506127d8565b60008167ffffffffffffffff81111561282757634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612851576020820181803683370190505b5090505b8415610f6557612866600183613d53565b9150612873600a86613dec565b61287e906030613d08565b60f81b8183815181106128a157634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506128c3600a86613d20565b9450612855565b600a80546000838152600b60205260408120829055600182018355919091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80155565b6000600161291b84610fa8565b6129259190613d53565b600083815260096020526040902054909150808214612978576001600160a01b03841660009081526008602090815260408083208584528252808320548484528184208190558352600990915290208190555b5060009182526009602090815260408084208490556001600160a01b039094168352600881528383209183525290812055565b600a546000906129bd90600190613d53565b6000838152600b6020526040812054600a80549394509092849081106129f357634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905080600a8381548110612a2257634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255828152600b9091526040808220849055858252812055600a805480612a6857634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b6000612a8f83610fa8565b6001600160a01b039093166000908152600860209081526040808320868452825280832085905593825260099052919091209190915550565b6001600160a01b038216612aee5760405162461bcd60e51b81526004016107b090613905565b612af78161179e565b15612b145760405162461bcd60e51b81526004016107b0906135e3565b612b2060008383611daf565b6001600160a01b0382166000908152600560205260408120805460019290612b49908490613d08565b909155505060008181526004602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b3b151590565b828054612bb990613d96565b90600052602060002090601f016020900481019282612bdb5760008555612c21565b82601f10612bf457805160ff1916838001178555612c21565b82800160010185558215612c21579182015b82811115612c21578251825591602001919060010190612c06565b50612c2d929150612c31565b5090565b5b80821115612c2d5760008155600101612c32565b6000612c59612c5484613ce0565b613cb6565b9050828152838383011115612c6d57600080fd5b828260208301376000602084830101529392505050565b6000612c92612c5484613ce0565b9050828152838383011115612ca657600080fd5b611d8f836020830184613d6a565b600060208284031215612cc5578081fd5b8135611d8f81613e65565b60008060408385031215612ce2578081fd5b8235612ced81613e65565b91506020830135612cfd81613e65565b809150509250929050565b600080600060608486031215612d1c578081fd5b8335612d2781613e65565b92506020840135612d3781613e65565b929592945050506040919091013590565b60008060008060808587031215612d5d578081fd5b8435612d6881613e65565b93506020850135612d7881613e65565b925060408501359150606085013567ffffffffffffffff811115612d9a578182fd5b8501601f81018713612daa578182fd5b612db987823560208401612c46565b91505092959194509250565b60008060408385031215612dd7578182fd5b8235612de281613e65565b91506020830135612cfd81613e7a565b60008060408385031215612e04578182fd5b8235612e0f81613e65565b946020939093013593505050565b60008060208385031215612e2f578182fd5b823567ffffffffffffffff80821115612e46578384fd5b818501915085601f830112612e59578384fd5b813581811115612e67578485fd5b866020604083028501011115612e7b578485fd5b60209290920196919550909350505050565b600060208284031215612e9e578081fd5b8135611d8f81613e7a565b600060208284031215612eba578081fd5b8151611d8f81613e7a565b600060208284031215612ed6578081fd5b5035919050565b600060208284031215612eee578081fd5b8135611d8f81613e88565b600060208284031215612f0a578081fd5b8151611d8f81613e88565b600060208284031215612f26578081fd5b815167ffffffffffffffff811115612f3c578182fd5b8201601f81018413612f4c578182fd5b610f6584825160208401612c84565b600060208284031215612f6c578081fd5b8151611d8f81613e65565b600060208284031215612f88578081fd5b813567ffffffffffffffff811115612f9e578182fd5b8201601f81018413612fae578182fd5b610f6584823560208401612c46565b60008060408385031215612fcf578182fd5b50508035926020909101359150565b600060208284031215612fef578081fd5b813563ffffffff81168114611d8f578182fd5b6000815180845261301a816020860160208601613d6a565b601f01601f19169290920160200192915050565b60008151613040818560208601613d6a565b9290920192915050565b69139f1e17b4b6b0b3b29f60b11b8152600a0190565b661e17b9bb339f1160c91b815260070190565b607d60f81b815260010190565b6d2720786c696e6b3a687265663d2760901b8152600e0190565b68272077696474683d2760b81b815260090190565b96875260208701959095526bffffffffffffffffffffffff19606094851b811660408801526054870193909352921b166074840152608883015260a882015260c80190565b60008251613106818460208701613d6a565b9190910192915050565b60007f646174613a6170706c69636174696f6e2f6a736f6e3b757466382c7b226e616d82526965223a2247726964202360b01b6020830152845161315b81602a850160208901613d6a565b61088b60f21b602a918401918201527f226465736372697074696f6e223a2241206772696420636f6d706c6574656c79602c8201527f2067656e657261746564206f6e636861696e207573696e672031442063656c6c604c820152701d5b185c88185d5d1bdb585d1bdb8b888b607a1b606c8201527f2270726f70657274696573223a7b202252756c65223a22000000000000000000607d8201528451613209816094840160208901613d6a565b62089f4b60ea1b60949290910191820152835161322d816097840160208801613d6a565b61323b609782840101613073565b979650505050505050565b60007f22696d616765223a22646174613a696d6167652f7376672b786d6c3b757466388252600b60fa1b60208301527f3c73766720786d6c6e733d27687474703a2f2f7777772e77332e6f72672f323060218301527f30302f7376672720786d6c6e733a786c696e6b3d27687474703a2f2f7777772e60418301527f77332e6f72672f313939392f786c696e6b27206865696768743d270000000000606183015286516132fa81607c850160208b01613d6a565b68272077696474683d2760b81b607c918401918201528651613323816085840160208b01613d6a565b7f273e3c696d616765207374796c653d27696d6167652d72656e646572696e673a608592909101918201527420706978656c617465643b27206865696768743d2760581b60a58201526133ab6133a66133a161339b61339661339061338b60ba88018d61302e565b61309a565b8a61302e565b613080565b8761302e565b61304a565b613060565b98975050505050505050565b90565b6001600160a01b0391909116815260200190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061340190830184613002565b9695505050505050565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b90815260200190565b93845260208401929092526040830152606082015260800190565b600060208252611d8f6020830184613002565b6000608082526134796080830187613002565b63ffffffff868116602085015285166040840152828103606084015261323b8185613002565b60208082526010908201526f2737ba103a37b5b2b71037bbb732b91760811b604082015260600190565b6020808252601b908201527f517565727920666f72206e6f6e6578697374656e7420746f6b656e0000000000604082015260600190565b6020808252602b908201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560408201526a74206f6620626f756e647360a81b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b60208082526006908201526511985a5b195960d21b604082015260600190565b60208082526004908201526315d85a5d60e21b604082015260600190565b60208082526024908201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646040820152637265737360e01b606082015260800190565b6020808252600d908201526c2cb7ba9030b932903630ba329760991b604082015260600190565b60208082526019908201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604082015260600190565b6020808252602c908201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b60208082526010908201526f20b63932b0b23c9031b630b4b6b2b21760811b604082015260600190565b60208082526016908201527526b7b932902a3430b71026b0bc1020b63637bbb2b21760511b604082015260600190565b60208082526016908201527504d7573742062652067726561746572207468616e20360541b604082015260600190565b60208082526038908201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760408201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606082015260800190565b6020808252602a908201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604082015269726f206164647265737360b01b606082015260800190565b60208082526029908201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460408201526832b73a103a37b5b2b760b91b606082015260800190565b60208082526025908201527f546f6b656e5365656420717565727920666f72206e6f6e6578697374656e74206040820152643a37b5b2b760d91b606082015260800190565b6020808252818101527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604082015260600190565b6020808252602c908201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526029908201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960408201526839903737ba1037bbb760b91b606082015260800190565b6020808252602f908201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60408201526e3732bc34b9ba32b73a103a37b5b2b760891b606082015260800190565b6020808252601590820152742737903932b8bab2b9ba103337b9103a37b5b2b71760591b604082015260600190565b6020808252601290820152712737ba1022b737bab3b41020b6b7bab73a1760711b604082015260600190565b60208082526010908201526f2737ba1030903133903437b63232b91760811b604082015260600190565b60208082526021908201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656040820152603960f91b606082015260800190565b60208082526016908201527526bab9ba103132903132ba3bb2b2b7101b1a169a989960511b604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252602c908201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60408201526b7574206f6620626f756e647360a01b606082015260800190565b6020808252600a908201526918102130b630b731b29760b11b604082015260600190565b60208082526019908201527f53686f756c642062652061206d756c7469706c65206f66203400000000000000604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6020808252601390820152722a37b79026b0b73c902932b8bab2b9ba32b21760691b604082015260600190565b63ffffffff91909116815260200190565b60405181810167ffffffffffffffff81118282101715613cd857613cd8613e4f565b604052919050565b600067ffffffffffffffff821115613cfa57613cfa613e4f565b50601f01601f191660200190565b60008219821115613d1b57613d1b613e23565b500190565b600082613d2f57613d2f613e39565b500490565b6000816000190483118215151615613d4e57613d4e613e23565b500290565b600082821015613d6557613d65613e23565b500390565b60005b83811015613d85578181015183820152602001613d6d565b838111156113de5750506000910152565b600281046001821680613daa57607f821691505b60208210811415613dcb57634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415613de557613de5613e23565b5060010190565b600082613dfb57613dfb613e39565b500690565b600063ffffffff80841680613e1757613e17613e39565b92169190910692915050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610c0457600080fd5b8015158114610c0457600080fd5b6001600160e01b031981168114610c0457600080fdfea26469706673582212201b389f4b580b54f130ca1be91411c0ae160413eac4fafeb0bb4b880f6387323164736f6c63430008000033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1000000000000000000000000183c93b6060f997d2d30a10621998fd3a937ea6d0000000000000000000000000000000000000000000000000000000000000044697066733a2f2f697066732f516d52616948625438747977683770543968766378584876436b37774e465041653972544a787a4852324a346d662f636169632e6a736f6e00000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : contractURI (string): ipfs://ipfs/QmRaiHbT8tywh7pT9hvcxXHvCk7wNFPAe9rTJxzHR2J4mf/caic.json
Arg [1] : openseaProxyRegistry (address): 0xa5409ec958C83C3f309868babACA7c86DCB077c1
Arg [2] : bmp (address): 0x183C93B6060f997d2d30a10621998fD3A937ea6d
-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [1] : 000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1
Arg [2] : 000000000000000000000000183c93b6060f997d2d30a10621998fd3a937ea6d
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000044
Arg [4] : 697066733a2f2f697066732f516d526169486254387479776837705439687663
Arg [5] : 78584876436b37774e465041653972544a787a4852324a346d662f636169632e
Arg [6] : 6a736f6e00000000000000000000000000000000000000000000000000000000
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.