ERC-721
Overview
Max Total Supply
553 DRE
Holders
214
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
2 DRELoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
ChainDreamers
Compiler Version
v0.8.8+commit.dddeac2f
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import {BytesLib} from "solidity-bytes-utils/contracts/BytesLib.sol"; import "../interfaces/IDreamersRenderer.sol"; import "../interfaces/ICandyShop.sol"; import "../interfaces/IChainRunners.sol"; contract OwnableDelegateProxy {} contract ProxyRegistry { mapping(address => OwnableDelegateProxy) public proxies; } contract ChainDreamers is ERC721Enumerable, Ownable, ReentrancyGuard { // Linked contracts address public renderingContractAddress; address public candyShopAddress; address public chainRunnersAddress; IDreamersRenderer renderer; ICandyShop candyShop; IChainRunners chainRunners; uint8[10_000] public dreamersCandies; uint8 private constant candyMask = 252; // "11111100" binary string, last 2 bits kept for candyId /// @dev Copied from \@naomsa's contract /// @notice OpenSea proxy registry. address public opensea; /// @notice LooksRare marketplace transfer manager. address public looksrare; /// @notice Check if marketplaces pre-approve is enabled. bool public marketplacesApproved = true; mapping(address => bool) proxyToApproved; /// @notice Set opensea to `opensea_`. function setOpensea(address opensea_) external onlyOwner { opensea = opensea_; } /// @notice Set looksrare to `looksrare_`. function setLooksrare(address looksrare_) external onlyOwner { looksrare = looksrare_; } /// @notice Toggle pre-approve feature state for sender. function toggleMarketplacesApproved() external onlyOwner { marketplacesApproved = !marketplacesApproved; } /// @notice Approve the communication and interaction with cross-collection interactions. function flipProxyState(address proxyAddress) public onlyOwner { proxyToApproved[proxyAddress] = !proxyToApproved[proxyAddress]; } /// @dev Modified for opensea and looksrare pre-approve so users can make truly gas less sales. function isApprovedForAll(address owner, address operator) public view override returns (bool) { if (!marketplacesApproved) return super.isApprovedForAll(owner, operator); return operator == address(ProxyRegistry(opensea).proxies(owner)) || operator == looksrare || proxyToApproved[operator] || super.isApprovedForAll(owner, operator); } // Constants uint256 public maxDreamersMintPublicSale; uint256 public constant MINT_PUBLIC_PRICE = 0.05 ether; uint256 public constant MAX_MINT_FOUNDERS = 50; bool public foundersMinted = true; // State variables uint256 public publicSaleStartTimestamp; function setPublicSaleTimestamp(uint256 timestamp) external onlyOwner { publicSaleStartTimestamp = timestamp; } function isPublicSaleOpen() public view returns (bool) { return block.timestamp > publicSaleStartTimestamp && publicSaleStartTimestamp != 0; } modifier whenPublicSaleActive() { require(isPublicSaleOpen(), "Public sale not open"); _; } function setRenderingContractAddress(address _renderingContractAddress) public onlyOwner { renderingContractAddress = _renderingContractAddress; renderer = IDreamersRenderer(renderingContractAddress); } function setCandyShopAddress(address _candyShopContractAddress) public onlyOwner { candyShopAddress = _candyShopContractAddress; candyShop = ICandyShop(candyShopAddress); } function setMaxDreamersMintPublicSale(uint256 _maxDreamersMintPublicSale) public onlyOwner { maxDreamersMintPublicSale = _maxDreamersMintPublicSale; } function setChainRunnersContractAddress( address _chainRunnersContractAddress ) public onlyOwner { chainRunnersAddress = _chainRunnersContractAddress; chainRunners = IChainRunners(_chainRunnersContractAddress); } constructor( string memory name_, string memory symbol_, address _rendererAddress, address _chainRunnersAddress, address _opensea, address _looksrare, uint256 _maxDreamersMintPublicSale ) ERC721(name_, symbol_) { setRenderingContractAddress(_rendererAddress); setChainRunnersContractAddress(_chainRunnersAddress); opensea = _opensea; looksrare = _looksrare; setMaxDreamersMintPublicSale(_maxDreamersMintPublicSale); } function setOgs( address[] memory _ogs, uint256[] memory _tokenIds, uint8[] memory _candies ) external onlyOwner { for (uint256 i = 0; i < _ogs.length; i++) { _safeMint(_ogs[i], _tokenIds[i]); dreamersCandies[_tokenIds[i]] = _candies[i]; } } /// @dev This mint function wraps the safeMintBatch to: /// 1) check that the minter owns the runner 2) use the candies 3) burn the candies /// @param tokenIds a bytes interpreted as an array of uint16 /// @param candyIds the same indexes as above but as a uint8 array /// @param candyAmounts should be an array of 1 function mintBatchRunnersAccess( bytes calldata tokenIds, uint256[] calldata candyIds, uint256[] calldata candyAmounts ) public nonReentrant returns (bool) { require( tokenIds.length == candyIds.length * 2, "Each runner needs one and only one candy" ); bytes32 candies = keccak256( abi.encodePacked( tokenIds, msg.sender, candyIds, block.timestamp, block.difficulty ) ); for (uint256 i = 0; i < candyIds.length; i++) { uint16 tokenId = BytesLib.toUint16(tokenIds, i * 2); // ownerOf uses a simple mapping in OZ's ERC721 so should be cheap require( chainRunners.ownerOf(tokenId) == _msgSender(), "You cannot give candies to a runner that you do not own" ); require( candyAmounts[i] == 1, "Your runner needs one and only one candy, who knows what could happen otherwise" ); dreamersCandies[tokenId] = (uint8(candies[i % 32]) & candyMask) + (uint8(candyIds[i]) % 4); _safeMint(_msgSender(), tokenId); if (i % 32 == 31) { candies = keccak256(abi.encodePacked(candies)); } } candyShop.burnBatch(_msgSender(), candyIds, candyAmounts); return true; } function mintBatchPublicSale(bytes calldata tokenIds) public payable nonReentrant whenPublicSaleActive returns (bool) { require( (tokenIds.length / 2) * MINT_PUBLIC_PRICE == msg.value, "You have to pay the bail bond" ); require( ERC721.balanceOf(_msgSender()) + tokenIds.length / 2 <= maxDreamersMintPublicSale, "Your home is to small to welcome so many dreamers" ); bytes32 candies = keccak256( abi.encodePacked( tokenIds, msg.sender, msg.value, block.timestamp, block.difficulty ) ); for (uint256 i = 0; i < tokenIds.length; i += 2) { uint16 tokenId = BytesLib.toUint16(tokenIds, i); dreamersCandies[tokenId] = uint8(candies[i / 2]); _safeMint(_msgSender(), tokenId); } return true; } function mintBatchFounders(bytes calldata tokenIds) public nonReentrant onlyOwner whenPublicSaleActive returns (bool) { require(!foundersMinted, "Don't be too greedy"); require( tokenIds.length <= MAX_MINT_FOUNDERS * 2, "Even if you are a founder, you don't deserve that many Dreamers" ); bytes32 candies = keccak256( abi.encodePacked( tokenIds, msg.sender, block.timestamp, block.difficulty ) ); for (uint256 i = 0; i < tokenIds.length / 2; i++) { uint16 tokenId = BytesLib.toUint16(tokenIds, i * 2); dreamersCandies[tokenId] = uint8(candies[i % 32]); _safeMint(_msgSender(), tokenId); if (i % 32 == 31) { candies = keccak256(abi.encodePacked(candies)); } } foundersMinted = true; return true; } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { require(_exists(_tokenId), "ERC721: URI query for nonexistent token"); if (renderingContractAddress == address(0)) { return ""; } return renderer.tokenURI(_tokenId, dreamersCandies[_tokenId]); } function getDreamersCandies() public view returns (uint8[10_000] memory) { return dreamersCandies; } function exists(uint256 _tokenId) external view returns (bool) { return _exists(_tokenId); } receive() external payable {} function withdraw() public onlyOwner { (bool success, ) = _msgSender().call{value: address(this).balance}(""); require(success, "Withdrawal failed"); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) 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 making 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 // OpenZeppelin Contracts v4.4.1 (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, 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 // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol) 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 // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Enumerable.sol) 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 // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; interface ICandyShop { function burnBatch( address from, uint256[] calldata tokenIds, uint256[] calldata amounts ) external; function burn( address from, uint256 tokenId, uint256 amount ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; interface IChainRunners { function getDna(uint256 _tokenId) external view returns (uint256); function ownerOf(uint256 tokenId) external view returns (address); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; interface IDreamersRenderer { function tokenURI(uint256 tokenId, uint8 candy) external view returns (string memory); }
// SPDX-License-Identifier: Unlicense /* * @title Solidity Bytes Arrays Utils * @author Gonçalo Sá <[email protected]> * * @dev Bytes tightly packed arrays utility library for ethereum contracts written in Solidity. * The library lets you concatenate, slice and type cast bytes arrays both in memory and storage. */ pragma solidity >=0.8.0 <0.9.0; library BytesLib { function concat( bytes memory _preBytes, bytes memory _postBytes ) internal pure returns (bytes memory) { bytes memory tempBytes; assembly { // Get a location of some free memory and store it in tempBytes as // Solidity does for memory variables. tempBytes := mload(0x40) // Store the length of the first bytes array at the beginning of // the memory for tempBytes. let length := mload(_preBytes) mstore(tempBytes, length) // Maintain a memory counter for the current write location in the // temp bytes array by adding the 32 bytes for the array length to // the starting location. let mc := add(tempBytes, 0x20) // Stop copying when the memory counter reaches the length of the // first bytes array. let end := add(mc, length) for { // Initialize a copy counter to the start of the _preBytes data, // 32 bytes into its memory. let cc := add(_preBytes, 0x20) } lt(mc, end) { // Increase both counters by 32 bytes each iteration. mc := add(mc, 0x20) cc := add(cc, 0x20) } { // Write the _preBytes data into the tempBytes memory 32 bytes // at a time. mstore(mc, mload(cc)) } // Add the length of _postBytes to the current length of tempBytes // and store it as the new length in the first 32 bytes of the // tempBytes memory. length := mload(_postBytes) mstore(tempBytes, add(length, mload(tempBytes))) // Move the memory counter back from a multiple of 0x20 to the // actual end of the _preBytes data. mc := end // Stop copying when the memory counter reaches the new combined // length of the arrays. end := add(mc, length) for { let cc := add(_postBytes, 0x20) } lt(mc, end) { mc := add(mc, 0x20) cc := add(cc, 0x20) } { mstore(mc, mload(cc)) } // Update the free-memory pointer by padding our last write location // to 32 bytes: add 31 bytes to the end of tempBytes to move to the // next 32 byte block, then round down to the nearest multiple of // 32. If the sum of the length of the two arrays is zero then add // one before rounding down to leave a blank 32 bytes (the length block with 0). mstore(0x40, and( add(add(end, iszero(add(length, mload(_preBytes)))), 31), not(31) // Round down to the nearest 32 bytes. )) } return tempBytes; } function concatStorage(bytes storage _preBytes, bytes memory _postBytes) internal { assembly { // Read the first 32 bytes of _preBytes storage, which is the length // of the array. (We don't need to use the offset into the slot // because arrays use the entire slot.) let fslot := sload(_preBytes.slot) // Arrays of 31 bytes or less have an even value in their slot, // while longer arrays have an odd value. The actual length is // the slot divided by two for odd values, and the lowest order // byte divided by two for even values. // If the slot is even, bitwise and the slot with 255 and divide by // two to get the length. If the slot is odd, bitwise and the slot // with -1 and divide by two. let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2) let mlength := mload(_postBytes) let newlength := add(slength, mlength) // slength can contain both the length and contents of the array // if length < 32 bytes so let's prepare for that // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage switch add(lt(slength, 32), lt(newlength, 32)) case 2 { // Since the new array still fits in the slot, we just need to // update the contents of the slot. // uint256(bytes_storage) = uint256(bytes_storage) + uint256(bytes_memory) + new_length sstore( _preBytes.slot, // all the modifications to the slot are inside this // next block add( // we can just add to the slot contents because the // bytes we want to change are the LSBs fslot, add( mul( div( // load the bytes from memory mload(add(_postBytes, 0x20)), // zero all bytes to the right exp(0x100, sub(32, mlength)) ), // and now shift left the number of bytes to // leave space for the length in the slot exp(0x100, sub(32, newlength)) ), // increase length by the double of the memory // bytes length mul(mlength, 2) ) ) ) } case 1 { // The stored value fits in the slot, but the combined value // will exceed it. // get the keccak hash to get the contents of the array mstore(0x0, _preBytes.slot) let sc := add(keccak256(0x0, 0x20), div(slength, 32)) // save new length sstore(_preBytes.slot, add(mul(newlength, 2), 1)) // The contents of the _postBytes array start 32 bytes into // the structure. Our first read should obtain the `submod` // bytes that can fit into the unused space in the last word // of the stored array. To get this, we read 32 bytes starting // from `submod`, so the data we read overlaps with the array // contents by `submod` bytes. Masking the lowest-order // `submod` bytes allows us to add that value directly to the // stored value. let submod := sub(32, slength) let mc := add(_postBytes, submod) let end := add(_postBytes, mlength) let mask := sub(exp(0x100, submod), 1) sstore( sc, add( and( fslot, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00 ), and(mload(mc), mask) ) ) for { mc := add(mc, 0x20) sc := add(sc, 1) } lt(mc, end) { sc := add(sc, 1) mc := add(mc, 0x20) } { sstore(sc, mload(mc)) } mask := exp(0x100, sub(mc, end)) sstore(sc, mul(div(mload(mc), mask), mask)) } default { // get the keccak hash to get the contents of the array mstore(0x0, _preBytes.slot) // Start copying to the last used word of the stored array. let sc := add(keccak256(0x0, 0x20), div(slength, 32)) // save new length sstore(_preBytes.slot, add(mul(newlength, 2), 1)) // Copy over the first `submod` bytes of the new data as in // case 1 above. let slengthmod := mod(slength, 32) let mlengthmod := mod(mlength, 32) let submod := sub(32, slengthmod) let mc := add(_postBytes, submod) let end := add(_postBytes, mlength) let mask := sub(exp(0x100, submod), 1) sstore(sc, add(sload(sc), and(mload(mc), mask))) for { sc := add(sc, 1) mc := add(mc, 0x20) } lt(mc, end) { sc := add(sc, 1) mc := add(mc, 0x20) } { sstore(sc, mload(mc)) } mask := exp(0x100, sub(mc, end)) sstore(sc, mul(div(mload(mc), mask), mask)) } } } function slice( bytes memory _bytes, uint256 _start, uint256 _length ) internal pure returns (bytes memory) { require(_length + 31 >= _length, "slice_overflow"); require(_bytes.length >= _start + _length, "slice_outOfBounds"); bytes memory tempBytes; assembly { switch iszero(_length) case 0 { // Get a location of some free memory and store it in tempBytes as // Solidity does for memory variables. tempBytes := mload(0x40) // The first word of the slice result is potentially a partial // word read from the original array. To read it, we calculate // the length of that partial word and start copying that many // bytes into the array. The first word we copy will start with // data we don't care about, but the last `lengthmod` bytes will // land at the beginning of the contents of the new array. When // we're done copying, we overwrite the full first word with // the actual length of the slice. let lengthmod := and(_length, 31) // The multiplication in the next line is necessary // because when slicing multiples of 32 bytes (lengthmod == 0) // the following copy loop was copying the origin's length // and then ending prematurely not copying everything it should. let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod))) let end := add(mc, _length) for { // The multiplication in the next line has the same exact purpose // as the one above. let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start) } lt(mc, end) { mc := add(mc, 0x20) cc := add(cc, 0x20) } { mstore(mc, mload(cc)) } mstore(tempBytes, _length) //update free-memory pointer //allocating the array padded to 32 bytes like the compiler does now mstore(0x40, and(add(mc, 31), not(31))) } //if we want a zero-length slice let's just return a zero-length array default { tempBytes := mload(0x40) //zero out the 32 bytes slice we are about to return //we need to do it because Solidity does not garbage collect mstore(tempBytes, 0) mstore(0x40, add(tempBytes, 0x20)) } } return tempBytes; } function toAddress(bytes memory _bytes, uint256 _start) internal pure returns (address) { require(_bytes.length >= _start + 20, "toAddress_outOfBounds"); address tempAddress; assembly { tempAddress := div(mload(add(add(_bytes, 0x20), _start)), 0x1000000000000000000000000) } return tempAddress; } function toUint8(bytes memory _bytes, uint256 _start) internal pure returns (uint8) { require(_bytes.length >= _start + 1 , "toUint8_outOfBounds"); uint8 tempUint; assembly { tempUint := mload(add(add(_bytes, 0x1), _start)) } return tempUint; } function toUint16(bytes memory _bytes, uint256 _start) internal pure returns (uint16) { require(_bytes.length >= _start + 2, "toUint16_outOfBounds"); uint16 tempUint; assembly { tempUint := mload(add(add(_bytes, 0x2), _start)) } return tempUint; } function toUint32(bytes memory _bytes, uint256 _start) internal pure returns (uint32) { require(_bytes.length >= _start + 4, "toUint32_outOfBounds"); uint32 tempUint; assembly { tempUint := mload(add(add(_bytes, 0x4), _start)) } return tempUint; } function toUint64(bytes memory _bytes, uint256 _start) internal pure returns (uint64) { require(_bytes.length >= _start + 8, "toUint64_outOfBounds"); uint64 tempUint; assembly { tempUint := mload(add(add(_bytes, 0x8), _start)) } return tempUint; } function toUint96(bytes memory _bytes, uint256 _start) internal pure returns (uint96) { require(_bytes.length >= _start + 12, "toUint96_outOfBounds"); uint96 tempUint; assembly { tempUint := mload(add(add(_bytes, 0xc), _start)) } return tempUint; } function toUint128(bytes memory _bytes, uint256 _start) internal pure returns (uint128) { require(_bytes.length >= _start + 16, "toUint128_outOfBounds"); uint128 tempUint; assembly { tempUint := mload(add(add(_bytes, 0x10), _start)) } return tempUint; } function toUint256(bytes memory _bytes, uint256 _start) internal pure returns (uint256) { require(_bytes.length >= _start + 32, "toUint256_outOfBounds"); uint256 tempUint; assembly { tempUint := mload(add(add(_bytes, 0x20), _start)) } return tempUint; } function toBytes32(bytes memory _bytes, uint256 _start) internal pure returns (bytes32) { require(_bytes.length >= _start + 32, "toBytes32_outOfBounds"); bytes32 tempBytes32; assembly { tempBytes32 := mload(add(add(_bytes, 0x20), _start)) } return tempBytes32; } function equal(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bool) { bool success = true; assembly { let length := mload(_preBytes) // if lengths don't match the arrays are not equal switch eq(length, mload(_postBytes)) case 1 { // cb is a circuit breaker in the for loop since there's // no said feature for inline assembly loops // cb = 1 - don't breaker // cb = 0 - break let cb := 1 let mc := add(_preBytes, 0x20) let end := add(mc, length) for { let cc := add(_postBytes, 0x20) // the next line is the loop condition: // while(uint256(mc < end) + cb == 2) } eq(add(lt(mc, end), cb), 2) { mc := add(mc, 0x20) cc := add(cc, 0x20) } { // if any of these checks fails then arrays are not equal if iszero(eq(mload(mc), mload(cc))) { // unsuccess: success := 0 cb := 0 } } } default { // unsuccess: success := 0 } } return success; } function equalStorage( bytes storage _preBytes, bytes memory _postBytes ) internal view returns (bool) { bool success = true; assembly { // we know _preBytes_offset is 0 let fslot := sload(_preBytes.slot) // Decode the length of the stored array like in concatStorage(). let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2) let mlength := mload(_postBytes) // if lengths don't match the arrays are not equal switch eq(slength, mlength) case 1 { // slength can contain both the length and contents of the array // if length < 32 bytes so let's prepare for that // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage if iszero(iszero(slength)) { switch lt(slength, 32) case 1 { // blank the last byte which is the length fslot := mul(div(fslot, 0x100), 0x100) if iszero(eq(fslot, mload(add(_postBytes, 0x20)))) { // unsuccess: success := 0 } } default { // cb is a circuit breaker in the for loop since there's // no said feature for inline assembly loops // cb = 1 - don't breaker // cb = 0 - break let cb := 1 // get the keccak hash to get the contents of the array mstore(0x0, _preBytes.slot) let sc := keccak256(0x0, 0x20) let mc := add(_postBytes, 0x20) let end := add(mc, mlength) // the next line is the loop condition: // while(uint256(mc < end) + cb == 2) for {} eq(add(lt(mc, end), cb), 2) { sc := add(sc, 1) mc := add(mc, 0x20) } { if iszero(eq(sload(sc), mload(mc))) { // unsuccess: success := 0 cb := 0 } } } } } default { // unsuccess: success := 0 } } return success; } }
{ "evmVersion": "london", "libraries": {}, "metadata": { "bytecodeHash": "ipfs", "useLiteralContent": true }, "optimizer": { "details": { "constantOptimizer": true, "cse": true, "deduplicate": true, "inliner": true, "jumpdestRemover": true, "orderLiterals": true, "peephole": true, "yul": true, "yulDetails": { "optimizerSteps": "dhfoDgvulfnTUtnIf", "stackAllocation": true } }, "runs": 2000 }, "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"address","name":"_rendererAddress","type":"address"},{"internalType":"address","name":"_chainRunnersAddress","type":"address"},{"internalType":"address","name":"_opensea","type":"address"},{"internalType":"address","name":"_looksrare","type":"address"},{"internalType":"uint256","name":"_maxDreamersMintPublicSale","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"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":"MAX_MINT_FOUNDERS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINT_PUBLIC_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"candyShopAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"chainRunnersAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"dreamersCandies","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"proxyAddress","type":"address"}],"name":"flipProxyState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"foundersMinted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDreamersCandies","outputs":[{"internalType":"uint8[10000]","name":"","type":"uint8[10000]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPublicSaleOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"looksrare","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"marketplacesApproved","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxDreamersMintPublicSale","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"tokenIds","type":"bytes"}],"name":"mintBatchFounders","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"tokenIds","type":"bytes"}],"name":"mintBatchPublicSale","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes","name":"tokenIds","type":"bytes"},{"internalType":"uint256[]","name":"candyIds","type":"uint256[]"},{"internalType":"uint256[]","name":"candyAmounts","type":"uint256[]"}],"name":"mintBatchRunnersAccess","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"opensea","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicSaleStartTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renderingContractAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"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":"address","name":"_candyShopContractAddress","type":"address"}],"name":"setCandyShopAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_chainRunnersContractAddress","type":"address"}],"name":"setChainRunnersContractAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"looksrare_","type":"address"}],"name":"setLooksrare","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxDreamersMintPublicSale","type":"uint256"}],"name":"setMaxDreamersMintPublicSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_ogs","type":"address[]"},{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"},{"internalType":"uint8[]","name":"_candies","type":"uint8[]"}],"name":"setOgs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"opensea_","type":"address"}],"name":"setOpensea","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"setPublicSaleTimestamp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_renderingContractAddress","type":"address"}],"name":"setRenderingContractAddress","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":[],"name":"toggleMarketplacesApproved","outputs":[],"stateMutability":"nonpayable","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":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
608060405261014c805460ff60a01b1916600160a01b17905561014f805460ff191660011790553480156200003357600080fd5b50604051620043543803806200435483398101604081905262000056916200047c565b8651879087906200006f9060009060208501906200024b565b508051620000859060019060208401906200024b565b505050620000a26200009c6200010760201b60201c565b6200010b565b6001600b55620000b2856200015d565b620000bd84620001bf565b61014b80546001600160a01b038086166001600160a01b03199283161790925561014c805492851692909116919091179055620000fa8162000218565b50505050505050620005e6565b3390565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600a546001600160a01b03163314620001935760405162461bcd60e51b81526004016200018a9062000564565b60405180910390fd5b600c80546001600160a01b039092166001600160a01b03199283168117909155600f8054909216179055565b600a546001600160a01b03163314620001ec5760405162461bcd60e51b81526004016200018a9062000564565b600e80546001600160a01b039092166001600160a01b0319928316811790915560118054909216179055565b600a546001600160a01b03163314620002455760405162461bcd60e51b81526004016200018a9062000564565b61014e55565b8280546200025990620005b5565b90600052602060002090601f0160209004810192826200027d5760008555620002c8565b82601f106200029857805160ff1916838001178555620002c8565b82800160010185558215620002c8579182015b82811115620002c8578251825591602001919060010190620002ab565b50620002d6929150620002da565b5090565b5b80821115620002d65760008155600101620002db565b634e487b7160e01b600052604160045260246000fd5b601f19601f83011681016001600160401b03811182821017156200032f576200032f620002f1565b6040525050565b60006200034260405190565b905062000350828262000307565b919050565b60006001600160401b03821115620003715762000371620002f1565b601f19601f83011660200192915050565b60005b838110156200039f57818101518382015260200162000385565b83811115620003af576000848401525b50505050565b6000620003cc620003c68462000355565b62000336565b905082815260208101848484011115620003e957620003e9600080fd5b620003f684828562000382565b509392505050565b600082601f830112620004145762000414600080fd5b815162000426848260208601620003b5565b949350505050565b60006001600160a01b0382165b92915050565b6200044c816200042e565b81146200045857600080fd5b50565b80516200043b8162000441565b806200044c565b80516200043b8162000468565b600080600080600080600060e0888a0312156200049c576200049c600080fd5b87516001600160401b03811115620004b757620004b7600080fd5b620004c58a828b01620003fe565b60208a015190985090506001600160401b03811115620004e857620004e8600080fd5b620004f68a828b01620003fe565b9650506040620005098a828b016200045b565b95505060606200051c8a828b016200045b565b94505060806200052f8a828b016200045b565b93505060a0620005428a828b016200045b565b92505060c0620005558a828b016200046f565b91505092959891949750929550565b60208082528181019081527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726040830152606082016200043b565b634e487b7160e01b600052602260045260246000fd5b600281046001821680620005ca57607f821691505b60208210811415620005e057620005e06200059f565b50919050565b613d5e80620005f66000396000f3fe6080604052600436106103175760003560e01c8063715018a61161019a578063bfb97416116100e1578063e985e9c51161008a578063f4b9942411610064578063f4b99424146108ac578063f73c814b146108bf578063fac91323146108df57600080fd5b8063e985e9c514610851578063f0658ac914610871578063f2fde38b1461088c57600080fd5b8063cb95f069116100bb578063cb95f069146107fa578063d3d6005b1461081a578063d7822c991461083a57600080fd5b8063bfb9741614610798578063c074f412146107ba578063c87b56dd146107da57600080fd5b80639c51792a11610143578063b5fcb3391161011d578063b5fcb33914610738578063b776c8a614610758578063b88d4fde1461077857600080fd5b80639c51792a146106dc578063a22cb465146106f7578063a8e90b571461071757600080fd5b80639343eaa6116101745780639343eaa61461068757806395d89b41146106a75780639b970888146106bc57600080fd5b8063715018a6146106345780638392d804146106495780638da5cb5b1461066957600080fd5b80632f745c591161025e578063511a9605116102075780636352211e116101e15780636352211e146105dd5780636b318e6e146105fd57806370a082311461061457600080fd5b8063511a96051461056f578063511ed3821461058f578063633574db146105b057600080fd5b806342842e0e1161023857806342842e0e1461050f5780634f558e791461052f5780634f6ccce71461054f57600080fd5b80632f745c59146104c557806333c12e17146104e55780633ccfd60b146104fa57600080fd5b806312b40a9f116102c05780631e8858fb1161029a5780631e8858fb1461047057806322afee071461049057806323b872dd146104a557600080fd5b806312b40a9f1461041d57806318160ddd1461043d5780631a6949e31461045b57600080fd5b8063081812fc116102f1578063081812fc146103ae578063095ea7b3146103db5780630d77c756146103fd57600080fd5b806301ffc9a714610323578063026ae1021461035957806306fdde031461038c57600080fd5b3661031e57005b600080fd5b34801561032f57600080fd5b5061034361033e3660046125fb565b6108ff565b6040516103509190612626565b60405180910390f35b34801561036557600080fd5b5061014c546103439074010000000000000000000000000000000000000000900460ff1681565b34801561039857600080fd5b506103a161095b565b6040516103509190612692565b3480156103ba57600080fd5b506103ce6103c93660046126b4565b6109ed565b60405161035091906126ef565b3480156103e757600080fd5b506103fb6103f6366004612711565b610a46565b005b34801561040957600080fd5b506103fb6104183660046126b4565b610acc565b34801561042957600080fd5b506103fb61043836600461274e565b610afc565b34801561044957600080fd5b506008545b6040516103509190612775565b34801561046757600080fd5b50610343610b5f565b34801561047c57600080fd5b506103fb61048b36600461274e565b610b7a565b34801561049c57600080fd5b5061044e603281565b3480156104b157600080fd5b506103fb6104c0366004612783565b610bd4565b3480156104d157600080fd5b5061044e6104e0366004612711565b610c05565b3480156104f157600080fd5b506103fb610c57565b34801561050657600080fd5b506103fb610ccf565b34801561051b57600080fd5b506103fb61052a366004612783565b610d64565b34801561053b57600080fd5b5061034361054a3660046126b4565b610d7f565b34801561055b57600080fd5b5061044e61056a3660046126b4565b610d9e565b34801561057b57600080fd5b506103fb61058a3660046126b4565b610dec565b34801561059b57600080fd5b5061014b546103ce906001600160a01b031681565b3480156105bc57600080fd5b506105d06105cb3660046126b4565b610e1c565b60405161035091906127dc565b3480156105e957600080fd5b506103ce6105f83660046126b4565b610e47565b34801561060957600080fd5b5061044e61014e5481565b34801561062057600080fd5b5061044e61062f36600461274e565b610e7c565b34801561064057600080fd5b506103fb610ec0565b34801561065557600080fd5b50600e546103ce906001600160a01b031681565b34801561067557600080fd5b50600a546001600160a01b03166103ce565b34801561069357600080fd5b506103436106a236600461283c565b610ef6565b3480156106b357600080fd5b506103a161112e565b3480156106c857600080fd5b506103fb6106d7366004612a83565b61113d565b3480156106e857600080fd5b5061044e66b1a2bc2ec5000081565b34801561070357600080fd5b506103fb610712366004612b2c565b61122f565b34801561072357600080fd5b5061014c546103ce906001600160a01b031681565b34801561074457600080fd5b506103fb61075336600461274e565b61123e565b34801561076457600080fd5b506103fb61077336600461274e565b6112a1565b34801561078457600080fd5b506103fb610793366004612bf6565b6112fb565b3480156107a457600080fd5b506107ad61132d565b6040516103509190612cbf565b3480156107c657600080fd5b50600c546103ce906001600160a01b031681565b3480156107e657600080fd5b506103a16107f53660046126b4565b611388565b34801561080657600080fd5b50610343610815366004612d1a565b611490565b34801561082657600080fd5b506103fb61083536600461274e565b6117cc565b34801561084657600080fd5b5061044e6101505481565b34801561085d57600080fd5b5061034361086c366004612dc7565b61182f565b34801561087d57600080fd5b5061014f546103439060ff1681565b34801561089857600080fd5b506103fb6108a736600461274e565b6119a6565b6103436108ba36600461283c565b6119ff565b3480156108cb57600080fd5b506103fb6108da36600461274e565b611bd0565b3480156108eb57600080fd5b50600d546103ce906001600160a01b031681565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f780e9d63000000000000000000000000000000000000000000000000000000001480610955575061095582611c24565b92915050565b60606000805461096a90612e10565b80601f016020809104026020016040519081016040528092919081815260200182805461099690612e10565b80156109e35780601f106109b8576101008083540402835291602001916109e3565b820191906000526020600020905b8154815290600101906020018083116109c657829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610a2a5760405162461bcd60e51b8152600401610a2190612e97565b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610a5182610e47565b9050806001600160a01b0316836001600160a01b03161415610a855760405162461bcd60e51b8152600401610a2190612eff565b336001600160a01b0382161480610aa15750610aa1813361182f565b610abd5760405162461bcd60e51b8152600401610a2190612f67565b610ac78383611d07565b505050565b600a546001600160a01b03163314610af65760405162461bcd60e51b8152600401610a2190612fa7565b61014e55565b600a546001600160a01b03163314610b265760405162461bcd60e51b8152600401610a2190612fa7565b600c80546001600160a01b0390921673ffffffffffffffffffffffffffffffffffffffff199283168117909155600f8054909216179055565b60006101505442118015610b7557506101505415155b905090565b600a546001600160a01b03163314610ba45760405162461bcd60e51b8152600401610a2190612fa7565b61014c805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b610bde3382611d82565b610bfa5760405162461bcd60e51b8152600401610a219061300f565b610ac7838383611e14565b6000610c1083610e7c565b8210610c2e5760405162461bcd60e51b8152600401610a2190613077565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b600a546001600160a01b03163314610c815760405162461bcd60e51b8152600401610a2190612fa7565b61014c80547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff8116740100000000000000000000000000000000000000009182900460ff1615909102179055565b600a546001600160a01b03163314610cf95760405162461bcd60e51b8152600401610a2190612fa7565b604051600090339047908381818185875af1925050503d8060008114610d3b576040519150601f19603f3d011682016040523d82523d6000602084013e610d40565b606091505b5050905080610d615760405162461bcd60e51b8152600401610a21906130b9565b50565b610ac7838383604051806020016040528060008152506112fb565b6000818152600260205260408120546001600160a01b03161515610955565b6000610da960085490565b8210610dc75760405162461bcd60e51b8152600401610a2190613121565b60088281548110610dda57610dda613131565b90600052602060002001549050919050565b600a546001600160a01b03163314610e165760405162461bcd60e51b8152600401610a2190612fa7565b61015055565b6012816127108110610e2d57600080fd5b60209182820401919006915054906101000a900460ff1681565b6000818152600260205260408120546001600160a01b0316806109555760405162461bcd60e51b8152600401610a219061319f565b60006001600160a01b038216610ea45760405162461bcd60e51b8152600401610a2190613207565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b03163314610eea5760405162461bcd60e51b8152600401610a2190612fa7565b610ef46000611f4e565b565b60006002600b541415610f1b5760405162461bcd60e51b8152600401610a2190613249565b6002600b55600a546001600160a01b03163314610f4a5760405162461bcd60e51b8152600401610a2190612fa7565b610f52610b5f565b610f6e5760405162461bcd60e51b8152600401610a219061328b565b61014f5460ff1615610f925760405162461bcd60e51b8152600401610a21906132cd565b610f9e603260026132f3565b821115610fbd5760405162461bcd60e51b8152600401610a219061336a565b60008383334244604051602001610fd89594939291906133b5565b60405160208183030381529060405280519060200120905060005b610ffe600285613408565b81101561110e57600061105386868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061104e9250869150600290506132f3565b611fad565b90508261106160208461341c565b6020811061107157611071613131565b1a601261ffff8316612710811061108a5761108a613131565b602091828204019190066101000a81548160ff021916908360ff1602179055506110be6110b43390565b8261ffff16611fe3565b6110c960208361341c565b601f14156110fb57826040516020016110e29190613434565b6040516020818303038152906040528051906020012092505b508061110681613446565b915050610ff3565b505061014f805460ff1916600190811790915590506001600b5592915050565b60606001805461096a90612e10565b600a546001600160a01b031633146111675760405162461bcd60e51b8152600401610a2190612fa7565b60005b8351811015611229576111af84828151811061118857611188613131565b60200260200101518483815181106111a2576111a2613131565b6020026020010151611fe3565b8181815181106111c1576111c1613131565b602002602001015160128483815181106111dd576111dd613131565b602002602001015161271081106111f6576111f6613131565b602091828204019190066101000a81548160ff021916908360ff160217905550808061122190613446565b91505061116a565b50505050565b61123a338383611ffd565b5050565b600a546001600160a01b031633146112685760405162461bcd60e51b8152600401610a2190612fa7565b600d80546001600160a01b0390921673ffffffffffffffffffffffffffffffffffffffff19928316811790915560108054909216179055565b600a546001600160a01b031633146112cb5760405162461bcd60e51b8152600401610a2190612fa7565b61014b805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6113053383611d82565b6113215760405162461bcd60e51b8152600401610a219061300f565b611229848484846120a0565b6113356125a0565b604080516204e2008101918290529060129061271090826000855b825461010083900a900460ff168152602060019283018181049485019490930390920291018084116113505790505050505050905090565b6000818152600260205260409020546060906001600160a01b03166113bf5760405162461bcd60e51b8152600401610a21906134b9565b600c546001600160a01b03166113e357505060408051602081019091526000815290565b600f546001600160a01b0316635cc518ba83601281612710811061140957611409613131565b602091828204019190069054906101000a900460ff166040518363ffffffff1660e01b815260040161143c9291906134c9565b60006040518083038186803b15801561145457600080fd5b505afa158015611468573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610955919081019061353c565b60006002600b5414156114b55760405162461bcd60e51b8152600401610a2190613249565b6002600b8190556114c79085906132f3565b86146114e55760405162461bcd60e51b8152600401610a21906135cf565b600087873388884244604051602001611504979695949392919061362c565b60405160208183030381529060405280519060200120905060005b8581101561174f5760006115708a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061104e9250869150600290506132f3565b6011546040517f6352211e00000000000000000000000000000000000000000000000000000000815291925033916001600160a01b0390911690636352211e906115be908590600401613691565b60206040518083038186803b1580156115d657600080fd5b505afa1580156115ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061160e91906136aa565b6001600160a01b0316146116345760405162461bcd60e51b8152600401610a2190613723565b85858381811061164657611646613131565b9050602002013560011461166c5760405162461bcd60e51b8152600401610a2190613733565b600488888481811061168057611680613131565b9050602002013561169191906137ba565b60fc8461169f60208661341c565b602081106116af576116af613131565b6116bd939291901a166137c7565b60128261ffff1661271081106116d5576116d5613131565b602091828204019190066101000a81548160ff021916908360ff1602179055506116ff6110b43390565b61170a60208361341c565b601f141561173c57826040516020016117239190613434565b6040516020818303038152906040528051906020012092505b508061174781613446565b91505061151f565b506010546001600160a01b0316636b20c45433888888886040518663ffffffff1660e01b81526004016117869594939291906137f4565b600060405180830381600087803b1580156117a057600080fd5b505af11580156117b4573d6000803e3d6000fd5b5050505060019150506001600b559695505050505050565b600a546001600160a01b031633146117f65760405162461bcd60e51b8152600401610a2190612fa7565b600e80546001600160a01b0390921673ffffffffffffffffffffffffffffffffffffffff19928316811790915560118054909216179055565b61014c5460009074010000000000000000000000000000000000000000900460ff1661188457506001600160a01b0382811660009081526005602090815260408083209385168352929052205460ff16610955565b61014b546040517fc45527910000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063c4552791906118ce9086906004016126ef565b60206040518083038186803b1580156118e657600080fd5b505afa1580156118fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061191e9190613854565b6001600160a01b0316826001600160a01b0316148061194b575061014c546001600160a01b038381169116145b8061196f57506001600160a01b038216600090815261014d602052604090205460ff165b8061199f57506001600160a01b0380841660009081526005602090815260408083209386168352929052205460ff165b9392505050565b600a546001600160a01b031633146119d05760405162461bcd60e51b8152600401610a2190612fa7565b6001600160a01b0381166119f65760405162461bcd60e51b8152600401610a21906138cd565b610d6181611f4e565b60006002600b541415611a245760405162461bcd60e51b8152600401610a2190613249565b6002600b55611a31610b5f565b611a4d5760405162461bcd60e51b8152600401610a219061328b565b3466b1a2bc2ec50000611a61600285613408565b611a6b91906132f3565b14611a885760405162461bcd60e51b8152600401610a219061390f565b61014e54611a97600284613408565b611aa033610e7c565b611aaa919061391f565b1115611ac85760405162461bcd60e51b8152600401610a219061398a565b6000838333344244604051602001611ae59695949392919061399a565b60405160208183030381529060405280519060200120905060005b83811015611bbf576000611b4b86868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250869250611fad915050565b905082611b59600284613408565b60208110611b6957611b69613131565b1a601261ffff83166127108110611b8257611b82613131565b602091828204019190066101000a81548160ff021916908360ff160217905550611bac6110b43390565b50611bb860028261391f565b9050611b00565b5060019150506001600b5592915050565b600a546001600160a01b03163314611bfa5760405162461bcd60e51b8152600401610a2190612fa7565b6001600160a01b0316600090815261014d60205260409020805460ff19811660ff90911615179055565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd000000000000000000000000000000000000000000000000000000001480611cb757507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b8061095557507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610955565b6000818152600460205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384169081179091558190611d4982610e47565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b0316611db65760405162461bcd60e51b8152600401610a2190613a3d565b6000611dc183610e47565b9050806001600160a01b0316846001600160a01b03161480611dfc5750836001600160a01b0316611df1846109ed565b6001600160a01b0316145b80611e0c5750611e0c818561182f565b949350505050565b826001600160a01b0316611e2782610e47565b6001600160a01b031614611e4d5760405162461bcd60e51b8152600401610a2190613aa5565b6001600160a01b038216611e735760405162461bcd60e51b8152600401610a2190613b0d565b611e7e8383836120d3565b611e89600082611d07565b6001600160a01b0383166000908152600360205260408120805460019290611eb2908490613b1d565b90915550506001600160a01b0382166000908152600360205260408120805460019290611ee090849061391f565b9091555050600081815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600a80546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000611fba82600261391f565b83511015611fda5760405162461bcd60e51b8152600401610a2190613b66565b50016002015190565b61123a82826040518060200160405280600081525061218b565b816001600160a01b0316836001600160a01b0316141561202f5760405162461bcd60e51b8152600401610a2190613ba8565b6001600160a01b0383811660008181526005602090815260408083209487168084529490915290819020805460ff1916851515179055517f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3190612093908590612626565b60405180910390a3505050565b6120ab848484611e14565b6120b7848484846121be565b6112295760405162461bcd60e51b8152600401610a2190613c10565b6001600160a01b03831661212e5761212981600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b612151565b816001600160a01b0316836001600160a01b031614612151576121518382612315565b6001600160a01b03821661216857610ac7816123b2565b826001600160a01b0316826001600160a01b031614610ac757610ac78282612461565b61219583836124a5565b6121a260008484846121be565b610ac75760405162461bcd60e51b8152600401610a2190613c10565b60006001600160a01b0384163b1561230a576040517f150b7a020000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063150b7a029061221b903390899088908890600401613c20565b602060405180830381600087803b15801561223557600080fd5b505af1925050508015612265575060408051601f3d908101601f1916820190925261226291810190613c6f565b60015b6122bf573d808015612293576040519150601f19603f3d011682016040523d82523d6000602084013e612298565b606091505b5080516122b75760405162461bcd60e51b8152600401610a2190613c10565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a0200000000000000000000000000000000000000000000000000000000149050611e0c565b506001949350505050565b6000600161232284610e7c565b61232c9190613b1d565b60008381526007602052604090205490915080821461237f576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906123c490600190613b1d565b600083815260096020526040812054600880549394509092849081106123ec576123ec613131565b90600052602060002001549050806008838154811061240d5761240d613131565b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061244557612445613c90565b6001900381819060005260206000200160009055905550505050565b600061246c83610e7c565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160a01b0382166124cb5760405162461bcd60e51b8152600401610a2190613cd6565b6000818152600260205260409020546001600160a01b0316156125005760405162461bcd60e51b8152600401610a2190613d18565b61250c600083836120d3565b6001600160a01b038216600090815260036020526040812080546001929061253590849061391f565b9091555050600081815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b604051806204e2000160405280612710906020820280368337509192915050565b7fffffffff0000000000000000000000000000000000000000000000000000000081165b8114610d6157600080fd5b8035610955816125c1565b60006020828403121561261057612610600080fd5b6000611e0c84846125f0565b8015155b82525050565b60208101610955828461261c565b60005b8381101561264f578181015183820152602001612637565b838111156112295750506000910152565b600061266a825190565b808452602084019350612681818560208601612634565b601f01601f19169290920192915050565b6020808252810161199f8184612660565b806125e5565b8035610955816126a3565b6000602082840312156126c9576126c9600080fd5b6000611e0c84846126a9565b60006001600160a01b038216610955565b612620816126d5565b6020810161095582846126e6565b6125e5816126d5565b8035610955816126fd565b6000806040838503121561272757612727600080fd5b60006127338585612706565b9250506020612744858286016126a9565b9150509250929050565b60006020828403121561276357612763600080fd5b6000611e0c8484612706565b80612620565b60208101610955828461276f565b60008060006060848603121561279b5761279b600080fd5b60006127a78686612706565b93505060206127b886828701612706565b92505060406127c9868287016126a9565b9150509250925092565b60ff8116612620565b6020810161095582846127d3565b60008083601f8401126127ff576127ff600080fd5b50813567ffffffffffffffff81111561281a5761281a600080fd5b60208301915083600182028301111561283557612835600080fd5b9250929050565b6000806020838503121561285257612852600080fd5b823567ffffffffffffffff81111561286c5761286c600080fd5b612878858286016127ea565b92509250509250929050565b634e487b7160e01b600052604160045260246000fd5b601f19601f830116810181811067ffffffffffffffff821117156128c0576128c0612884565b6040525050565b60006128d260405190565b90506128de828261289a565b919050565b600067ffffffffffffffff8211156128fd576128fd612884565b5060209081020190565b600061291a612915846128e3565b6128c7565b8381529050602080820190840283018581111561293957612939600080fd5b835b8181101561295b5761294d8782612706565b83526020928301920161293b565b5050509392505050565b600082601f83011261297957612979600080fd5b8135611e0c848260208601612907565b6000612997612915846128e3565b838152905060208082019084028301858111156129b6576129b6600080fd5b835b8181101561295b576129ca87826126a9565b8352602092830192016129b8565b600082601f8301126129ec576129ec600080fd5b8135611e0c848260208601612989565b60ff81166125e5565b8035610955816129fc565b6000612a1e612915846128e3565b83815290506020808201908402830185811115612a3d57612a3d600080fd5b835b8181101561295b57612a518782612a05565b835260209283019201612a3f565b600082601f830112612a7357612a73600080fd5b8135611e0c848260208601612a10565b600080600060608486031215612a9b57612a9b600080fd5b833567ffffffffffffffff811115612ab557612ab5600080fd5b612ac186828701612965565b935050602084013567ffffffffffffffff811115612ae157612ae1600080fd5b612aed868287016129d8565b925050604084013567ffffffffffffffff811115612b0d57612b0d600080fd5b6127c986828701612a5f565b8015156125e5565b803561095581612b19565b60008060408385031215612b4257612b42600080fd5b6000612b4e8585612706565b925050602061274485828601612b21565b600067ffffffffffffffff821115612b7957612b79612884565b601f19601f83011660200192915050565b82818337506000910152565b6000612ba461291584612b5f565b905082815260208101848484011115612bbf57612bbf600080fd5b612bca848285612b8a565b509392505050565b600082601f830112612be657612be6600080fd5b8135611e0c848260208601612b96565b60008060008060808587031215612c0f57612c0f600080fd5b6000612c1b8787612706565b9450506020612c2c87828801612706565b9350506040612c3d878288016126a9565b925050606085013567ffffffffffffffff811115612c5d57612c5d600080fd5b612c6987828801612bd2565b91505092959194509250565b612c7f82826127d3565b5060200190565b60200190565b6127108160005b82811015612cb8578151612ca78682612c75565b955050602082019150600101612c93565b5050505050565b6204e20081016109558284612c8c565b60008083601f840112612ce457612ce4600080fd5b50813567ffffffffffffffff811115612cff57612cff600080fd5b60208301915083602082028301111561283557612835600080fd5b60008060008060008060608789031215612d3657612d36600080fd5b863567ffffffffffffffff811115612d5057612d50600080fd5b612d5c89828a016127ea565b9650965050602087013567ffffffffffffffff811115612d7e57612d7e600080fd5b612d8a89828a01612ccf565b9450945050604087013567ffffffffffffffff811115612dac57612dac600080fd5b612db889828a01612ccf565b92509250509295509295509295565b60008060408385031215612ddd57612ddd600080fd5b6000612de98585612706565b925050602061274485828601612706565b634e487b7160e01b600052602260045260246000fd5b600281046001821680612e2457607f821691505b60208210811415612e3757612e37612dfa565b50919050565b602c8152602081017f4552433732313a20617070726f76656420717565727920666f72206e6f6e657881527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015290505b60400190565b6020808252810161095581612e3d565b60218152602081017f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6581527f720000000000000000000000000000000000000000000000000000000000000060208201529050612e91565b6020808252810161095581612ea7565b60388152602081017f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7781527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060208201529050612e91565b6020808252810161095581612f0f565b60208082527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65729101908152612c86565b6020808252810161095581612f77565b60318152602081017f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f81527f776e6572206e6f7220617070726f76656400000000000000000000000000000060208201529050612e91565b6020808252810161095581612fb7565b602b8152602081017f455243373231456e756d657261626c653a206f776e657220696e646578206f7581527f74206f6620626f756e647300000000000000000000000000000000000000000060208201529050612e91565b602080825281016109558161301f565b60118152602081017f5769746864726177616c206661696c656400000000000000000000000000000081529050612c86565b6020808252810161095581613087565b602c8152602081017f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f81527f7574206f6620626f756e6473000000000000000000000000000000000000000060208201529050612e91565b60208082528101610955816130c9565b634e487b7160e01b600052603260045260246000fd5b60298152602081017f4552433732313a206f776e657220717565727920666f72206e6f6e657869737481527f656e7420746f6b656e000000000000000000000000000000000000000000000060208201529050612e91565b6020808252810161095581613147565b602a8152602081017f4552433732313a2062616c616e636520717565727920666f7220746865207a6581527f726f20616464726573730000000000000000000000000000000000000000000060208201529050612e91565b60208082528101610955816131af565b601f8152602081017f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081529050612c86565b6020808252810161095581613217565b60148152602081017f5075626c69632073616c65206e6f74206f70656e00000000000000000000000081529050612c86565b6020808252810161095581613259565b60138152602081017f446f6e277420626520746f6f206772656564790000000000000000000000000081529050612c86565b602080825281016109558161329b565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561330d5761330d6132dd565b500290565b603f8152602081017f4576656e20696620796f7520617265206120666f756e6465722c20796f75206481527f6f6e277420646573657276652074686174206d616e7920447265616d6572730060208201529050612e91565b6020808252810161095581613312565b613385828483612b8a565b500190565b60006109558260601b90565b60006109558261338a565b6126206133ad826126d5565b613396565b90565b6133c081868861337a565b90506133cc81856133a1565b6014016133d9818461276f565b6020016133e6818361276f565b60200195945050505050565b634e487b7160e01b600052601260045260246000fd5b600082613417576134176133f2565b500490565b815b915060008261342f5761342f6133f2565b500690565b61343e818361276f565b602001919050565b600060001982141561345a5761345a6132dd565b5060010190565b60278152602081017f4552433732313a2055524920717565727920666f72206e6f6e6578697374656e81527f7420746f6b656e0000000000000000000000000000000000000000000000000060208201529050612e91565b6020808252810161095581613461565b604081016134d7828561276f565b61199f60208301846127d3565b60006134f261291584612b5f565b90508281526020810184848401111561350d5761350d600080fd5b612bca848285612634565b600082601f83011261352c5761352c600080fd5b8151611e0c8482602086016134e4565b60006020828403121561355157613551600080fd5b815167ffffffffffffffff81111561356b5761356b600080fd5b611e0c84828501613518565b60288152602081017f456163682072756e6e6572206e65656473206f6e6520616e64206f6e6c79206f81527f6e652063616e647900000000000000000000000000000000000000000000000060208201529050612e91565b6020808252810161095581613577565b825b925060007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83111561361557613615600080fd5b602083029250613626838584612b8a565b50500190565b61363781888a61337a565b905061364381876133a1565b6014016136518185876135df565b905061365d818461276f565b60200161366a818361276f565b602001979650505050505050565b60006109556133b261ffff841681565b61262081613678565b602081016109558284613688565b8051610955816126fd565b6000602082840312156136bf576136bf600080fd5b6000611e0c848461369f565b60378152602081017f596f752063616e6e6f7420676976652063616e6469657320746f20612072756e81527f6e6572207468617420796f7520646f206e6f74206f776e00000000000000000060208201529050612e91565b60208082528101610955816136cb565b6020808252810161095581604f81527f596f75722072756e6e6572206e65656473206f6e6520616e64206f6e6c79206f60208201527f6e652063616e64792c2077686f206b6e6f7773207768617420636f756c64206860408201527f617070656e206f74686572776973650000000000000000000000000000000000606082015260800190565b60ff90811690821661341e565b60ff8116905060ff8216915060008260ff03821115613385576133856132dd565b818352602083016135e1565b6060810161380282886126e6565b81810360208301526138158186886137e8565b9050818103604083015261382a8184866137e8565b979650505050505050565b6000610955826126d5565b6125e581613835565b805161095581613840565b60006020828403121561386957613869600080fd5b6000611e0c8484613849565b60268152602081017f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181527f646472657373000000000000000000000000000000000000000000000000000060208201529050612e91565b6020808252810161095581613875565b601d8152602081017f596f75206861766520746f2070617920746865206261696c20626f6e6400000081529050612c86565b60208082528101610955816138dd565b60008219821115613385576133856132dd565b60318152602081017f596f757220686f6d6520697320746f20736d616c6c20746f2077656c636f6d6581527f20736f206d616e7920647265616d65727300000000000000000000000000000060208201529050612e91565b6020808252810161095581613932565b6139a581878961337a565b90506139b181866133a1565b6014016139be818561276f565b6020016139cb818461276f565b6020016139d8818361276f565b6020019695505050505050565b602c8152602081017f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657881527f697374656e7420746f6b656e000000000000000000000000000000000000000060208201529050612e91565b60208082528101610955816139e5565b60298152602081017f4552433732313a207472616e73666572206f6620746f6b656e2074686174206981527f73206e6f74206f776e000000000000000000000000000000000000000000000060208201529050612e91565b6020808252810161095581613a4d565b60248152602081017f4552433732313a207472616e7366657220746f20746865207a65726f2061646481527f726573730000000000000000000000000000000000000000000000000000000060208201529050612e91565b6020808252810161095581613ab5565b600082821015613b2f57613b2f6132dd565b500390565b60148152602081017f746f55696e7431365f6f75744f66426f756e647300000000000000000000000081529050612c86565b6020808252810161095581613b34565b60198152602081017f4552433732313a20617070726f766520746f2063616c6c65720000000000000081529050612c86565b6020808252810161095581613b76565b60328152602081017f4552433732313a207472616e7366657220746f206e6f6e20455243373231526581527f63656976657220696d706c656d656e746572000000000000000000000000000060208201529050612e91565b6020808252810161095581613bb8565b60808101613c2e82876126e6565b613c3b60208301866126e6565b613c48604083018561276f565b8181036060830152613c5a8184612660565b9695505050505050565b8051610955816125c1565b600060208284031215613c8457613c84600080fd5b6000611e0c8484613c64565b634e487b7160e01b600052603160045260246000fd5b60208082527f4552433732313a206d696e7420746f20746865207a65726f20616464726573739101908152612c86565b6020808252810161095581613ca6565b601c8152602081017f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000081529050612c86565b6020808252810161095581613ce656fea2646970667358221220c856cbcffe9e33863a98e3a3b7f85466c5eaeffcf57c92bce271e4d7922715b864736f6c6343000808003300000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001200000000000000000000000004c57375508d5ccd4ba7329db4389991413930ea600000000000000000000000097597002980134bea46250aa0510c9b90d87a587000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1000000000000000000000000f42aa99f011a1fa7cda90e5e98b277e306bca83e0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000e436861696e20447265616d65727300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034452450000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106103175760003560e01c8063715018a61161019a578063bfb97416116100e1578063e985e9c51161008a578063f4b9942411610064578063f4b99424146108ac578063f73c814b146108bf578063fac91323146108df57600080fd5b8063e985e9c514610851578063f0658ac914610871578063f2fde38b1461088c57600080fd5b8063cb95f069116100bb578063cb95f069146107fa578063d3d6005b1461081a578063d7822c991461083a57600080fd5b8063bfb9741614610798578063c074f412146107ba578063c87b56dd146107da57600080fd5b80639c51792a11610143578063b5fcb3391161011d578063b5fcb33914610738578063b776c8a614610758578063b88d4fde1461077857600080fd5b80639c51792a146106dc578063a22cb465146106f7578063a8e90b571461071757600080fd5b80639343eaa6116101745780639343eaa61461068757806395d89b41146106a75780639b970888146106bc57600080fd5b8063715018a6146106345780638392d804146106495780638da5cb5b1461066957600080fd5b80632f745c591161025e578063511a9605116102075780636352211e116101e15780636352211e146105dd5780636b318e6e146105fd57806370a082311461061457600080fd5b8063511a96051461056f578063511ed3821461058f578063633574db146105b057600080fd5b806342842e0e1161023857806342842e0e1461050f5780634f558e791461052f5780634f6ccce71461054f57600080fd5b80632f745c59146104c557806333c12e17146104e55780633ccfd60b146104fa57600080fd5b806312b40a9f116102c05780631e8858fb1161029a5780631e8858fb1461047057806322afee071461049057806323b872dd146104a557600080fd5b806312b40a9f1461041d57806318160ddd1461043d5780631a6949e31461045b57600080fd5b8063081812fc116102f1578063081812fc146103ae578063095ea7b3146103db5780630d77c756146103fd57600080fd5b806301ffc9a714610323578063026ae1021461035957806306fdde031461038c57600080fd5b3661031e57005b600080fd5b34801561032f57600080fd5b5061034361033e3660046125fb565b6108ff565b6040516103509190612626565b60405180910390f35b34801561036557600080fd5b5061014c546103439074010000000000000000000000000000000000000000900460ff1681565b34801561039857600080fd5b506103a161095b565b6040516103509190612692565b3480156103ba57600080fd5b506103ce6103c93660046126b4565b6109ed565b60405161035091906126ef565b3480156103e757600080fd5b506103fb6103f6366004612711565b610a46565b005b34801561040957600080fd5b506103fb6104183660046126b4565b610acc565b34801561042957600080fd5b506103fb61043836600461274e565b610afc565b34801561044957600080fd5b506008545b6040516103509190612775565b34801561046757600080fd5b50610343610b5f565b34801561047c57600080fd5b506103fb61048b36600461274e565b610b7a565b34801561049c57600080fd5b5061044e603281565b3480156104b157600080fd5b506103fb6104c0366004612783565b610bd4565b3480156104d157600080fd5b5061044e6104e0366004612711565b610c05565b3480156104f157600080fd5b506103fb610c57565b34801561050657600080fd5b506103fb610ccf565b34801561051b57600080fd5b506103fb61052a366004612783565b610d64565b34801561053b57600080fd5b5061034361054a3660046126b4565b610d7f565b34801561055b57600080fd5b5061044e61056a3660046126b4565b610d9e565b34801561057b57600080fd5b506103fb61058a3660046126b4565b610dec565b34801561059b57600080fd5b5061014b546103ce906001600160a01b031681565b3480156105bc57600080fd5b506105d06105cb3660046126b4565b610e1c565b60405161035091906127dc565b3480156105e957600080fd5b506103ce6105f83660046126b4565b610e47565b34801561060957600080fd5b5061044e61014e5481565b34801561062057600080fd5b5061044e61062f36600461274e565b610e7c565b34801561064057600080fd5b506103fb610ec0565b34801561065557600080fd5b50600e546103ce906001600160a01b031681565b34801561067557600080fd5b50600a546001600160a01b03166103ce565b34801561069357600080fd5b506103436106a236600461283c565b610ef6565b3480156106b357600080fd5b506103a161112e565b3480156106c857600080fd5b506103fb6106d7366004612a83565b61113d565b3480156106e857600080fd5b5061044e66b1a2bc2ec5000081565b34801561070357600080fd5b506103fb610712366004612b2c565b61122f565b34801561072357600080fd5b5061014c546103ce906001600160a01b031681565b34801561074457600080fd5b506103fb61075336600461274e565b61123e565b34801561076457600080fd5b506103fb61077336600461274e565b6112a1565b34801561078457600080fd5b506103fb610793366004612bf6565b6112fb565b3480156107a457600080fd5b506107ad61132d565b6040516103509190612cbf565b3480156107c657600080fd5b50600c546103ce906001600160a01b031681565b3480156107e657600080fd5b506103a16107f53660046126b4565b611388565b34801561080657600080fd5b50610343610815366004612d1a565b611490565b34801561082657600080fd5b506103fb61083536600461274e565b6117cc565b34801561084657600080fd5b5061044e6101505481565b34801561085d57600080fd5b5061034361086c366004612dc7565b61182f565b34801561087d57600080fd5b5061014f546103439060ff1681565b34801561089857600080fd5b506103fb6108a736600461274e565b6119a6565b6103436108ba36600461283c565b6119ff565b3480156108cb57600080fd5b506103fb6108da36600461274e565b611bd0565b3480156108eb57600080fd5b50600d546103ce906001600160a01b031681565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f780e9d63000000000000000000000000000000000000000000000000000000001480610955575061095582611c24565b92915050565b60606000805461096a90612e10565b80601f016020809104026020016040519081016040528092919081815260200182805461099690612e10565b80156109e35780601f106109b8576101008083540402835291602001916109e3565b820191906000526020600020905b8154815290600101906020018083116109c657829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610a2a5760405162461bcd60e51b8152600401610a2190612e97565b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610a5182610e47565b9050806001600160a01b0316836001600160a01b03161415610a855760405162461bcd60e51b8152600401610a2190612eff565b336001600160a01b0382161480610aa15750610aa1813361182f565b610abd5760405162461bcd60e51b8152600401610a2190612f67565b610ac78383611d07565b505050565b600a546001600160a01b03163314610af65760405162461bcd60e51b8152600401610a2190612fa7565b61014e55565b600a546001600160a01b03163314610b265760405162461bcd60e51b8152600401610a2190612fa7565b600c80546001600160a01b0390921673ffffffffffffffffffffffffffffffffffffffff199283168117909155600f8054909216179055565b60006101505442118015610b7557506101505415155b905090565b600a546001600160a01b03163314610ba45760405162461bcd60e51b8152600401610a2190612fa7565b61014c805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b610bde3382611d82565b610bfa5760405162461bcd60e51b8152600401610a219061300f565b610ac7838383611e14565b6000610c1083610e7c565b8210610c2e5760405162461bcd60e51b8152600401610a2190613077565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b600a546001600160a01b03163314610c815760405162461bcd60e51b8152600401610a2190612fa7565b61014c80547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff8116740100000000000000000000000000000000000000009182900460ff1615909102179055565b600a546001600160a01b03163314610cf95760405162461bcd60e51b8152600401610a2190612fa7565b604051600090339047908381818185875af1925050503d8060008114610d3b576040519150601f19603f3d011682016040523d82523d6000602084013e610d40565b606091505b5050905080610d615760405162461bcd60e51b8152600401610a21906130b9565b50565b610ac7838383604051806020016040528060008152506112fb565b6000818152600260205260408120546001600160a01b03161515610955565b6000610da960085490565b8210610dc75760405162461bcd60e51b8152600401610a2190613121565b60088281548110610dda57610dda613131565b90600052602060002001549050919050565b600a546001600160a01b03163314610e165760405162461bcd60e51b8152600401610a2190612fa7565b61015055565b6012816127108110610e2d57600080fd5b60209182820401919006915054906101000a900460ff1681565b6000818152600260205260408120546001600160a01b0316806109555760405162461bcd60e51b8152600401610a219061319f565b60006001600160a01b038216610ea45760405162461bcd60e51b8152600401610a2190613207565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b03163314610eea5760405162461bcd60e51b8152600401610a2190612fa7565b610ef46000611f4e565b565b60006002600b541415610f1b5760405162461bcd60e51b8152600401610a2190613249565b6002600b55600a546001600160a01b03163314610f4a5760405162461bcd60e51b8152600401610a2190612fa7565b610f52610b5f565b610f6e5760405162461bcd60e51b8152600401610a219061328b565b61014f5460ff1615610f925760405162461bcd60e51b8152600401610a21906132cd565b610f9e603260026132f3565b821115610fbd5760405162461bcd60e51b8152600401610a219061336a565b60008383334244604051602001610fd89594939291906133b5565b60405160208183030381529060405280519060200120905060005b610ffe600285613408565b81101561110e57600061105386868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061104e9250869150600290506132f3565b611fad565b90508261106160208461341c565b6020811061107157611071613131565b1a601261ffff8316612710811061108a5761108a613131565b602091828204019190066101000a81548160ff021916908360ff1602179055506110be6110b43390565b8261ffff16611fe3565b6110c960208361341c565b601f14156110fb57826040516020016110e29190613434565b6040516020818303038152906040528051906020012092505b508061110681613446565b915050610ff3565b505061014f805460ff1916600190811790915590506001600b5592915050565b60606001805461096a90612e10565b600a546001600160a01b031633146111675760405162461bcd60e51b8152600401610a2190612fa7565b60005b8351811015611229576111af84828151811061118857611188613131565b60200260200101518483815181106111a2576111a2613131565b6020026020010151611fe3565b8181815181106111c1576111c1613131565b602002602001015160128483815181106111dd576111dd613131565b602002602001015161271081106111f6576111f6613131565b602091828204019190066101000a81548160ff021916908360ff160217905550808061122190613446565b91505061116a565b50505050565b61123a338383611ffd565b5050565b600a546001600160a01b031633146112685760405162461bcd60e51b8152600401610a2190612fa7565b600d80546001600160a01b0390921673ffffffffffffffffffffffffffffffffffffffff19928316811790915560108054909216179055565b600a546001600160a01b031633146112cb5760405162461bcd60e51b8152600401610a2190612fa7565b61014b805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6113053383611d82565b6113215760405162461bcd60e51b8152600401610a219061300f565b611229848484846120a0565b6113356125a0565b604080516204e2008101918290529060129061271090826000855b825461010083900a900460ff168152602060019283018181049485019490930390920291018084116113505790505050505050905090565b6000818152600260205260409020546060906001600160a01b03166113bf5760405162461bcd60e51b8152600401610a21906134b9565b600c546001600160a01b03166113e357505060408051602081019091526000815290565b600f546001600160a01b0316635cc518ba83601281612710811061140957611409613131565b602091828204019190069054906101000a900460ff166040518363ffffffff1660e01b815260040161143c9291906134c9565b60006040518083038186803b15801561145457600080fd5b505afa158015611468573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610955919081019061353c565b60006002600b5414156114b55760405162461bcd60e51b8152600401610a2190613249565b6002600b8190556114c79085906132f3565b86146114e55760405162461bcd60e51b8152600401610a21906135cf565b600087873388884244604051602001611504979695949392919061362c565b60405160208183030381529060405280519060200120905060005b8581101561174f5760006115708a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061104e9250869150600290506132f3565b6011546040517f6352211e00000000000000000000000000000000000000000000000000000000815291925033916001600160a01b0390911690636352211e906115be908590600401613691565b60206040518083038186803b1580156115d657600080fd5b505afa1580156115ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061160e91906136aa565b6001600160a01b0316146116345760405162461bcd60e51b8152600401610a2190613723565b85858381811061164657611646613131565b9050602002013560011461166c5760405162461bcd60e51b8152600401610a2190613733565b600488888481811061168057611680613131565b9050602002013561169191906137ba565b60fc8461169f60208661341c565b602081106116af576116af613131565b6116bd939291901a166137c7565b60128261ffff1661271081106116d5576116d5613131565b602091828204019190066101000a81548160ff021916908360ff1602179055506116ff6110b43390565b61170a60208361341c565b601f141561173c57826040516020016117239190613434565b6040516020818303038152906040528051906020012092505b508061174781613446565b91505061151f565b506010546001600160a01b0316636b20c45433888888886040518663ffffffff1660e01b81526004016117869594939291906137f4565b600060405180830381600087803b1580156117a057600080fd5b505af11580156117b4573d6000803e3d6000fd5b5050505060019150506001600b559695505050505050565b600a546001600160a01b031633146117f65760405162461bcd60e51b8152600401610a2190612fa7565b600e80546001600160a01b0390921673ffffffffffffffffffffffffffffffffffffffff19928316811790915560118054909216179055565b61014c5460009074010000000000000000000000000000000000000000900460ff1661188457506001600160a01b0382811660009081526005602090815260408083209385168352929052205460ff16610955565b61014b546040517fc45527910000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063c4552791906118ce9086906004016126ef565b60206040518083038186803b1580156118e657600080fd5b505afa1580156118fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061191e9190613854565b6001600160a01b0316826001600160a01b0316148061194b575061014c546001600160a01b038381169116145b8061196f57506001600160a01b038216600090815261014d602052604090205460ff165b8061199f57506001600160a01b0380841660009081526005602090815260408083209386168352929052205460ff165b9392505050565b600a546001600160a01b031633146119d05760405162461bcd60e51b8152600401610a2190612fa7565b6001600160a01b0381166119f65760405162461bcd60e51b8152600401610a21906138cd565b610d6181611f4e565b60006002600b541415611a245760405162461bcd60e51b8152600401610a2190613249565b6002600b55611a31610b5f565b611a4d5760405162461bcd60e51b8152600401610a219061328b565b3466b1a2bc2ec50000611a61600285613408565b611a6b91906132f3565b14611a885760405162461bcd60e51b8152600401610a219061390f565b61014e54611a97600284613408565b611aa033610e7c565b611aaa919061391f565b1115611ac85760405162461bcd60e51b8152600401610a219061398a565b6000838333344244604051602001611ae59695949392919061399a565b60405160208183030381529060405280519060200120905060005b83811015611bbf576000611b4b86868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250869250611fad915050565b905082611b59600284613408565b60208110611b6957611b69613131565b1a601261ffff83166127108110611b8257611b82613131565b602091828204019190066101000a81548160ff021916908360ff160217905550611bac6110b43390565b50611bb860028261391f565b9050611b00565b5060019150506001600b5592915050565b600a546001600160a01b03163314611bfa5760405162461bcd60e51b8152600401610a2190612fa7565b6001600160a01b0316600090815261014d60205260409020805460ff19811660ff90911615179055565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd000000000000000000000000000000000000000000000000000000001480611cb757507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b8061095557507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610955565b6000818152600460205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384169081179091558190611d4982610e47565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b0316611db65760405162461bcd60e51b8152600401610a2190613a3d565b6000611dc183610e47565b9050806001600160a01b0316846001600160a01b03161480611dfc5750836001600160a01b0316611df1846109ed565b6001600160a01b0316145b80611e0c5750611e0c818561182f565b949350505050565b826001600160a01b0316611e2782610e47565b6001600160a01b031614611e4d5760405162461bcd60e51b8152600401610a2190613aa5565b6001600160a01b038216611e735760405162461bcd60e51b8152600401610a2190613b0d565b611e7e8383836120d3565b611e89600082611d07565b6001600160a01b0383166000908152600360205260408120805460019290611eb2908490613b1d565b90915550506001600160a01b0382166000908152600360205260408120805460019290611ee090849061391f565b9091555050600081815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600a80546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000611fba82600261391f565b83511015611fda5760405162461bcd60e51b8152600401610a2190613b66565b50016002015190565b61123a82826040518060200160405280600081525061218b565b816001600160a01b0316836001600160a01b0316141561202f5760405162461bcd60e51b8152600401610a2190613ba8565b6001600160a01b0383811660008181526005602090815260408083209487168084529490915290819020805460ff1916851515179055517f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3190612093908590612626565b60405180910390a3505050565b6120ab848484611e14565b6120b7848484846121be565b6112295760405162461bcd60e51b8152600401610a2190613c10565b6001600160a01b03831661212e5761212981600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b612151565b816001600160a01b0316836001600160a01b031614612151576121518382612315565b6001600160a01b03821661216857610ac7816123b2565b826001600160a01b0316826001600160a01b031614610ac757610ac78282612461565b61219583836124a5565b6121a260008484846121be565b610ac75760405162461bcd60e51b8152600401610a2190613c10565b60006001600160a01b0384163b1561230a576040517f150b7a020000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063150b7a029061221b903390899088908890600401613c20565b602060405180830381600087803b15801561223557600080fd5b505af1925050508015612265575060408051601f3d908101601f1916820190925261226291810190613c6f565b60015b6122bf573d808015612293576040519150601f19603f3d011682016040523d82523d6000602084013e612298565b606091505b5080516122b75760405162461bcd60e51b8152600401610a2190613c10565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a0200000000000000000000000000000000000000000000000000000000149050611e0c565b506001949350505050565b6000600161232284610e7c565b61232c9190613b1d565b60008381526007602052604090205490915080821461237f576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906123c490600190613b1d565b600083815260096020526040812054600880549394509092849081106123ec576123ec613131565b90600052602060002001549050806008838154811061240d5761240d613131565b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061244557612445613c90565b6001900381819060005260206000200160009055905550505050565b600061246c83610e7c565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160a01b0382166124cb5760405162461bcd60e51b8152600401610a2190613cd6565b6000818152600260205260409020546001600160a01b0316156125005760405162461bcd60e51b8152600401610a2190613d18565b61250c600083836120d3565b6001600160a01b038216600090815260036020526040812080546001929061253590849061391f565b9091555050600081815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b604051806204e2000160405280612710906020820280368337509192915050565b7fffffffff0000000000000000000000000000000000000000000000000000000081165b8114610d6157600080fd5b8035610955816125c1565b60006020828403121561261057612610600080fd5b6000611e0c84846125f0565b8015155b82525050565b60208101610955828461261c565b60005b8381101561264f578181015183820152602001612637565b838111156112295750506000910152565b600061266a825190565b808452602084019350612681818560208601612634565b601f01601f19169290920192915050565b6020808252810161199f8184612660565b806125e5565b8035610955816126a3565b6000602082840312156126c9576126c9600080fd5b6000611e0c84846126a9565b60006001600160a01b038216610955565b612620816126d5565b6020810161095582846126e6565b6125e5816126d5565b8035610955816126fd565b6000806040838503121561272757612727600080fd5b60006127338585612706565b9250506020612744858286016126a9565b9150509250929050565b60006020828403121561276357612763600080fd5b6000611e0c8484612706565b80612620565b60208101610955828461276f565b60008060006060848603121561279b5761279b600080fd5b60006127a78686612706565b93505060206127b886828701612706565b92505060406127c9868287016126a9565b9150509250925092565b60ff8116612620565b6020810161095582846127d3565b60008083601f8401126127ff576127ff600080fd5b50813567ffffffffffffffff81111561281a5761281a600080fd5b60208301915083600182028301111561283557612835600080fd5b9250929050565b6000806020838503121561285257612852600080fd5b823567ffffffffffffffff81111561286c5761286c600080fd5b612878858286016127ea565b92509250509250929050565b634e487b7160e01b600052604160045260246000fd5b601f19601f830116810181811067ffffffffffffffff821117156128c0576128c0612884565b6040525050565b60006128d260405190565b90506128de828261289a565b919050565b600067ffffffffffffffff8211156128fd576128fd612884565b5060209081020190565b600061291a612915846128e3565b6128c7565b8381529050602080820190840283018581111561293957612939600080fd5b835b8181101561295b5761294d8782612706565b83526020928301920161293b565b5050509392505050565b600082601f83011261297957612979600080fd5b8135611e0c848260208601612907565b6000612997612915846128e3565b838152905060208082019084028301858111156129b6576129b6600080fd5b835b8181101561295b576129ca87826126a9565b8352602092830192016129b8565b600082601f8301126129ec576129ec600080fd5b8135611e0c848260208601612989565b60ff81166125e5565b8035610955816129fc565b6000612a1e612915846128e3565b83815290506020808201908402830185811115612a3d57612a3d600080fd5b835b8181101561295b57612a518782612a05565b835260209283019201612a3f565b600082601f830112612a7357612a73600080fd5b8135611e0c848260208601612a10565b600080600060608486031215612a9b57612a9b600080fd5b833567ffffffffffffffff811115612ab557612ab5600080fd5b612ac186828701612965565b935050602084013567ffffffffffffffff811115612ae157612ae1600080fd5b612aed868287016129d8565b925050604084013567ffffffffffffffff811115612b0d57612b0d600080fd5b6127c986828701612a5f565b8015156125e5565b803561095581612b19565b60008060408385031215612b4257612b42600080fd5b6000612b4e8585612706565b925050602061274485828601612b21565b600067ffffffffffffffff821115612b7957612b79612884565b601f19601f83011660200192915050565b82818337506000910152565b6000612ba461291584612b5f565b905082815260208101848484011115612bbf57612bbf600080fd5b612bca848285612b8a565b509392505050565b600082601f830112612be657612be6600080fd5b8135611e0c848260208601612b96565b60008060008060808587031215612c0f57612c0f600080fd5b6000612c1b8787612706565b9450506020612c2c87828801612706565b9350506040612c3d878288016126a9565b925050606085013567ffffffffffffffff811115612c5d57612c5d600080fd5b612c6987828801612bd2565b91505092959194509250565b612c7f82826127d3565b5060200190565b60200190565b6127108160005b82811015612cb8578151612ca78682612c75565b955050602082019150600101612c93565b5050505050565b6204e20081016109558284612c8c565b60008083601f840112612ce457612ce4600080fd5b50813567ffffffffffffffff811115612cff57612cff600080fd5b60208301915083602082028301111561283557612835600080fd5b60008060008060008060608789031215612d3657612d36600080fd5b863567ffffffffffffffff811115612d5057612d50600080fd5b612d5c89828a016127ea565b9650965050602087013567ffffffffffffffff811115612d7e57612d7e600080fd5b612d8a89828a01612ccf565b9450945050604087013567ffffffffffffffff811115612dac57612dac600080fd5b612db889828a01612ccf565b92509250509295509295509295565b60008060408385031215612ddd57612ddd600080fd5b6000612de98585612706565b925050602061274485828601612706565b634e487b7160e01b600052602260045260246000fd5b600281046001821680612e2457607f821691505b60208210811415612e3757612e37612dfa565b50919050565b602c8152602081017f4552433732313a20617070726f76656420717565727920666f72206e6f6e657881527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015290505b60400190565b6020808252810161095581612e3d565b60218152602081017f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6581527f720000000000000000000000000000000000000000000000000000000000000060208201529050612e91565b6020808252810161095581612ea7565b60388152602081017f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7781527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060208201529050612e91565b6020808252810161095581612f0f565b60208082527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65729101908152612c86565b6020808252810161095581612f77565b60318152602081017f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f81527f776e6572206e6f7220617070726f76656400000000000000000000000000000060208201529050612e91565b6020808252810161095581612fb7565b602b8152602081017f455243373231456e756d657261626c653a206f776e657220696e646578206f7581527f74206f6620626f756e647300000000000000000000000000000000000000000060208201529050612e91565b602080825281016109558161301f565b60118152602081017f5769746864726177616c206661696c656400000000000000000000000000000081529050612c86565b6020808252810161095581613087565b602c8152602081017f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f81527f7574206f6620626f756e6473000000000000000000000000000000000000000060208201529050612e91565b60208082528101610955816130c9565b634e487b7160e01b600052603260045260246000fd5b60298152602081017f4552433732313a206f776e657220717565727920666f72206e6f6e657869737481527f656e7420746f6b656e000000000000000000000000000000000000000000000060208201529050612e91565b6020808252810161095581613147565b602a8152602081017f4552433732313a2062616c616e636520717565727920666f7220746865207a6581527f726f20616464726573730000000000000000000000000000000000000000000060208201529050612e91565b60208082528101610955816131af565b601f8152602081017f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081529050612c86565b6020808252810161095581613217565b60148152602081017f5075626c69632073616c65206e6f74206f70656e00000000000000000000000081529050612c86565b6020808252810161095581613259565b60138152602081017f446f6e277420626520746f6f206772656564790000000000000000000000000081529050612c86565b602080825281016109558161329b565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561330d5761330d6132dd565b500290565b603f8152602081017f4576656e20696620796f7520617265206120666f756e6465722c20796f75206481527f6f6e277420646573657276652074686174206d616e7920447265616d6572730060208201529050612e91565b6020808252810161095581613312565b613385828483612b8a565b500190565b60006109558260601b90565b60006109558261338a565b6126206133ad826126d5565b613396565b90565b6133c081868861337a565b90506133cc81856133a1565b6014016133d9818461276f565b6020016133e6818361276f565b60200195945050505050565b634e487b7160e01b600052601260045260246000fd5b600082613417576134176133f2565b500490565b815b915060008261342f5761342f6133f2565b500690565b61343e818361276f565b602001919050565b600060001982141561345a5761345a6132dd565b5060010190565b60278152602081017f4552433732313a2055524920717565727920666f72206e6f6e6578697374656e81527f7420746f6b656e0000000000000000000000000000000000000000000000000060208201529050612e91565b6020808252810161095581613461565b604081016134d7828561276f565b61199f60208301846127d3565b60006134f261291584612b5f565b90508281526020810184848401111561350d5761350d600080fd5b612bca848285612634565b600082601f83011261352c5761352c600080fd5b8151611e0c8482602086016134e4565b60006020828403121561355157613551600080fd5b815167ffffffffffffffff81111561356b5761356b600080fd5b611e0c84828501613518565b60288152602081017f456163682072756e6e6572206e65656473206f6e6520616e64206f6e6c79206f81527f6e652063616e647900000000000000000000000000000000000000000000000060208201529050612e91565b6020808252810161095581613577565b825b925060007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83111561361557613615600080fd5b602083029250613626838584612b8a565b50500190565b61363781888a61337a565b905061364381876133a1565b6014016136518185876135df565b905061365d818461276f565b60200161366a818361276f565b602001979650505050505050565b60006109556133b261ffff841681565b61262081613678565b602081016109558284613688565b8051610955816126fd565b6000602082840312156136bf576136bf600080fd5b6000611e0c848461369f565b60378152602081017f596f752063616e6e6f7420676976652063616e6469657320746f20612072756e81527f6e6572207468617420796f7520646f206e6f74206f776e00000000000000000060208201529050612e91565b60208082528101610955816136cb565b6020808252810161095581604f81527f596f75722072756e6e6572206e65656473206f6e6520616e64206f6e6c79206f60208201527f6e652063616e64792c2077686f206b6e6f7773207768617420636f756c64206860408201527f617070656e206f74686572776973650000000000000000000000000000000000606082015260800190565b60ff90811690821661341e565b60ff8116905060ff8216915060008260ff03821115613385576133856132dd565b818352602083016135e1565b6060810161380282886126e6565b81810360208301526138158186886137e8565b9050818103604083015261382a8184866137e8565b979650505050505050565b6000610955826126d5565b6125e581613835565b805161095581613840565b60006020828403121561386957613869600080fd5b6000611e0c8484613849565b60268152602081017f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181527f646472657373000000000000000000000000000000000000000000000000000060208201529050612e91565b6020808252810161095581613875565b601d8152602081017f596f75206861766520746f2070617920746865206261696c20626f6e6400000081529050612c86565b60208082528101610955816138dd565b60008219821115613385576133856132dd565b60318152602081017f596f757220686f6d6520697320746f20736d616c6c20746f2077656c636f6d6581527f20736f206d616e7920647265616d65727300000000000000000000000000000060208201529050612e91565b6020808252810161095581613932565b6139a581878961337a565b90506139b181866133a1565b6014016139be818561276f565b6020016139cb818461276f565b6020016139d8818361276f565b6020019695505050505050565b602c8152602081017f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657881527f697374656e7420746f6b656e000000000000000000000000000000000000000060208201529050612e91565b60208082528101610955816139e5565b60298152602081017f4552433732313a207472616e73666572206f6620746f6b656e2074686174206981527f73206e6f74206f776e000000000000000000000000000000000000000000000060208201529050612e91565b6020808252810161095581613a4d565b60248152602081017f4552433732313a207472616e7366657220746f20746865207a65726f2061646481527f726573730000000000000000000000000000000000000000000000000000000060208201529050612e91565b6020808252810161095581613ab5565b600082821015613b2f57613b2f6132dd565b500390565b60148152602081017f746f55696e7431365f6f75744f66426f756e647300000000000000000000000081529050612c86565b6020808252810161095581613b34565b60198152602081017f4552433732313a20617070726f766520746f2063616c6c65720000000000000081529050612c86565b6020808252810161095581613b76565b60328152602081017f4552433732313a207472616e7366657220746f206e6f6e20455243373231526581527f63656976657220696d706c656d656e746572000000000000000000000000000060208201529050612e91565b6020808252810161095581613bb8565b60808101613c2e82876126e6565b613c3b60208301866126e6565b613c48604083018561276f565b8181036060830152613c5a8184612660565b9695505050505050565b8051610955816125c1565b600060208284031215613c8457613c84600080fd5b6000611e0c8484613c64565b634e487b7160e01b600052603160045260246000fd5b60208082527f4552433732313a206d696e7420746f20746865207a65726f20616464726573739101908152612c86565b6020808252810161095581613ca6565b601c8152602081017f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000081529050612c86565b6020808252810161095581613ce656fea2646970667358221220c856cbcffe9e33863a98e3a3b7f85466c5eaeffcf57c92bce271e4d7922715b864736f6c63430008080033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001200000000000000000000000004c57375508d5ccd4ba7329db4389991413930ea600000000000000000000000097597002980134bea46250aa0510c9b90d87a587000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1000000000000000000000000f42aa99f011a1fa7cda90e5e98b277e306bca83e0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000e436861696e20447265616d65727300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034452450000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : name_ (string): Chain Dreamers
Arg [1] : symbol_ (string): DRE
Arg [2] : _rendererAddress (address): 0x4C57375508D5Ccd4ba7329Db4389991413930Ea6
Arg [3] : _chainRunnersAddress (address): 0x97597002980134beA46250Aa0510C9B90d87A587
Arg [4] : _opensea (address): 0xa5409ec958C83C3f309868babACA7c86DCB077c1
Arg [5] : _looksrare (address): 0xf42aa99F011A1fA7CDA90E5E98b277E306BcA83e
Arg [6] : _maxDreamersMintPublicSale (uint256): 16
-----Encoded View---------------
11 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [2] : 0000000000000000000000004c57375508d5ccd4ba7329db4389991413930ea6
Arg [3] : 00000000000000000000000097597002980134bea46250aa0510c9b90d87a587
Arg [4] : 000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1
Arg [5] : 000000000000000000000000f42aa99f011a1fa7cda90e5e98b277e306bca83e
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000010
Arg [7] : 000000000000000000000000000000000000000000000000000000000000000e
Arg [8] : 436861696e20447265616d657273000000000000000000000000000000000000
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [10] : 4452450000000000000000000000000000000000000000000000000000000000
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.