NFT
Overview
TokenID
735
Total Transfers
-
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
LOOKI
Compiler Version
v0.8.11+commit.d7f03943
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import '../utils/NFT721.sol'; contract LOOKI is NFT721 { constructor() NFT721('Looki', 'LOOKI', 'https://racawebsource.s3.us-east-2.amazonaws.com/metadata/2d/looki/') {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Royalty.sol'; import '../../lib/ERC721L/contracts/EIP5058/extensions/ERC5058Bound.sol'; import '../../lib/ERC721L/contracts/utils/ERC721Attachable.sol'; import './UriRoleBaseTokenURI.sol'; import './WithdrawerRoleWithdraw.sol'; import './PauserRolePausable.sol'; contract NFT721 is PauserRolePausable, WithdrawerRoleWithdraw, UriRoleBaseTokenURI, ERC721Enumerable, ERC721Pausable, ERC5058Bound, ERC721Attachable, ERC721Royalty { bytes32 public constant MINTER_ROLE = keccak256('MINTER_ROLE'); bytes32 public constant BURNER_ROLE = keccak256('BURNER_ROLE'); bytes32 public constant UNBIND_ROLE = keccak256('UNBIND_ROLE'); constructor( string memory _name, string memory _symbol, string memory _baseTokenURI ) ERC721(_name, _symbol) UriRoleBaseTokenURI(_baseTokenURI) { _grantRole(DEFAULT_ADMIN_ROLE, _msgSender()); _grantRole(MINTER_ROLE, _msgSender()); _grantRole(BURNER_ROLE, _msgSender()); _grantRole(UNBIND_ROLE, _msgSender()); } function exists(uint256 tokenId) external view returns (bool) { return _exists(tokenId); } function safeMint( address to, uint256 tokenId, bytes memory data ) external onlyRole(MINTER_ROLE) { _safeMint(to, tokenId, data); } function lockMint( address to, uint256 tokenId, uint256 expired, bytes memory data ) external onlyRole(MINTER_ROLE) { _safeLockMint(to, tokenId, expired, data); } function mint(address to, uint256 tokenId) external onlyRole(MINTER_ROLE) { _mint(to, tokenId); } function mintBatch(address to, uint256[] calldata tokenIds) external onlyRole(MINTER_ROLE) { for (uint256 i; i < tokenIds.length; i++) { _mint(to, tokenIds[i]); } } function mintRange( address to, uint256 fromId, uint256 toId ) external onlyRole(MINTER_ROLE) { for (; fromId <= toId; fromId++) { _mint(to, fromId); } } function burn(uint256 tokenId) external { require( _isApprovedOrOwner(_msgSender(), tokenId) || hasRole(BURNER_ROLE, _msgSender()) || masterOf(tokenId) == _msgSender(), 'ERC721: caller is not owner nor approved' ); _burn(tokenId); } function slaveMint( address to, uint256 tokenId, address collection, uint256 hostTokenId ) external onlyRole(MINTER_ROLE) { _slaveMint(to, tokenId, collection, hostTokenId); } function removeSlave(uint256 tokenId) external { require(hasRole(UNBIND_ROLE, _msgSender()) || masterOf(tokenId) == _msgSender(), 'ERC721: not unbind role'); _removeSlave(tokenId); } function removeMaster(uint256 tokenId) external onlyRole(UNBIND_ROLE) { _removeMaster(tokenId); } function transferFrom( address from, address to, uint256 tokenId ) public virtual override(ERC721, ERC721Attachable) { super.transferFrom(from, to, tokenId); } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override(ERC721, ERC721Attachable) { super.safeTransferFrom(from, to, tokenId, _data); } function setRoleAdmin(bytes32 roleId, bytes32 adminRoleId) external onlyOwner { _setRoleAdmin(roleId, adminRoleId); } function setFactory(address factory) external onlyOwner { _setFactory(factory); } function setDefaultRoyaltyInfo(address receiver, uint96 feeNumerator) external onlyOwner { _setDefaultRoyalty(receiver, feeNumerator); } function deleteDefaultRoyalty() external onlyOwner { _deleteDefaultRoyalty(); } function setTokenRoyalty( uint256 tokenId, address recipient, uint96 fraction ) external onlyOwner { _setTokenRoyalty(tokenId, recipient, fraction); } function resetTokenRoyalty(uint256 tokenId) external onlyOwner { _resetTokenRoyalty(tokenId); } function _baseURI() internal view override(UriRoleBaseTokenURI, ERC721) returns (string memory) { return UriRoleBaseTokenURI._baseURI(); } function _burn(uint256 tokenId) internal virtual override(ERC721, ERC721Royalty, ERC5058, ERC721Attachable) { super._burn(tokenId); } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable, ERC5058) { super._beforeTokenTransfer(from, to, tokenId); } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable, ERC5058, ERC721Royalty, AccessControlEnumerable) returns (bool) { return super.supportsInterface(interfaceId); } }
// 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/ERC721Pausable.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "../../../security/Pausable.sol"; /** * @dev ERC721 token with pausable token transfers, minting and burning. * * Useful for scenarios such as preventing trades until the end of an evaluation * period, or having an emergency switch for freezing all token transfers in the * event of a large bug. */ abstract contract ERC721Pausable is ERC721, Pausable { /** * @dev See {ERC721-_beforeTokenTransfer}. * * Requirements: * * - the contract must not be paused. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); require(!paused(), "ERC721Pausable: token transfer while paused"); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/ERC721Royalty.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "../../common/ERC2981.sol"; import "../../../utils/introspection/ERC165.sol"; /** * @dev Extension of ERC721 with the ERC2981 NFT Royalty Standard, a standardized way to retrieve royalty payment * information. * * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first. * * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. * * _Available since v4.5._ */ abstract contract ERC721Royalty is ERC2981, ERC721 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC2981) returns (bool) { return super.supportsInterface(interfaceId); } /** * @dev See {ERC721-_burn}. This override additionally clears the royalty information for the token. */ function _burn(uint256 tokenId) internal virtual override { super._burn(tokenId); _resetTokenRoyalty(tokenId); } }
// SPDX-License-Identifier: MIT // Creator: [email protected] pragma solidity ^0.8.8; import "../factory/IERC5058Factory.sol"; import "../factory/IERC721Bound.sol"; import "../ERC5058.sol"; abstract contract ERC5058Bound is ERC5058 { address public bound; function _setFactory(address _factory) internal { bound = IERC5058Factory(_factory).boundOf(address(this)); } function _setBoundBaseTokenURI(string memory uri) internal { IERC721Bound(bound).setBaseTokenURI(uri); } function _setBoundContractURI(string memory uri) internal { IERC721Bound(bound).setContractURI(uri); } function burnBound(uint256 tokenId) external { IERC721Bound(bound).burn(tokenId); } // NOTE: // // this will be called when `lockFrom` or `unlockFrom` function _afterTokenLock( address operator, address from, uint256 tokenId, uint256 expired ) internal virtual override { super._afterTokenLock(operator, from, tokenId, expired); if (bound != address(0)) { if (expired != 0) { // lock mint if (operator != address(0)) { IERC721Bound(bound).safeMint(msg.sender, tokenId, ""); } } else { // unlock if (IERC721Bound(bound).exists(tokenId)) { IERC721Bound(bound).burn(tokenId); } } } } }
// SPDX-License-Identifier: MIT // Creator: [email protected] pragma solidity ^0.8.8; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; interface IBoundERC721Receiver { function onBoundERC721Received( address operator, address to, uint256 boundTokenId, uint256 tokenId, bytes calldata data ) external returns (bytes4); } interface IERC721Burnable { function burn(uint256 tokenId) external; function removeSlave(uint256 tokenId) external; } // @dev The implementation is to bind the NFT (master) and its airdrop NFT (slave). // The airdrop NFT cannot be transferred or sold separately. // The slave nfts will be transferred or sold with the master nft. abstract contract ERC721Attachable is Ownable, ERC721 { using EnumerableSet for EnumerableSet.AddressSet; struct BoundToken { address collection; uint256 tokenId; } // slave tokenId => master token mapping(uint256 => BoundToken) public slaveTokens; // master tokenId => slave token mapping(uint256 => BoundToken[]) private _masterTokens; // collection => tokenId => index mapping(address => mapping(uint256 => uint256)) private _slaveTokenIndex; EnumerableSet.AddressSet private _slaveCollections; // Grant the specified address the permission to transfer slave nft for airdrop NFT deposit into the game contract. EnumerableSet.AddressSet private _transferApprovals; event CollectionRemoved(address indexed collection); event CollectionAdded(address indexed collection); event TransferApprove(address indexed operator); event TransferDisapprove(address indexed operator); function allSlaveTokenLength(uint256 tokenId) public view returns (uint256) { return _masterTokens[tokenId].length; } function addCollection(address collection) external onlyOwner { require(!_slaveCollections.contains(collection), "ERC721Attachable: collection already slave"); _slaveCollections.add(collection); emit CollectionAdded(collection); } function removeCollection(address collection) external onlyOwner { require(_slaveCollections.contains(collection), "ERC721Attachable: collection not slave"); _slaveCollections.remove(collection); emit CollectionRemoved(collection); } function isSlaveCollection(address collection) public view returns (bool) { return _slaveCollections.contains(collection); } function addTransferApproval(address operator) external onlyOwner { require(!_transferApprovals.contains(operator), "ERC721Attachable: already approved"); _transferApprovals.add(operator); emit TransferApprove(operator); } function removeTransferApproval(address operator) external onlyOwner { require(_transferApprovals.contains(operator), "ERC721Attachable: not approved"); _transferApprovals.remove(operator); emit TransferDisapprove(operator); } function isTransferApproval(address operator) public view returns (bool) { return _transferApprovals.contains(operator); } function isSlaveToken(uint256 tokenId) public view returns (bool) { return slaveTokens[tokenId].collection != address(0); } function masterOf(uint256 tokenId) public view returns (address) { require(isSlaveToken(tokenId), "ERC721Attachable: not slave token"); return slaveTokens[tokenId].collection; } function slaveTokenByIndex(uint256 tokenId, uint256 index) public view returns (BoundToken memory) { require(index < _masterTokens[tokenId].length, "ERC721Attachable: tokenId index out of bounds"); return _masterTokens[tokenId][index]; } function _slaveMint( address to, uint256 tokenId, address collection, uint256 masterTokenId ) internal virtual { BoundToken storage at = slaveTokens[tokenId]; at.collection = collection; at.tokenId = masterTokenId; require( _checkOnBoundERC721Received(collection, to, tokenId, masterTokenId, ""), "ERC721Attachable: transfer to non BoundERC721Receiver implementer" ); _mint(to, tokenId); } function _removeSlave(uint256 tokenId) internal virtual { require(isSlaveToken(tokenId), "ERC721Attachable: not slave token"); BoundToken storage at = slaveTokens[tokenId]; require( _checkOnBoundERC721Received(at.collection, address(0), tokenId, at.tokenId, ""), "ERC721Attachable: transfer to non BoundERC721Receiver implementer" ); delete slaveTokens[tokenId]; } function _removeMaster(uint256 tokenId) internal virtual { require(allSlaveTokenLength(tokenId) > 0, "ERC721Attachable: no slave token"); uint256 slaveNum = allSlaveTokenLength(tokenId); for (uint256 i = 0; i < slaveNum; i++) { IERC721Burnable(_masterTokens[tokenId][i].collection).removeSlave(_masterTokens[tokenId][i].tokenId); } delete _masterTokens[tokenId]; } /** * @dev See {ERC721-_burn}. */ function _burn(uint256 tokenId) internal virtual override { super._burn(tokenId); BoundToken storage at = slaveTokens[tokenId]; if (at.collection != address(0)) { require( _checkOnBoundERC721Received(at.collection, address(0), tokenId, at.tokenId, ""), "ERC721Attachable: transfer to non BoundERC721Receiver implementer" ); delete slaveTokens[tokenId]; } uint256 slaveNum = allSlaveTokenLength(tokenId); if (slaveNum > 0) { for (uint256 i = 0; i < slaveNum; i++) { IERC721Burnable(_masterTokens[tokenId][i].collection).burn(_masterTokens[tokenId][i].tokenId); } delete _masterTokens[tokenId]; } } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { if (slaveTokens[tokenId].collection != address(0)) { if (msg.sender == slaveTokens[tokenId].collection) { _transfer(from, to, tokenId); } else { require(_transferApprovals.contains(msg.sender), "ERC721Attachable: slave token transfer not allowed"); super.transferFrom(from, to, tokenId); } } else { super.transferFrom(from, to, tokenId); for (uint256 i = 0; i < _masterTokens[tokenId].length; i++) { IERC721(_masterTokens[tokenId][i].collection).transferFrom(from, to, _masterTokens[tokenId][i].tokenId); } } } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public virtual override { if (slaveTokens[tokenId].collection != address(0)) { if (msg.sender == slaveTokens[tokenId].collection) { _safeTransfer(from, to, tokenId, data); } else { require(_transferApprovals.contains(msg.sender), "ERC721Attachable: slave token transfer not allowed"); super.safeTransferFrom(from, to, tokenId, data); } } else { super.safeTransferFrom(from, to, tokenId, data); for (uint256 i = 0; i < _masterTokens[tokenId].length; i++) { IERC721(_masterTokens[tokenId][i].collection).safeTransferFrom( from, to, _masterTokens[tokenId][i].tokenId, data ); } } } function onBoundERC721Received( address, /*operator*/ address to, uint256 boundTokenId, uint256 tokenId, bytes calldata /*data*/ ) external returns (bytes4) { require(isSlaveCollection(msg.sender), "ERC721Attachable: slave to non boundERC721 receiver"); if (to != address(0)) { require(ownerOf(tokenId) == to, "ERC721Attachable: slave to incorrect owner"); _slaveTokenIndex[msg.sender][boundTokenId] = _masterTokens[tokenId].length; _masterTokens[tokenId].push(BoundToken(msg.sender, boundTokenId)); } else { _removeTokenFromMasterTokens(tokenId, msg.sender, boundTokenId); } return this.onBoundERC721Received.selector; } function _checkOnBoundERC721Received( address from, address to, uint256 tokenId, uint256 masterTokenId, bytes memory _data ) private returns (bool) { try IBoundERC721Receiver(from).onBoundERC721Received(msg.sender, to, tokenId, masterTokenId, _data) returns ( bytes4 retval ) { return retval == IBoundERC721Receiver.onBoundERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721Attachable: transfer to non BoundERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } function _removeTokenFromMasterTokens( uint256 tokenId, address collection, uint256 boundTokenId ) private { uint256 lastTokenIndex = _masterTokens[tokenId].length - 1; uint256 tokenIndex = _slaveTokenIndex[collection][boundTokenId]; BoundToken storage bToken = _masterTokens[tokenId][lastTokenIndex]; _masterTokens[tokenId][tokenIndex] = BoundToken(bToken.collection, bToken.tokenId); _slaveTokenIndex[bToken.collection][bToken.tokenId] = tokenIndex; delete _slaveTokenIndex[collection][boundTokenId]; _masterTokens[tokenId].pop(); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.8; import '@openzeppelin/contracts/security/Pausable.sol'; import '@openzeppelin/contracts/access/AccessControlEnumerable.sol'; /** @notice ERC721 extension that overrides the OpenZeppelin _baseURI() function to return a prefix that can be set by the contract owner. */ abstract contract UriRoleBaseTokenURI is AccessControlEnumerable { bytes32 public constant SET_BASE_TOKEN_URI_ROLE = keccak256('SET_BASE_TOKEN_URI_ROLE'); /// @notice Base token URI used as a prefix by tokenURI(). string public baseTokenURI; constructor(string memory _baseTokenURI) { _grantRole(SET_BASE_TOKEN_URI_ROLE, _msgSender()); setBaseTokenURI(_baseTokenURI); } /// @notice Sets the base token URI prefix. function setBaseTokenURI(string memory _baseTokenURI) public onlyRole(SET_BASE_TOKEN_URI_ROLE) { baseTokenURI = _baseTokenURI; } /** @notice Concatenates and returns the base token URI and the token ID without any additional characters (e.g. a slash). @dev This requires that an inheriting contract that also inherits from OZ's ERC721 will have to override both contracts; although we could simply require that users implement their own _baseURI() as here, this can easily be forgotten and the current approach guides them with compiler errors. This favours the latter half of "APIs should be easy to use and hard to misuse" from https://www.infoq.com/articles/API-Design-Joshua-Bloch/. */ function _baseURI() internal view virtual returns (string memory) { return baseTokenURI; } }
// SPDX-License-Identifier: MIT // Creator: [email protected] pragma solidity ^0.8.8; import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol'; import '@openzeppelin/contracts/token/ERC721/IERC721.sol'; import '@openzeppelin/contracts/access/AccessControlEnumerable.sol'; abstract contract WithdrawerRoleWithdraw is AccessControlEnumerable { using SafeERC20 for IERC20; bytes32 public constant WITHDRAWER_ROLE = keccak256('WITHDRAWER_ROLE'); constructor() { _grantRole(WITHDRAWER_ROLE, _msgSender()); } function withdraw(address payable _receiver, uint256 _amount) external onlyRole(WITHDRAWER_ROLE) { Address.sendValue(_receiver, _amount); } function withdrawERC20( address _tokenAddress, address _receiver, uint256 _amount ) external onlyRole(WITHDRAWER_ROLE) { IERC20(_tokenAddress).transfer(_receiver, _amount); } function withdrawERC721( address _tokenAddress, address _receiver, uint256[] memory _tokenIds ) external onlyRole(WITHDRAWER_ROLE) { for (uint256 i; i < _tokenIds.length; ++i) { IERC721(_tokenAddress).transferFrom(address(this), _receiver, _tokenIds[i]); } } }
// SPDX-License-Identifier: MIT // Creator: [email protected] pragma solidity ^0.8.8; import '@openzeppelin/contracts/security/Pausable.sol'; import '@openzeppelin/contracts/access/AccessControlEnumerable.sol'; abstract contract PauserRolePausable is AccessControlEnumerable, Pausable { bytes32 public constant PAUSER_ROLE = keccak256('PAUSER_ROLE'); bytes32 public constant UNPAUSER_ROLE = keccak256('UNPAUSER_ROLE'); constructor() { _grantRole(PAUSER_ROLE, _msgSender()); _grantRole(UNPAUSER_ROLE, _msgSender()); } function pause() public onlyRole(PAUSER_ROLE) { Pausable._pause(); } function unpause() public onlyRole(UNPAUSER_ROLE) { Pausable._unpause(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: address zero is not a valid owner"); 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: invalid token ID"); 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) { _requireMinted(tokenId); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not token owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { _requireMinted(tokenId); 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: caller is not token 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: caller is not token 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) { address owner = ERC721.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits an {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 an {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 Reverts if the `tokenId` has not been minted yet. */ function _requireMinted(uint256 tokenId) internal view virtual { require(_exists(tokenId), "ERC721: invalid token ID"); } /** * @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 { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (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); /** * @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 (last updated v4.7.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts 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 // OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { require(paused(), "Pausable: not paused"); } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/common/ERC2981.sol) pragma solidity ^0.8.0; import "../../interfaces/IERC2981.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information. * * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first. * * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the * fee is specified in basis points by default. * * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. * * _Available since v4.5._ */ abstract contract ERC2981 is IERC2981, ERC165 { struct RoyaltyInfo { address receiver; uint96 royaltyFraction; } RoyaltyInfo private _defaultRoyaltyInfo; mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } /** * @inheritdoc IERC2981 */ function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) { RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId]; if (royalty.receiver == address(0)) { royalty = _defaultRoyaltyInfo; } uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator(); return (royalty.receiver, royaltyAmount); } /** * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an * override. */ function _feeDenominator() internal pure virtual returns (uint96) { return 10000; } /** * @dev Sets the royalty information that all ids in this contract will default to. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: invalid receiver"); _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Removes default royalty information. */ function _deleteDefaultRoyalty() internal virtual { delete _defaultRoyaltyInfo; } /** * @dev Sets the royalty information for a specific token id, overriding the global default. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setTokenRoyalty( uint256 tokenId, address receiver, uint96 feeNumerator ) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: Invalid parameters"); _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Resets royalty information for the token id back to the global default. */ function _resetTokenRoyalty(uint256 tokenId) internal virtual { delete _tokenRoyaltyInfo[tokenId]; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // Creator: [email protected] pragma solidity ^0.8.8; interface IERC5058Factory { event DeployedBound(address indexed preimage, address bound); function allBoundsLength() external view returns (uint256); function boundByIndex(uint256 index) external view returns (address); function existBound(address preimage) external view returns (bool); function boundOf(address preimage) external view returns (address); function boundDeploy(address preimage) external returns (address); }
// SPDX-License-Identifier: MIT // Creator: [email protected] pragma solidity ^0.8.8; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; interface IERC721Bound is IERC721 { function preimage() external view returns (address); function contractURI() external view returns (string memory); function exists(uint256 tokenId) external view returns (bool); function setBaseTokenURI(string memory _baseTokenURI) external; function setContractURI(string memory uri) external; function safeMint( address to, uint256 tokenId, bytes memory data ) external; function burn(uint256 tokenId) external; }
// SPDX-License-Identifier: MIT // Creator: [email protected] pragma solidity ^0.8.8; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "./IERC5058.sol"; /** * @dev Implementation ERC721 Lockable Token */ abstract contract ERC5058 is ERC721, IERC5058 { // Mapping from token ID to unlock time mapping(uint256 => uint256) public lockedTokens; // Mapping from token ID to lock approved address mapping(uint256 => address) private _lockApprovals; // Mapping from owner to lock operator approvals mapping(address => mapping(address => bool)) private _lockOperatorApprovals; /** * @dev See {IERC5058-lockApprove}. */ function lockApprove(address to, uint256 tokenId) public virtual override { require(!isLocked(tokenId), "ERC5058: token is locked"); address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC5058: lock approval to current owner"); require( _msgSender() == owner || isLockApprovedForAll(owner, _msgSender()), "ERC5058: lock approve caller is not owner nor approved for all" ); _lockApprove(owner, to, tokenId); } /** * @dev See {IERC5058-getLockApproved}. */ function getLockApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC5058: lock approved query for nonexistent token"); return _lockApprovals[tokenId]; } /** * @dev See {IERC5058-lockerOf}. */ function lockerOf(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC5058: locker query for nonexistent token"); require(isLocked(tokenId), "ERC5058: locker query for non-locked token"); return _lockApprovals[tokenId]; } /** * @dev See {IERC5058-setLockApprovalForAll}. */ function setLockApprovalForAll(address operator, bool approved) public virtual override { _setLockApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC5058-isLockApprovedForAll}. */ function isLockApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _lockOperatorApprovals[owner][operator]; } /** * @dev See {IERC5058-isLocked}. */ function isLocked(uint256 tokenId) public view virtual override returns (bool) { return lockedTokens[tokenId] > block.timestamp; } /** * @dev See {IERC5058-lockFrom}. */ function lockFrom( address from, uint256 tokenId, uint256 expired ) public virtual override { //solhint-disable-next-line max-line-length require(_isLockApprovedOrOwner(_msgSender(), tokenId), "ERC5058: lock caller is not owner nor approved"); require(expired > block.timestamp, "ERC5058: expired time must be greater than current block time"); require(!isLocked(tokenId), "ERC5058: token is locked"); _lock(_msgSender(), from, tokenId, expired); } /** * @dev See {IERC5058-unlockFrom}. */ function unlockFrom(address from, uint256 tokenId) public virtual override { require(lockerOf(tokenId) == _msgSender(), "ERC5058: unlock caller is not lock operator"); require(ERC721.ownerOf(tokenId) == from, "ERC5058: unlock from incorrect owner"); _beforeTokenLock(_msgSender(), from, tokenId, 0); delete lockedTokens[tokenId]; emit Unlocked(_msgSender(), from, tokenId); _afterTokenLock(_msgSender(), from, tokenId, 0); } /** * @dev Locks `tokenId` from `from` until `expired`. * * Requirements: * * - `tokenId` token must be owned by `from`. * * Emits a {Locked} event. */ function _lock( address operator, address from, uint256 tokenId, uint256 expired ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC5058: lock from incorrect owner"); _beforeTokenLock(operator, from, tokenId, expired); lockedTokens[tokenId] = expired; _lockApprovals[tokenId] = _msgSender(); emit Locked(operator, from, tokenId, expired); _afterTokenLock(operator, from, tokenId, expired); } /** * @dev Safely mints `tokenId` and transfers it to `to`, but the `tokenId` is locked and cannot be transferred. * * Requirements: * * - `tokenId` must not exist. * * Emits {Locked} and {Transfer} event. */ function _safeLockMint( address to, uint256 tokenId, uint256 expired, bytes memory _data ) internal virtual { require(expired > block.timestamp, "ERC5058: lock mint for invalid lock block time"); _safeMint(to, tokenId, _data); _lock(address(0), to, tokenId, expired); } /** * @dev See {ERC721-_burn}. This override additionally clears the lock approvals for the token. */ function _burn(uint256 tokenId) internal virtual override { address owner = ERC721.ownerOf(tokenId); super._burn(tokenId); _beforeTokenLock(_msgSender(), owner, tokenId, 0); // clear lock approvals delete lockedTokens[tokenId]; delete _lockApprovals[tokenId]; _afterTokenLock(_msgSender(), owner, tokenId, 0); } /** * @dev Approve `to` to lock operate on `tokenId` * * Emits a {LockApproval} event. */ function _lockApprove( address owner, address to, uint256 tokenId ) internal virtual { _lockApprovals[tokenId] = to; emit LockApproval(owner, to, tokenId); } /** * @dev Approve `operator` to lock operate on all of `owner` tokens * * Emits a {LockApprovalForAll} event. */ function _setLockApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC5058: lock approve to caller"); _lockOperatorApprovals[owner][operator] = approved; emit LockApprovalForAll(owner, operator, approved); } /** * @dev Returns whether `spender` is allowed to lock `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isLockApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC5058: lock operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || isLockApprovedForAll(owner, spender) || getLockApproved(tokenId) == spender); } /** * @dev See {ERC721-_beforeTokenTransfer}. * * Requirements: * * - the `tokenId` must not be locked. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); require(!isLocked(tokenId), "ERC5058: token transfer while locked"); } /** * @dev Hook that is called before any token lock/unlock. * * Calling conditions: * * - `from` is non-zero. * - When `expired` is zero, `tokenId` will be unlock for `from`. * - When `expired` is non-zero, ``from``'s `tokenId` will be locked. * */ function _beforeTokenLock( address operator, address from, uint256 tokenId, uint256 expired ) internal virtual {} /** * @dev Hook that is called after any lock/unlock of tokens. * * Calling conditions: * * - `from` is non-zero. * - When `expired` is zero, `tokenId` will be unlock for `from`. * - When `expired` is non-zero, ``from``'s `tokenId` will be locked. * */ function _afterTokenLock( address operator, address from, uint256 tokenId, uint256 expired ) internal virtual {} /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC5058).interfaceId || super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT // Creator: [email protected] pragma solidity ^0.8.8; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; /** * @dev ERC-721 Non-Fungible Token Standard, optional lockable extension * ERC721 Token that can be locked for a certain period and cannot be transferred. * This is designed for a non-escrow staking contract that comes later to lock a user's NFT * while still letting them keep it in their wallet. * This extension can ensure the security of user tokens during the staking period. * If the nft lending protocol is compatible with this extension, the trouble caused by the NFT * airdrop can be avoided, because the airdrop is still in the user's wallet */ interface IERC5058 is IERC721 { /** * @dev Emitted when `tokenId` token is locked by `operator` from `from`. */ event Locked(address indexed operator, address indexed from, uint256 indexed tokenId, uint256 expired); /** * @dev Emitted when `tokenId` token is unlocked by `operator` from `from`. */ event Unlocked(address indexed operator, address indexed from, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to lock the `tokenId` token. */ event LockApproval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to lock all of its tokens. */ event LockApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the locker who is locking the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function lockerOf(uint256 tokenId) external view returns (address locker); /** * @dev Lock `tokenId` token until the block number is greater than `expired` to be unlocked. * * Requirements: * * - `from` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - `expired` must be greater than block.timestamp * - If the caller is not `from`, it must be approved to lock this token * by either {lockApprove} or {setLockApprovalForAll}. * * Emits a {Locked} event. */ function lockFrom( address from, uint256 tokenId, uint256 expired ) external; /** * @dev Unlock `tokenId` token. * * Requirements: * * - `from` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - the caller must be the operator who locks the token by {lockFrom} * * Emits a {Unlocked} event. */ function unlockFrom(address from, uint256 tokenId) external; /** * @dev Gives permission to `to` to lock `tokenId` token. * * Requirements: * * - The caller must own the token or be an approved lock operator. * - `tokenId` must exist. * * Emits an {LockApproval} event. */ function lockApprove(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an lock operator for the caller. * Operators can call {lockFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {LockApprovalForAll} event. */ function setLockApprovalForAll(address operator, bool approved) external; /** * @dev Returns the account lock approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getLockApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to lock all of the assets of `owner`. * * See {setLockApprovalForAll} */ function isLockApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Returns if the `tokenId` token is locked. */ function isLocked(uint256 tokenId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol) pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet. * ==== */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastValue; // Update the index for the moved value set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { return _values(set._inner); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol) pragma solidity ^0.8.0; import "./IAccessControlEnumerable.sol"; import "./AccessControl.sol"; import "../utils/structs/EnumerableSet.sol"; /** * @dev Extension of {AccessControl} that allows enumerating the members of each role. */ abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl { using EnumerableSet for EnumerableSet.AddressSet; mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) { return _roleMembers[role].at(index); } /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) { return _roleMembers[role].length(); } /** * @dev Overload {_grantRole} to track enumerable memberships */ function _grantRole(bytes32 role, address account) internal virtual override { super._grantRole(role, account); _roleMembers[role].add(account); } /** * @dev Overload {_revokeRole} to track enumerable memberships */ function _revokeRole(bytes32 role, address account) internal virtual override { super._revokeRole(role, account); _roleMembers[role].remove(account); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; /** * @dev External interface of AccessControlEnumerable declared to support ERC165 detection. */ interface IAccessControlEnumerable is IAccessControl { /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) external view returns (address); /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `_msgSender()` is missing `role`. * Overriding this function changes the behavior of the {onlyRole} modifier. * * Format of the revert message is described in {_checkRole}. * * _Available since v4.6._ */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(uint160(account), 20), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * May emit a {RoleGranted} event. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"collection","type":"address"}],"name":"CollectionAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"collection","type":"address"}],"name":"CollectionRemoved","type":"event"},{"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":"LockApproval","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":"LockApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"expired","type":"uint256"}],"name":"Locked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","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"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"}],"name":"TransferApprove","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"}],"name":"TransferDisapprove","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Unlocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"BURNER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PAUSER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SET_BASE_TOKEN_URI_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UNBIND_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UNPAUSER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WITHDRAWER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"collection","type":"address"}],"name":"addCollection","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"addTransferApproval","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"allSlaveTokenLength","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":"baseTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bound","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burnBound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"deleteDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"exists","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":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getLockApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isLockApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"isLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"collection","type":"address"}],"name":"isSlaveCollection","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"isSlaveToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"isTransferApproval","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"lockApprove","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"expired","type":"uint256"}],"name":"lockFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"expired","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"lockMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"lockedTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"lockerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"masterOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"mintBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"fromId","type":"uint256"},{"internalType":"uint256","name":"toId","type":"uint256"}],"name":"mintRange","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"boundTokenId","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onBoundERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","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":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"collection","type":"address"}],"name":"removeCollection","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"removeMaster","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"removeSlave","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"removeTransferApproval","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"resetTokenRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeMint","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":"string","name":"_baseTokenURI","type":"string"}],"name":"setBaseTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setDefaultRoyaltyInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"factory","type":"address"}],"name":"setFactory","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setLockApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"roleId","type":"bytes32"},{"internalType":"bytes32","name":"adminRoleId","type":"bytes32"}],"name":"setRoleAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint96","name":"fraction","type":"uint96"}],"name":"setTokenRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256","name":"hostTokenId","type":"uint256"}],"name":"slaveMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"slaveTokenByIndex","outputs":[{"components":[{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"internalType":"struct ERC721Attachable.BoundToken","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"slaveTokens","outputs":[{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"unlockFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_receiver","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAddress","type":"address"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAddress","type":"address"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"}],"name":"withdrawERC721","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b50604051806040016040528060058152602001644c6f6f6b6960d81b815250604051806040016040528060058152602001644c4f4f4b4960d81b81525060405180608001604052806043815260200162006006604391398083836200007633620001f3565b81516200008b9060059060208501906200061f565b508051620000a19060069060208401906200061f565b5050600b805460ff1916905550620000da7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a3362000243565b620001067f427da25fe773164f88948d3e215c94b6554e2ed5e5f203a821c9f2f6131cf75a3362000243565b620001327f10dac8c06a04bec0b551627dad28bc00d6516b0caacd1c7b345fcdb5211334e43362000243565b6200014d60008051602062005fe68339815191523362000243565b620001588162000286565b506200016660003362000243565b620001927f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a63362000243565b620001be7f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a8483362000243565b620001ea7f8378e411615856da82f6ab87f6d0060c19c0e71c4ff9dc58c6b8976c23a1deee3362000243565b5050506200087c565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6200025a8282620002b660201b620024531760201c565b600082815260026020908152604090912062000281918390620024be6200033f821b17901c565b505050565b60008051602062005fe6833981519152620002a1816200035f565b81516200028190600c9060208501906200061f565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff166200033b5760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45b5050565b600062000356836001600160a01b0384166200036e565b90505b92915050565b6200036b8133620003c0565b50565b6000818152600183016020526040812054620003b75750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000359565b50600062000359565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff166200033b576200040c816001600160a01b031660146200046660201b620024d31760201c565b62000422836020620024d362000466821b17811c565b60405160200162000435929190620006f8565b60408051601f198184030181529082905262461bcd60e51b82526200045d9160040162000771565b60405180910390fd5b6060600062000477836002620007bc565b62000484906002620007de565b6001600160401b038111156200049e576200049e620007f9565b6040519080825280601f01601f191660200182016040528015620004c9576020820181803683370190505b509050600360fc1b81600081518110620004e757620004e76200080f565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106200051957620005196200080f565b60200101906001600160f81b031916908160001a90535060006200053f846002620007bc565b6200054c906001620007de565b90505b6001811115620005ce576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106200058457620005846200080f565b1a60f81b8282815181106200059d576200059d6200080f565b60200101906001600160f81b031916908160001a90535060049490941c93620005c68162000825565b90506200054f565b508315620003565760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016200045d565b8280546200062d906200083f565b90600052602060002090601f0160209004810192826200065157600085556200069c565b82601f106200066c57805160ff19168380011785556200069c565b828001600101855582156200069c579182015b828111156200069c5782518255916020019190600101906200067f565b50620006aa929150620006ae565b5090565b5b80821115620006aa5760008155600101620006af565b60005b83811015620006e2578181015183820152602001620006c8565b83811115620006f2576000848401525b50505050565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835162000732816017850160208801620006c5565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835162000765816028840160208801620006c5565b01602801949350505050565b602081526000825180602084015262000792816040850160208701620006c5565b601f01601f19169190910160400192915050565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615620007d957620007d9620007a6565b500290565b60008219821115620007f457620007f4620007a6565b500190565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600081620008375762000837620007a6565b506000190190565b600181811c908216806200085457607f821691505b602082108114156200087657634e487b7160e01b600052602260045260246000fd5b50919050565b61575a806200088c6000396000f3fe608060405234801561001057600080fd5b50600436106104965760003560e01c806375ceb34111610262578063b88d4fde11610151578063e63ab1e9116100ce578063f2fde38b11610092578063f2fde38b14610b7d578063f3fef3a314610b90578063f4bbcb2914610ba3578063f6aacfb114610bb6578063fb1bb9de14610bd8578063fe50748114610bff57600080fd5b8063e63ab1e914610aa4578063e985e9c514610acb578063ea8876fa14610b07578063ec4d8cd914610b1a578063f176d4c114610b5157600080fd5b8063cc4aa03311610115578063cc4aa03314610a41578063d539139314610a54578063d547741f14610a69578063d547cfb714610a7c578063dcec329414610a8457600080fd5b8063b88d4fde146109e2578063be4df7d6146109f5578063c1016d8714610a08578063c87b56dd14610a1b578063ca15c87314610a2e57600080fd5b806391d14854116101df578063a174e77a116101a3578063a174e77a14610985578063a217fddf14610998578063a22cb465146109a0578063a2476405146109b3578063aa1b103f146109da57600080fd5b806391d1485414610919578063940ddd3b1461092c57806395d89b411461093f5780639f1a6a0d14610947578063a0ccf3a81461097257600080fd5b80638a616bc0116102265780638a616bc0146108935780638da5cb5b146108a65780638eb43e77146108b75780639010d07c146108ca57806391c79cd7146108dd57600080fd5b806375ceb3411461083d5780637ac3ba4b146108505780638456cb591461086357806385f438c11461086b5780638832e6e31461088057600080fd5b806336568abe1161038957806354231fe0116103065780636352211e116102ca5780636352211e146107b657806369b67970146107c95780636c1a72de146107dc578063709418f81461080f57806370a0823114610822578063715018a61461083557600080fd5b806354231fe01461075f5780635493f09a146107725780635944c753146107855780635bb47808146107985780635c975abb146107ab57600080fd5b806344004cc11161034d57806344004cc1146107005780634ce17b86146107135780634f558e79146107265780634f6ccce7146107395780635028d05a1461074c57600080fd5b806336568abe146106ac5780633f4ba83a146106bf57806340c10f19146106c757806342842e0e146106da57806342966c68146106ed57600080fd5b8063241ede6f116104175780632f2ff15d116103db5780632f2ff15d146106405780632f4f336c146106535780632f745c591461066657806330176e131461067957806332c56e761461068c57600080fd5b8063241ede6f14610589578063248a9ca3146105b057806326247394146105d4578063282c51f3146105e75780632a55205a1461060e57600080fd5b8063179a9c0f1161045e578063179a9c0f1461052b57806318160ddd1461053e57806319a04d43146105505780631e4e00911461056357806323b872dd1461057657600080fd5b806301ffc9a71461049b57806306fdde03146104c3578063081812fc146104d8578063095ea7b314610503578063121cba1914610518575b600080fd5b6104ae6104a9366004614b29565b610c12565b60405190151581526020015b60405180910390f35b6104cb610c23565b6040516104ba9190614b9e565b6104eb6104e6366004614bb1565b610cb5565b6040516001600160a01b0390911681526020016104ba565b610516610511366004614bdf565b610cdc565b005b6104eb610526366004614bb1565b610df7565b610516610539366004614bdf565b610eee565b600f545b6040519081526020016104ba565b61051661055e366004614c27565b61105f565b610516610571366004614c5c565b611075565b610516610584366004614c7e565b611087565b6105427f8378e411615856da82f6ab87f6d0060c19c0e71c4ff9dc58c6b8976c23a1deee81565b6105426105be366004614bb1565b6000908152600160208190526040909120015490565b6105166105e2366004614bdf565b611092565b6105427f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a84881565b61062161061c366004614c5c565b6111d5565b604080516001600160a01b0390931683526020830191909152016104ba565b61051661064e366004614cbf565b611281565b6104ae610661366004614cef565b6112a7565b610542610674366004614bdf565b6112b4565b610516610687366004614dab565b61134a565b61054261069a366004614bb1565b60009081526016602052604090205490565b6105166106ba366004614cbf565b611387565b610516611401565b6105166106d5366004614bdf565b611433565b6105166106e8366004614c7e565b611455565b6105166106fb366004614bb1565b611470565b61051661070e366004614c7e565b61152c565b6104eb610721366004614bb1565b6115be565b6104ae610734366004614bb1565b611630565b610542610747366004614bb1565b61163b565b61051661075a366004614cef565b6116ce565b61051661076d366004614bb1565b61177f565b610516610780366004614df4565b6117d9565b610516610793366004614e29565b611920565b6105166107a6366004614cef565b611933565b600b5460ff166104ae565b6104eb6107c4366004614bb1565b611944565b6105166107d7366004614bb1565b6119a4565b6106216107ea366004614bb1565b601560205260009081526040902080546001909101546001600160a01b039091169082565b61051661081d366004614e67565b611a3e565b610542610830366004614cef565b611a62565b610516611ae8565b61051661084b366004614eaf565b611afc565b6104ae61085e366004614cef565b611b53565b610516611b60565b6105426000805160206156e583398151915281565b61051661088e366004614f57565b611b92565b6105166108a1366004614bb1565b611bbb565b6000546001600160a01b03166104eb565b6105166108c5366004614bb1565b611bd4565b6104eb6108d8366004614c5c565b611c07565b6104ae6108eb366004614fb0565b6001600160a01b03918216600090815260136020908152604080832093909416825291909152205460ff1690565b6104ae610927366004614cbf565b611c26565b61051661093a366004614fde565b611c51565b6104cb611c75565b6104ae610955366004614bb1565b6000908152601560205260409020546001600160a01b0316151590565b610516610980366004614cef565b611c84565b610516610993366004614cef565b611d26565b610542600081565b6105166109ae36600461504f565b611ddc565b6105427f6b521adf58940c63bb43368c60a96aec5f239edbadca7e2b6e56f3b8ff34ef0181565b610516611de7565b6105166109f036600461507d565b611df9565b6014546104eb906001600160a01b031681565b6104eb610a16366004614bb1565b611e05565b6104cb610a29366004614bb1565b611e55565b610542610a3c366004614bb1565b611ebb565b610516610a4f366004614cef565b611ed2565b61054260008051602061570583398151915281565b610516610a77366004614cbf565b611f80565b6104cb611fa6565b610542610a92366004614bb1565b60116020526000908152604090205481565b6105427f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b6104ae610ad9366004614fb0565b6001600160a01b039182166000908152600a6020908152604080832093909416825291909152205460ff1690565b610516610b15366004614df4565b612034565b610b2d610b28366004614c5c565b61206f565b6040805182516001600160a01b0316815260209283015192810192909252016104ba565b610b64610b5f3660046150d1565b612151565b6040516001600160e01b031990911681526020016104ba565b610516610b8b366004614cef565b6122e6565b610516610b9e366004614bdf565b61235c565b610516610bb136600461504f565b61237e565b6104ae610bc4366004614bb1565b600090815260116020526040902054421090565b6105427f427da25fe773164f88948d3e215c94b6554e2ed5e5f203a821c9f2f6131cf75a81565b610516610c0d36600461517b565b612389565b6000610c1d8261266f565b92915050565b606060058054610c3290615248565b80601f0160208091040260200160405190810160405280929190818152602001828054610c5e90615248565b8015610cab5780601f10610c8057610100808354040283529160200191610cab565b820191906000526020600020905b815481529060010190602001808311610c8e57829003601f168201915b5050505050905090565b6000610cc08261267a565b506000908152600960205260409020546001600160a01b031690565b6000610ce782611944565b9050806001600160a01b0316836001600160a01b03161415610d5a5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b0382161480610d765750610d768133610ad9565b610de85760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152608401610d51565b610df283836126ca565b505050565b6000610e0282612738565b610e625760405162461bcd60e51b815260206004820152602b60248201527f455243353035383a206c6f636b657220717565727920666f72206e6f6e65786960448201526a39ba32b73a103a37b5b2b760a91b6064820152608401610d51565b6000828152601160205260409020544210610ed25760405162461bcd60e51b815260206004820152602a60248201527f455243353035383a206c6f636b657220717565727920666f72206e6f6e2d6c6f60448201526931b5b2b2103a37b5b2b760b11b6064820152608401610d51565b506000908152601260205260409020546001600160a01b031690565b600081815260116020526040902054421015610f475760405162461bcd60e51b8152602060048201526018602482015277115490cd4c0d4e0e881d1bdad95b881a5cc81b1bd8dad95960421b6044820152606401610d51565b6000610f5282611944565b9050806001600160a01b0316836001600160a01b03161415610fc65760405162461bcd60e51b815260206004820152602760248201527f455243353035383a206c6f636b20617070726f76616c20746f2063757272656e6044820152663a1037bbb732b960c91b6064820152608401610d51565b336001600160a01b0382161480610fe25750610fe281336108eb565b6110545760405162461bcd60e51b815260206004820152603e60248201527f455243353035383a206c6f636b20617070726f76652063616c6c65722069732060448201527f6e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152608401610d51565b610df2818484612755565b6110676127b1565b611071828261280b565b5050565b61107d6127b1565b61107182826128c5565b610df2838383612912565b3361109c82610df7565b6001600160a01b0316146111065760405162461bcd60e51b815260206004820152602b60248201527f455243353035383a20756e6c6f636b2063616c6c6572206973206e6f74206c6f60448201526a31b59037b832b930ba37b960a91b6064820152608401610d51565b816001600160a01b031661111982611944565b6001600160a01b03161461117b5760405162461bcd60e51b8152602060048201526024808201527f455243353035383a20756e6c6f636b2066726f6d20696e636f7272656374206f6044820152633bb732b960e11b6064820152608401610d51565b611183565b50565b6000818152601160205260408082208290555182916001600160a01b0385169133917fe6e0ef9cd056ca98561ca60e347ada61e1ede2f1142a078951b7a52e1e508e6091a46110713383836000612aa6565b60008281526004602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b031692820192909252829161124a5750604080518082019091526003546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090611269906001600160601b031687615299565b61127391906152ce565b915196919550909350505050565b6000828152600160208190526040909120015461129d81612c1a565b610df28383612c24565b6000610c1d601883612c46565b60006112bf83611a62565b82106113215760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610d51565b506001600160a01b03919091166000908152600d60209081526040808320938352929052205490565b7f6b521adf58940c63bb43368c60a96aec5f239edbadca7e2b6e56f3b8ff34ef0161137481612c1a565b8151610df290600c906020850190614a33565b6001600160a01b03811633146113f75760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610d51565b6110718282612c68565b7f427da25fe773164f88948d3e215c94b6554e2ed5e5f203a821c9f2f6131cf75a61142b81612c1a565b611180612c8a565b60008051602061570583398151915261144b81612c1a565b610df28383612cdc565b610df283838360405180602001604052806000815250611df9565b61147b335b82612e1b565b806114ab57506114ab7f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a84833611c26565b806114c65750336114bb82611e05565b6001600160a01b0316145b6115235760405162461bcd60e51b815260206004820152602860248201527f4552433732313a2063616c6c6572206973206e6f74206f776e6572206e6f7220604482015267185c1c1c9bdd995960c21b6064820152608401610d51565b61118081612e9a565b6000805160206156e583398151915261154481612c1a565b60405163a9059cbb60e01b81526001600160a01b0384811660048301526024820184905285169063a9059cbb906044016020604051808303816000875af1158015611593573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115b791906152e2565b5050505050565b60006115c982612738565b610ed25760405162461bcd60e51b815260206004820152603260248201527f455243353035383a206c6f636b20617070726f76656420717565727920666f72604482015271103737b732bc34b9ba32b73a103a37b5b2b760711b6064820152608401610d51565b6000610c1d82612738565b6000611646600f5490565b82106116a95760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610d51565b600f82815481106116bc576116bc6152ff565b90600052602060002001549050919050565b6116d66127b1565b6116e1601882612c46565b61173c5760405162461bcd60e51b815260206004820152602660248201527f45524337323141747461636861626c653a20636f6c6c656374696f6e206e6f7460448201526520736c61766560d01b6064820152608401610d51565b611747601882612ea3565b506040516001600160a01b038216907fa0691bd707b2f65c33c8343d61c274df72c6b5007937dcfbc31aa5a0d0f6fe3c90600090a250565b601454604051630852cd8d60e31b8152600481018390526001600160a01b03909116906342966c6890602401600060405180830381600087803b1580156117c557600080fd5b505af11580156115b7573d6000803e3d6000fd5b6117e33383612eb8565b6118465760405162461bcd60e51b815260206004820152602e60248201527f455243353035383a206c6f636b2063616c6c6572206973206e6f74206f776e6560448201526d1c881b9bdc88185c1c1c9bdd995960921b6064820152608401610d51565b4281116118bb5760405162461bcd60e51b815260206004820152603d60248201527f455243353035383a20657870697265642074696d65206d75737420626520677260448201527f6561746572207468616e2063757272656e7420626c6f636b2074696d650000006064820152608401610d51565b6000828152601160205260409020544210156119145760405162461bcd60e51b8152602060048201526018602482015277115490cd4c0d4e0e881d1bdad95b881a5cc81b1bd8dad95960421b6044820152606401610d51565b610df233848484612f95565b6119286127b1565b610df2838383613084565b61193b6127b1565b6111808161314f565b6000818152600760205260408120546001600160a01b031680610c1d5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610d51565b6119ce7f8378e411615856da82f6ab87f6d0060c19c0e71c4ff9dc58c6b8976c23a1deee33611c26565b806119e95750336119de82611e05565b6001600160a01b0316145b611a355760405162461bcd60e51b815260206004820152601760248201527f4552433732313a206e6f7420756e62696e6420726f6c650000000000000000006044820152606401610d51565b611180816131da565b600080516020615705833981519152611a5681612c1a565b6115b78585858561328c565b60006001600160a01b038216611acc5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610d51565b506001600160a01b031660009081526008602052604090205490565b611af06127b1565b611afa60006132ff565b565b600080516020615705833981519152611b1481612c1a565b60005b828110156115b757611b4185858584818110611b3557611b356152ff565b90506020020135612cdc565b80611b4b81615315565b915050611b17565b6000610c1d601a83612c46565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a611b8a81612c1a565b61118061334f565b600080516020615705833981519152611baa81612c1a565b611bb584848461338c565b50505050565b611bc36127b1565b600090815260046020526040812055565b7f8378e411615856da82f6ab87f6d0060c19c0e71c4ff9dc58c6b8976c23a1deee611bfe81612c1a565b611071826133bf565b6000828152600260205260408120611c1f9083613526565b9392505050565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600080516020615705833981519152611c6981612c1a565b6115b785858585613532565b606060068054610c3290615248565b611c8c6127b1565b611c97601a82612c46565b611ce35760405162461bcd60e51b815260206004820152601e60248201527f45524337323141747461636861626c653a206e6f7420617070726f76656400006044820152606401610d51565b611cee601a82612ea3565b506040516001600160a01b038216907fa067f99427db91329926fe838e69bf65a2cbfcfe35670d0c807e0a059664616090600090a250565b611d2e6127b1565b611d39601882612c46565b15611d995760405162461bcd60e51b815260206004820152602a60248201527f45524337323141747461636861626c653a20636f6c6c656374696f6e20616c726044820152696561647920736c61766560b01b6064820152608401610d51565b611da46018826124be565b506040516001600160a01b038216907f7701426aaa4c0c88a30924a7aba88dce66b18c4020b54e4e19c9e0eb0abc299290600090a250565b6110713383836135b0565b611def6127b1565b611afa6000600355565b611bb584848484613680565b6000818152601560205260408120546001600160a01b0316611e395760405162461bcd60e51b8152600401610d5190615330565b506000908152601560205260409020546001600160a01b031690565b6060611e608261267a565b6000611e6a613800565b90506000815111611e8a5760405180602001604052806000815250611c1f565b80611e948461380f565b604051602001611ea5929190615371565b6040516020818303038152906040529392505050565b6000818152600260205260408120610c1d9061390d565b611eda6127b1565b611ee5601a82612c46565b15611f3d5760405162461bcd60e51b815260206004820152602260248201527f45524337323141747461636861626c653a20616c726561647920617070726f76604482015261195960f21b6064820152608401610d51565b611f48601a826124be565b506040516001600160a01b038216907fd62044ed2ee3ee4b9e9539cff949fcce21f6edf85844020b8cbec05dd63c971a90600090a250565b60008281526001602081905260409091200154611f9c81612c1a565b610df28383612c68565b600c8054611fb390615248565b80601f0160208091040260200160405190810160405280929190818152602001828054611fdf90615248565b801561202c5780601f106120015761010080835404028352916020019161202c565b820191906000526020600020905b81548152906001019060200180831161200f57829003601f168201915b505050505081565b60008051602061570583398151915261204c81612c1a565b818311611bb55761205d8484612cdc565b8261206781615315565b93505061204c565b604080518082019091526000808252602082015260008381526016602052604090205482106120f65760405162461bcd60e51b815260206004820152602d60248201527f45524337323141747461636861626c653a20746f6b656e496420696e6465782060448201526c6f7574206f6620626f756e647360981b6064820152608401610d51565b6000838152601660205260409020805483908110612116576121166152ff565b60009182526020918290206040805180820190915260029092020180546001600160a01b031682526001015491810191909152905092915050565b600061215c336112a7565b6121c45760405162461bcd60e51b815260206004820152603360248201527f45524337323141747461636861626c653a20736c61766520746f206e6f6e206260448201527237bab73222a9219b9918903932b1b2b4bb32b960691b6064820152608401610d51565b6001600160a01b038616156122c857856001600160a01b03166121e685611944565b6001600160a01b03161461224f5760405162461bcd60e51b815260206004820152602a60248201527f45524337323141747461636861626c653a20736c61766520746f20696e636f726044820152693932b1ba1037bbb732b960b11b6064820152608401610d51565b6000848152601660208181526040808420805433808752601785528387208c8852855283872082905594845282518084019093529382528183018a81526001808601835591865292909420905160029093020180546001600160a01b0319166001600160a01b03909316929092178255519101556122d3565b6122d3843387613917565b5063f176d4c160e01b9695505050505050565b6122ee6127b1565b6001600160a01b0381166123535760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d51565b611180816132ff565b6000805160206156e583398151915261237481612c1a565b610df28383613a7e565b611071338383613b97565b6000805160206156e58339815191526123a181612c1a565b60005b82518110156115b757846001600160a01b03166323b872dd30868685815181106123d0576123d06152ff565b60209081029190910101516040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b15801561242a57600080fd5b505af115801561243e573d6000803e3d6000fd5b505050508061244c90615315565b90506123a4565b61245d8282611c26565b6110715760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b6000611c1f836001600160a01b038416613c5e565b606060006124e2836002615299565b6124ed9060026153a0565b67ffffffffffffffff81111561250557612505614d0c565b6040519080825280601f01601f19166020018201604052801561252f576020820181803683370190505b509050600360fc1b8160008151811061254a5761254a6152ff565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612579576125796152ff565b60200101906001600160f81b031916908160001a905350600061259d846002615299565b6125a89060016153a0565b90505b6001811115612620576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106125dc576125dc6152ff565b1a60f81b8282815181106125f2576125f26152ff565b60200101906001600160f81b031916908160001a90535060049490941c93612619816153b8565b90506125ab565b508315611c1f5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610d51565b6000610c1d82613cad565b61268381612738565b6111805760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610d51565b600081815260096020526040902080546001600160a01b0319166001600160a01b03841690811790915581906126ff82611944565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000908152600760205260409020546001600160a01b0316151590565b60008181526012602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fbd5378dc6d0395c338ca88b324966808490d6a9983bbc7a0f7a8429a44a3176291a4505050565b6000546001600160a01b03163314611afa5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d51565b6127106001600160601b03821611156128365760405162461bcd60e51b8152600401610d51906153cf565b6001600160a01b03821661288c5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610d51565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600355565b6000828152600160208190526040808320909101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b6000818152601560205260409020546001600160a01b03161561298b576000818152601560205260409020546001600160a01b031633141561295957610df2838383613cd2565b612964601a33612c46565b6129805760405162461bcd60e51b8152600401610d5190615419565b610df2838383613e79565b612996838383613e79565b60005b600082815260166020526040902054811015611bb55760008281526016602052604090208054829081106129cf576129cf6152ff565b600091825260208083206002909202909101548483526016909152604090912080546001600160a01b03909216916323b872dd91879187919086908110612a1857612a186152ff565b60009182526020909120600160029092020101546040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b158015612a7b57600080fd5b505af1158015612a8f573d6000803e3d6000fd5b505050508080612a9e90615315565b915050612999565b6014546001600160a01b031615611bb5578015612b44576001600160a01b03841615612b3f57601454604051638832e6e360e01b81523360048201526024810184905260606044820152600060648201526001600160a01b0390911690638832e6e390608401600060405180830381600087803b158015612b2657600080fd5b505af1158015612b3a573d6000803e3d6000fd5b505050505b611bb5565b601454604051634f558e7960e01b8152600481018490526001600160a01b0390911690634f558e7990602401602060405180830381865afa158015612b8d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bb191906152e2565b15611bb557601454604051630852cd8d60e31b8152600481018490526001600160a01b03909116906342966c6890602401600060405180830381600087803b158015612bfc57600080fd5b505af1158015612c10573d6000803e3d6000fd5b5050505050505050565b6111808133613ea9565b612c2e8282612453565b6000828152600260205260409020610df290826124be565b6001600160a01b03811660009081526001830160205260408120541515611c1f565b612c728282613f0d565b6000828152600260205260409020610df29082612ea3565b612c92613f74565b600b805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b038216612d325760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610d51565b612d3b81612738565b15612d885760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610d51565b612d9460008383613fbd565b6001600160a01b0382166000908152600860205260408120805460019290612dbd9084906153a0565b909155505060008181526007602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600080612e2783611944565b9050806001600160a01b0316846001600160a01b03161480612e6e57506001600160a01b038082166000908152600a602090815260408083209388168352929052205460ff165b80612e925750836001600160a01b0316612e8784610cb5565b6001600160a01b0316145b949350505050565b61118081613fc8565b6000611c1f836001600160a01b038416613fd1565b6000612ec382612738565b612f2a5760405162461bcd60e51b815260206004820152603260248201527f455243353035383a206c6f636b206f70657261746f7220717565727920666f72604482015271103737b732bc34b9ba32b73a103a37b5b2b760711b6064820152608401610d51565b6000612f3583611944565b9050806001600160a01b0316846001600160a01b03161480612f7c57506001600160a01b0380821660009081526013602090815260408083209388168352929052205460ff165b80612e925750836001600160a01b0316612e87846115be565b826001600160a01b0316612fa883611944565b6001600160a01b0316146130095760405162461bcd60e51b815260206004820152602260248201527f455243353035383a206c6f636b2066726f6d20696e636f7272656374206f776e60448201526132b960f11b6064820152608401610d51565b6000828152601160209081526040808320849055601282529182902080546001600160a01b031916331790558151838152915184926001600160a01b0387811693908916927f967ad762aa9070ada8db64577288e214771e89667066ae38e8750cb8a86c54299281900390910190a4611bb584848484612aa6565b6127106001600160601b03821611156130af5760405162461bcd60e51b8152600401610d51906153cf565b6001600160a01b0382166131055760405162461bcd60e51b815260206004820152601b60248201527f455243323938313a20496e76616c696420706172616d657465727300000000006044820152606401610d51565b6040805180820182526001600160a01b0393841681526001600160601b0392831660208083019182526000968752600490529190942093519051909116600160a01b029116179055565b6040516315dbbcbf60e11b81523060048201526001600160a01b03821690632bb7797e90602401602060405180830381865afa158015613193573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131b7919061546b565b601480546001600160a01b0319166001600160a01b039290921691909117905550565b6000818152601560205260409020546001600160a01b031661320e5760405162461bcd60e51b8152600401610d5190615330565b6000818152601560209081526040808320805460018201548351948501909352848452909361324d936001600160a01b039092169290918691906140c4565b6132695760405162461bcd60e51b8152600401610d5190615488565b50600090815260156020526040812080546001600160a01b031916815560010155565b600083815260156020908152604080832080546001600160a01b0319166001600160a01b0387161781556001810185905581519283019091529181526132d99084908790879086906140c4565b6132f55760405162461bcd60e51b8152600401610d5190615488565b6115b78585612cdc565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6133576141ae565b600b805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612cbf3390565b6133968383612cdc565b6133a360008484846141f4565b610df25760405162461bcd60e51b8152600401610d51906154ef565b6000818152601660205260408120541161341b5760405162461bcd60e51b815260206004820181905260248201527f45524337323141747461636861626c653a206e6f20736c61766520746f6b656e6044820152606401610d51565b600081815260166020526040812054905b8181101561350e576000838152601660205260409020805482908110613454576134546152ff565b600091825260208083206002909202909101548583526016909152604090912080546001600160a01b03909216916369b67970919084908110613499576134996152ff565b9060005260206000209060020201600101546040518263ffffffff1660e01b81526004016134c991815260200190565b600060405180830381600087803b1580156134e357600080fd5b505af11580156134f7573d6000803e3d6000fd5b50505050808061350690615315565b91505061342c565b50600082815260166020526040812061107191614ab7565b6000611c1f83836142ea565b4282116135985760405162461bcd60e51b815260206004820152602e60248201527f455243353035383a206c6f636b206d696e7420666f7220696e76616c6964206c60448201526d6f636b20626c6f636b2074696d6560901b6064820152608401610d51565b6135a384848361338c565b611bb56000858585612f95565b816001600160a01b0316836001600160a01b031614156136125760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610d51565b6001600160a01b038381166000818152600a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3191015b60405180910390a3505050565b6000828152601560205260409020546001600160a01b0316156136fb576000828152601560205260409020546001600160a01b03163314156136c857612b3f84848484614314565b6136d3601a33612c46565b6136ef5760405162461bcd60e51b8152600401610d5190615419565b612b3f84848484614347565b61370784848484614347565b60005b6000838152601660205260409020548110156115b7576000838152601660205260409020805482908110613740576137406152ff565b600091825260208083206002909202909101548583526016909152604090912080546001600160a01b039092169163b88d4fde91889188919086908110613789576137896152ff565b906000526020600020906002020160010154866040518563ffffffff1660e01b81526004016137bb9493929190615541565b600060405180830381600087803b1580156137d557600080fd5b505af11580156137e9573d6000803e3d6000fd5b5050505080806137f890615315565b91505061370a565b606061380a614379565b905090565b6060816138335750506040805180820190915260018152600360fc1b602082015290565b8160005b811561385d578061384781615315565b91506138569050600a836152ce565b9150613837565b60008167ffffffffffffffff81111561387857613878614d0c565b6040519080825280601f01601f1916602001820160405280156138a2576020820181803683370190505b5090505b8415612e92576138b760018361557e565b91506138c4600a86615595565b6138cf9060306153a0565b60f81b8183815181106138e4576138e46152ff565b60200101906001600160f81b031916908160001a905350613906600a866152ce565b94506138a6565b6000610c1d825490565b6000838152601660205260408120546139329060019061557e565b6001600160a01b0384166000908152601760209081526040808320868452825280832054888452601690925282208054939450909284908110613977576139776152ff565b60009182526020808320604080518082018252600290940290910180546001600160a01b031684526001810154848401528a8552601690925290922080549293509091849081106139ca576139ca6152ff565b6000918252602080832084516002939093020180546001600160a01b0319166001600160a01b039384161781559381015160019485015584548216835260178082526040808520958701548552948252848420879055918916835290815282822087835281528282208290558882526016905220805480613a4d57613a4d6155a9565b60008281526020812060026000199093019283020180546001600160a01b0319168155600101559055505050505050565b80471015613ace5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610d51565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114613b1b576040519150601f19603f3d011682016040523d82523d6000602084013e613b20565b606091505b5050905080610df25760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610d51565b816001600160a01b0316836001600160a01b03161415613bf95760405162461bcd60e51b815260206004820152601f60248201527f455243353035383a206c6f636b20617070726f766520746f2063616c6c6572006044820152606401610d51565b6001600160a01b03838116600081815260136020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527fbb3b2937fc41058c97e1ad0d0bbac3c664894dd823924eb7717d814fe700f0349101613673565b6000818152600183016020526040812054613ca557508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610c1d565b506000610c1d565b60006001600160e01b0319821663a80646d160e01b1480610c1d5750610c1d82614388565b826001600160a01b0316613ce582611944565b6001600160a01b031614613d495760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610d51565b6001600160a01b038216613dab5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610d51565b613db6838383613fbd565b613dc16000826126ca565b6001600160a01b0383166000908152600860205260408120805460019290613dea90849061557e565b90915550506001600160a01b0382166000908152600860205260408120805460019290613e189084906153a0565b909155505060008181526007602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b613e8233611475565b613e9e5760405162461bcd60e51b8152600401610d51906155bf565b610df2838383613cd2565b613eb38282611c26565b61107157613ecb816001600160a01b031660146124d3565b613ed68360206124d3565b604051602001613ee792919061560d565b60408051601f198184030181529082905262461bcd60e51b8252610d5191600401614b9e565b613f178282611c26565b156110715760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600b5460ff16611afa5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610d51565b610df28383836143ad565b611bc381614422565b600081815260018301602052604081205480156140ba576000613ff560018361557e565b85549091506000906140099060019061557e565b905081811461406e576000866000018281548110614029576140296152ff565b906000526020600020015490508087600001848154811061404c5761404c6152ff565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061407f5761407f6155a9565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610c1d565b6000915050610c1d565b60405163f176d4c160e01b81526000906001600160a01b0387169063f176d4c1906140fb9033908990899089908990600401615682565b6020604051808303816000875af1925050508015614136575060408051601f3d908101601f19168201909252614133918101906156c7565b60015b614190573d808015614164576040519150601f19603f3d011682016040523d82523d6000602084013e614169565b606091505b5080516141885760405162461bcd60e51b8152600401610d5190615488565b805181602001fd5b6001600160e01b03191663f176d4c160e01b14905095945050505050565b600b5460ff1615611afa5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610d51565b60006001600160a01b0384163b156142df57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290614238903390899088908890600401615541565b6020604051808303816000875af1925050508015614273575060408051601f3d908101601f19168201909252614270918101906156c7565b60015b6142c5573d8080156142a1576040519150601f19603f3d011682016040523d82523d6000602084013e6142a6565b606091505b5080516141885760405162461bcd60e51b8152600401610d51906154ef565b6001600160e01b031916630a85bd0160e11b149050612e92565b506001949350505050565b6000826000018281548110614301576143016152ff565b9060005260206000200154905092915050565b61431f848484613cd2565b61432b848484846141f4565b611bb55760405162461bcd60e51b8152600401610d51906154ef565b6143513383612e1b565b61436d5760405162461bcd60e51b8152600401610d51906155bf565b611bb584848484614314565b6060600c8054610c3290615248565b60006001600160e01b0319821663780e9d6360e01b1480610c1d5750610c1d826145c7565b6143b8838383614607565b600081815260116020526040902054421015610df25760405162461bcd60e51b8152602060048201526024808201527f455243353035383a20746f6b656e207472616e73666572207768696c65206c6f60448201526318dad95960e21b6064820152608401610d51565b61442b81614679565b600081815260156020526040902080546001600160a01b0316156144b5578054600182015460408051602081019091526000808252614478936001600160a01b03169290918691906140c4565b6144945760405162461bcd60e51b8152600401610d5190615488565b600082815260156020526040812080546001600160a01b0319168155600101555b6000828152601660205260409020548015610df25760005b818110156145af5760008481526016602052604090208054829081106144f5576144f56152ff565b600091825260208083206002909202909101548683526016909152604090912080546001600160a01b03909216916342966c6891908490811061453a5761453a6152ff565b9060005260206000209060020201600101546040518263ffffffff1660e01b815260040161456a91815260200190565b600060405180830381600087803b15801561458457600080fd5b505af1158015614598573d6000803e3d6000fd5b5050505080806145a790615315565b9150506144cd565b506000838152601660205260408120610df291614ab7565b60006001600160e01b031982166380ac58cd60e01b14806145f857506001600160e01b03198216635b5e139f60e01b145b80610c1d5750610c1d826146c5565b6146128383836146ea565b600b5460ff1615610df25760405162461bcd60e51b815260206004820152602b60248201527f4552433732315061757361626c653a20746f6b656e207472616e73666572207760448201526a1a1a5b19481c185d5cd95960aa1b6064820152608401610d51565b600061468482611944565b905061468f826147a2565b60008281526011602090815260408083208390556012909152902080546001600160a01b03191690556110713382846000612aa6565b60006001600160e01b0319821663152a902d60e11b1480610c1d5750610c1d82614849565b6001600160a01b0383166147455761474081600f80546000838152601060205260408120829055600182018355919091527f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac8020155565b614768565b816001600160a01b0316836001600160a01b03161461476857614768838261486e565b6001600160a01b03821661477f57610df28161490b565b826001600160a01b0316826001600160a01b031614610df257610df282826149ba565b60006147ad82611944565b90506147bb81600084613fbd565b6147c66000836126ca565b6001600160a01b03811660009081526008602052604081208054600192906147ef90849061557e565b909155505060008281526007602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b60006001600160e01b03198216635a05180f60e01b1480610c1d5750610c1d826149fe565b6000600161487b84611a62565b614885919061557e565b6000838152600e60205260409020549091508082146148d8576001600160a01b0384166000908152600d602090815260408083208584528252808320548484528184208190558352600e90915290208190555b506000918252600e602090815260408084208490556001600160a01b039094168352600d81528383209183525290812055565b600f5460009061491d9060019061557e565b600083815260106020526040812054600f8054939450909284908110614945576149456152ff565b9060005260206000200154905080600f8381548110614966576149666152ff565b600091825260208083209091019290925582815260109091526040808220849055858252812055600f80548061499e5761499e6155a9565b6001900381819060005260206000200160009055905550505050565b60006149c583611a62565b6001600160a01b039093166000908152600d602090815260408083208684528252808320859055938252600e9052919091209190915550565b60006001600160e01b03198216637965db0b60e01b1480610c1d57506301ffc9a760e01b6001600160e01b0319831614610c1d565b828054614a3f90615248565b90600052602060002090601f016020900481019282614a615760008555614aa7565b82601f10614a7a57805160ff1916838001178555614aa7565b82800160010185558215614aa7579182015b82811115614aa7578251825591602001919060010190614a8c565b50614ab3929150614ad8565b5090565b50805460008255600202906000526020600020908101906111809190614aed565b5b80821115614ab35760008155600101614ad9565b5b80821115614ab35780546001600160a01b031916815560006001820155600201614aee565b6001600160e01b03198116811461118057600080fd5b600060208284031215614b3b57600080fd5b8135611c1f81614b13565b60005b83811015614b61578181015183820152602001614b49565b83811115611bb55750506000910152565b60008151808452614b8a816020860160208601614b46565b601f01601f19169290920160200192915050565b602081526000611c1f6020830184614b72565b600060208284031215614bc357600080fd5b5035919050565b6001600160a01b038116811461118057600080fd5b60008060408385031215614bf257600080fd5b8235614bfd81614bca565b946020939093013593505050565b80356001600160601b0381168114614c2257600080fd5b919050565b60008060408385031215614c3a57600080fd5b8235614c4581614bca565b9150614c5360208401614c0b565b90509250929050565b60008060408385031215614c6f57600080fd5b50508035926020909101359150565b600080600060608486031215614c9357600080fd5b8335614c9e81614bca565b92506020840135614cae81614bca565b929592945050506040919091013590565b60008060408385031215614cd257600080fd5b823591506020830135614ce481614bca565b809150509250929050565b600060208284031215614d0157600080fd5b8135611c1f81614bca565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715614d4b57614d4b614d0c565b604052919050565b600067ffffffffffffffff831115614d6d57614d6d614d0c565b614d80601f8401601f1916602001614d22565b9050828152838383011115614d9457600080fd5b828260208301376000602084830101529392505050565b600060208284031215614dbd57600080fd5b813567ffffffffffffffff811115614dd457600080fd5b8201601f81018413614de557600080fd5b612e9284823560208401614d53565b600080600060608486031215614e0957600080fd5b8335614e1481614bca565b95602085013595506040909401359392505050565b600080600060608486031215614e3e57600080fd5b833592506020840135614e5081614bca565b9150614e5e60408501614c0b565b90509250925092565b60008060008060808587031215614e7d57600080fd5b8435614e8881614bca565b9350602085013592506040850135614e9f81614bca565b9396929550929360600135925050565b600080600060408486031215614ec457600080fd5b8335614ecf81614bca565b9250602084013567ffffffffffffffff80821115614eec57600080fd5b818601915086601f830112614f0057600080fd5b813581811115614f0f57600080fd5b8760208260051b8501011115614f2457600080fd5b6020830194508093505050509250925092565b600082601f830112614f4857600080fd5b611c1f83833560208501614d53565b600080600060608486031215614f6c57600080fd5b8335614f7781614bca565b925060208401359150604084013567ffffffffffffffff811115614f9a57600080fd5b614fa686828701614f37565b9150509250925092565b60008060408385031215614fc357600080fd5b8235614fce81614bca565b91506020830135614ce481614bca565b60008060008060808587031215614ff457600080fd5b8435614fff81614bca565b93506020850135925060408501359150606085013567ffffffffffffffff81111561502957600080fd5b61503587828801614f37565b91505092959194509250565b801515811461118057600080fd5b6000806040838503121561506257600080fd5b823561506d81614bca565b91506020830135614ce481615041565b6000806000806080858703121561509357600080fd5b843561509e81614bca565b935060208501356150ae81614bca565b925060408501359150606085013567ffffffffffffffff81111561502957600080fd5b60008060008060008060a087890312156150ea57600080fd5b86356150f581614bca565b9550602087013561510581614bca565b94506040870135935060608701359250608087013567ffffffffffffffff8082111561513057600080fd5b818901915089601f83011261514457600080fd5b81358181111561515357600080fd5b8a602082850101111561516557600080fd5b6020830194508093505050509295509295509295565b60008060006060848603121561519057600080fd5b833561519b81614bca565b92506020848101356151ac81614bca565b9250604085013567ffffffffffffffff808211156151c957600080fd5b818701915087601f8301126151dd57600080fd5b8135818111156151ef576151ef614d0c565b8060051b9150615200848301614d22565b818152918301840191848101908a84111561521a57600080fd5b938501935b838510156152385784358252938501939085019061521f565b8096505050505050509250925092565b600181811c9082168061525c57607f821691505b6020821081141561527d57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156152b3576152b3615283565b500290565b634e487b7160e01b600052601260045260246000fd5b6000826152dd576152dd6152b8565b500490565b6000602082840312156152f457600080fd5b8151611c1f81615041565b634e487b7160e01b600052603260045260246000fd5b600060001982141561532957615329615283565b5060010190565b60208082526021908201527f45524337323141747461636861626c653a206e6f7420736c61766520746f6b656040820152603760f91b606082015260800190565b60008351615383818460208801614b46565b835190830190615397818360208801614b46565b01949350505050565b600082198211156153b3576153b3615283565b500190565b6000816153c7576153c7615283565b506000190190565b6020808252602a908201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646040820152692073616c65507269636560b01b606082015260800190565b60208082526032908201527f45524337323141747461636861626c653a20736c61766520746f6b656e207472604082015271185b9cd9995c881b9bdd08185b1b1bddd95960721b606082015260800190565b60006020828403121561547d57600080fd5b8151611c1f81614bca565b60208082526041908201527f45524337323141747461636861626c653a207472616e7366657220746f206e6f60408201527f6e20426f756e64455243373231526563656976657220696d706c656d656e74656060820152603960f91b608082015260a00190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061557490830184614b72565b9695505050505050565b60008282101561559057615590615283565b500390565b6000826155a4576155a46152b8565b500690565b634e487b7160e01b600052603160045260246000fd5b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351615645816017850160208801614b46565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351615676816028840160208801614b46565b01602801949350505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906156bc90830184614b72565b979650505050505050565b6000602082840312156156d957600080fd5b8151611c1f81614b1356fe10dac8c06a04bec0b551627dad28bc00d6516b0caacd1c7b345fcdb5211334e49f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6a264697066735822122074885f227dd37401def754e2692af8530668dfa6a44bea6c94824fe09d428a0b64736f6c634300080b00336b521adf58940c63bb43368c60a96aec5f239edbadca7e2b6e56f3b8ff34ef0168747470733a2f2f72616361776562736f757263652e73332e75732d656173742d322e616d617a6f6e6177732e636f6d2f6d657461646174612f32642f6c6f6f6b692f
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106104965760003560e01c806375ceb34111610262578063b88d4fde11610151578063e63ab1e9116100ce578063f2fde38b11610092578063f2fde38b14610b7d578063f3fef3a314610b90578063f4bbcb2914610ba3578063f6aacfb114610bb6578063fb1bb9de14610bd8578063fe50748114610bff57600080fd5b8063e63ab1e914610aa4578063e985e9c514610acb578063ea8876fa14610b07578063ec4d8cd914610b1a578063f176d4c114610b5157600080fd5b8063cc4aa03311610115578063cc4aa03314610a41578063d539139314610a54578063d547741f14610a69578063d547cfb714610a7c578063dcec329414610a8457600080fd5b8063b88d4fde146109e2578063be4df7d6146109f5578063c1016d8714610a08578063c87b56dd14610a1b578063ca15c87314610a2e57600080fd5b806391d14854116101df578063a174e77a116101a3578063a174e77a14610985578063a217fddf14610998578063a22cb465146109a0578063a2476405146109b3578063aa1b103f146109da57600080fd5b806391d1485414610919578063940ddd3b1461092c57806395d89b411461093f5780639f1a6a0d14610947578063a0ccf3a81461097257600080fd5b80638a616bc0116102265780638a616bc0146108935780638da5cb5b146108a65780638eb43e77146108b75780639010d07c146108ca57806391c79cd7146108dd57600080fd5b806375ceb3411461083d5780637ac3ba4b146108505780638456cb591461086357806385f438c11461086b5780638832e6e31461088057600080fd5b806336568abe1161038957806354231fe0116103065780636352211e116102ca5780636352211e146107b657806369b67970146107c95780636c1a72de146107dc578063709418f81461080f57806370a0823114610822578063715018a61461083557600080fd5b806354231fe01461075f5780635493f09a146107725780635944c753146107855780635bb47808146107985780635c975abb146107ab57600080fd5b806344004cc11161034d57806344004cc1146107005780634ce17b86146107135780634f558e79146107265780634f6ccce7146107395780635028d05a1461074c57600080fd5b806336568abe146106ac5780633f4ba83a146106bf57806340c10f19146106c757806342842e0e146106da57806342966c68146106ed57600080fd5b8063241ede6f116104175780632f2ff15d116103db5780632f2ff15d146106405780632f4f336c146106535780632f745c591461066657806330176e131461067957806332c56e761461068c57600080fd5b8063241ede6f14610589578063248a9ca3146105b057806326247394146105d4578063282c51f3146105e75780632a55205a1461060e57600080fd5b8063179a9c0f1161045e578063179a9c0f1461052b57806318160ddd1461053e57806319a04d43146105505780631e4e00911461056357806323b872dd1461057657600080fd5b806301ffc9a71461049b57806306fdde03146104c3578063081812fc146104d8578063095ea7b314610503578063121cba1914610518575b600080fd5b6104ae6104a9366004614b29565b610c12565b60405190151581526020015b60405180910390f35b6104cb610c23565b6040516104ba9190614b9e565b6104eb6104e6366004614bb1565b610cb5565b6040516001600160a01b0390911681526020016104ba565b610516610511366004614bdf565b610cdc565b005b6104eb610526366004614bb1565b610df7565b610516610539366004614bdf565b610eee565b600f545b6040519081526020016104ba565b61051661055e366004614c27565b61105f565b610516610571366004614c5c565b611075565b610516610584366004614c7e565b611087565b6105427f8378e411615856da82f6ab87f6d0060c19c0e71c4ff9dc58c6b8976c23a1deee81565b6105426105be366004614bb1565b6000908152600160208190526040909120015490565b6105166105e2366004614bdf565b611092565b6105427f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a84881565b61062161061c366004614c5c565b6111d5565b604080516001600160a01b0390931683526020830191909152016104ba565b61051661064e366004614cbf565b611281565b6104ae610661366004614cef565b6112a7565b610542610674366004614bdf565b6112b4565b610516610687366004614dab565b61134a565b61054261069a366004614bb1565b60009081526016602052604090205490565b6105166106ba366004614cbf565b611387565b610516611401565b6105166106d5366004614bdf565b611433565b6105166106e8366004614c7e565b611455565b6105166106fb366004614bb1565b611470565b61051661070e366004614c7e565b61152c565b6104eb610721366004614bb1565b6115be565b6104ae610734366004614bb1565b611630565b610542610747366004614bb1565b61163b565b61051661075a366004614cef565b6116ce565b61051661076d366004614bb1565b61177f565b610516610780366004614df4565b6117d9565b610516610793366004614e29565b611920565b6105166107a6366004614cef565b611933565b600b5460ff166104ae565b6104eb6107c4366004614bb1565b611944565b6105166107d7366004614bb1565b6119a4565b6106216107ea366004614bb1565b601560205260009081526040902080546001909101546001600160a01b039091169082565b61051661081d366004614e67565b611a3e565b610542610830366004614cef565b611a62565b610516611ae8565b61051661084b366004614eaf565b611afc565b6104ae61085e366004614cef565b611b53565b610516611b60565b6105426000805160206156e583398151915281565b61051661088e366004614f57565b611b92565b6105166108a1366004614bb1565b611bbb565b6000546001600160a01b03166104eb565b6105166108c5366004614bb1565b611bd4565b6104eb6108d8366004614c5c565b611c07565b6104ae6108eb366004614fb0565b6001600160a01b03918216600090815260136020908152604080832093909416825291909152205460ff1690565b6104ae610927366004614cbf565b611c26565b61051661093a366004614fde565b611c51565b6104cb611c75565b6104ae610955366004614bb1565b6000908152601560205260409020546001600160a01b0316151590565b610516610980366004614cef565b611c84565b610516610993366004614cef565b611d26565b610542600081565b6105166109ae36600461504f565b611ddc565b6105427f6b521adf58940c63bb43368c60a96aec5f239edbadca7e2b6e56f3b8ff34ef0181565b610516611de7565b6105166109f036600461507d565b611df9565b6014546104eb906001600160a01b031681565b6104eb610a16366004614bb1565b611e05565b6104cb610a29366004614bb1565b611e55565b610542610a3c366004614bb1565b611ebb565b610516610a4f366004614cef565b611ed2565b61054260008051602061570583398151915281565b610516610a77366004614cbf565b611f80565b6104cb611fa6565b610542610a92366004614bb1565b60116020526000908152604090205481565b6105427f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b6104ae610ad9366004614fb0565b6001600160a01b039182166000908152600a6020908152604080832093909416825291909152205460ff1690565b610516610b15366004614df4565b612034565b610b2d610b28366004614c5c565b61206f565b6040805182516001600160a01b0316815260209283015192810192909252016104ba565b610b64610b5f3660046150d1565b612151565b6040516001600160e01b031990911681526020016104ba565b610516610b8b366004614cef565b6122e6565b610516610b9e366004614bdf565b61235c565b610516610bb136600461504f565b61237e565b6104ae610bc4366004614bb1565b600090815260116020526040902054421090565b6105427f427da25fe773164f88948d3e215c94b6554e2ed5e5f203a821c9f2f6131cf75a81565b610516610c0d36600461517b565b612389565b6000610c1d8261266f565b92915050565b606060058054610c3290615248565b80601f0160208091040260200160405190810160405280929190818152602001828054610c5e90615248565b8015610cab5780601f10610c8057610100808354040283529160200191610cab565b820191906000526020600020905b815481529060010190602001808311610c8e57829003601f168201915b5050505050905090565b6000610cc08261267a565b506000908152600960205260409020546001600160a01b031690565b6000610ce782611944565b9050806001600160a01b0316836001600160a01b03161415610d5a5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b0382161480610d765750610d768133610ad9565b610de85760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152608401610d51565b610df283836126ca565b505050565b6000610e0282612738565b610e625760405162461bcd60e51b815260206004820152602b60248201527f455243353035383a206c6f636b657220717565727920666f72206e6f6e65786960448201526a39ba32b73a103a37b5b2b760a91b6064820152608401610d51565b6000828152601160205260409020544210610ed25760405162461bcd60e51b815260206004820152602a60248201527f455243353035383a206c6f636b657220717565727920666f72206e6f6e2d6c6f60448201526931b5b2b2103a37b5b2b760b11b6064820152608401610d51565b506000908152601260205260409020546001600160a01b031690565b600081815260116020526040902054421015610f475760405162461bcd60e51b8152602060048201526018602482015277115490cd4c0d4e0e881d1bdad95b881a5cc81b1bd8dad95960421b6044820152606401610d51565b6000610f5282611944565b9050806001600160a01b0316836001600160a01b03161415610fc65760405162461bcd60e51b815260206004820152602760248201527f455243353035383a206c6f636b20617070726f76616c20746f2063757272656e6044820152663a1037bbb732b960c91b6064820152608401610d51565b336001600160a01b0382161480610fe25750610fe281336108eb565b6110545760405162461bcd60e51b815260206004820152603e60248201527f455243353035383a206c6f636b20617070726f76652063616c6c65722069732060448201527f6e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152608401610d51565b610df2818484612755565b6110676127b1565b611071828261280b565b5050565b61107d6127b1565b61107182826128c5565b610df2838383612912565b3361109c82610df7565b6001600160a01b0316146111065760405162461bcd60e51b815260206004820152602b60248201527f455243353035383a20756e6c6f636b2063616c6c6572206973206e6f74206c6f60448201526a31b59037b832b930ba37b960a91b6064820152608401610d51565b816001600160a01b031661111982611944565b6001600160a01b03161461117b5760405162461bcd60e51b8152602060048201526024808201527f455243353035383a20756e6c6f636b2066726f6d20696e636f7272656374206f6044820152633bb732b960e11b6064820152608401610d51565b611183565b50565b6000818152601160205260408082208290555182916001600160a01b0385169133917fe6e0ef9cd056ca98561ca60e347ada61e1ede2f1142a078951b7a52e1e508e6091a46110713383836000612aa6565b60008281526004602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b031692820192909252829161124a5750604080518082019091526003546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090611269906001600160601b031687615299565b61127391906152ce565b915196919550909350505050565b6000828152600160208190526040909120015461129d81612c1a565b610df28383612c24565b6000610c1d601883612c46565b60006112bf83611a62565b82106113215760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610d51565b506001600160a01b03919091166000908152600d60209081526040808320938352929052205490565b7f6b521adf58940c63bb43368c60a96aec5f239edbadca7e2b6e56f3b8ff34ef0161137481612c1a565b8151610df290600c906020850190614a33565b6001600160a01b03811633146113f75760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610d51565b6110718282612c68565b7f427da25fe773164f88948d3e215c94b6554e2ed5e5f203a821c9f2f6131cf75a61142b81612c1a565b611180612c8a565b60008051602061570583398151915261144b81612c1a565b610df28383612cdc565b610df283838360405180602001604052806000815250611df9565b61147b335b82612e1b565b806114ab57506114ab7f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a84833611c26565b806114c65750336114bb82611e05565b6001600160a01b0316145b6115235760405162461bcd60e51b815260206004820152602860248201527f4552433732313a2063616c6c6572206973206e6f74206f776e6572206e6f7220604482015267185c1c1c9bdd995960c21b6064820152608401610d51565b61118081612e9a565b6000805160206156e583398151915261154481612c1a565b60405163a9059cbb60e01b81526001600160a01b0384811660048301526024820184905285169063a9059cbb906044016020604051808303816000875af1158015611593573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115b791906152e2565b5050505050565b60006115c982612738565b610ed25760405162461bcd60e51b815260206004820152603260248201527f455243353035383a206c6f636b20617070726f76656420717565727920666f72604482015271103737b732bc34b9ba32b73a103a37b5b2b760711b6064820152608401610d51565b6000610c1d82612738565b6000611646600f5490565b82106116a95760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610d51565b600f82815481106116bc576116bc6152ff565b90600052602060002001549050919050565b6116d66127b1565b6116e1601882612c46565b61173c5760405162461bcd60e51b815260206004820152602660248201527f45524337323141747461636861626c653a20636f6c6c656374696f6e206e6f7460448201526520736c61766560d01b6064820152608401610d51565b611747601882612ea3565b506040516001600160a01b038216907fa0691bd707b2f65c33c8343d61c274df72c6b5007937dcfbc31aa5a0d0f6fe3c90600090a250565b601454604051630852cd8d60e31b8152600481018390526001600160a01b03909116906342966c6890602401600060405180830381600087803b1580156117c557600080fd5b505af11580156115b7573d6000803e3d6000fd5b6117e33383612eb8565b6118465760405162461bcd60e51b815260206004820152602e60248201527f455243353035383a206c6f636b2063616c6c6572206973206e6f74206f776e6560448201526d1c881b9bdc88185c1c1c9bdd995960921b6064820152608401610d51565b4281116118bb5760405162461bcd60e51b815260206004820152603d60248201527f455243353035383a20657870697265642074696d65206d75737420626520677260448201527f6561746572207468616e2063757272656e7420626c6f636b2074696d650000006064820152608401610d51565b6000828152601160205260409020544210156119145760405162461bcd60e51b8152602060048201526018602482015277115490cd4c0d4e0e881d1bdad95b881a5cc81b1bd8dad95960421b6044820152606401610d51565b610df233848484612f95565b6119286127b1565b610df2838383613084565b61193b6127b1565b6111808161314f565b6000818152600760205260408120546001600160a01b031680610c1d5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610d51565b6119ce7f8378e411615856da82f6ab87f6d0060c19c0e71c4ff9dc58c6b8976c23a1deee33611c26565b806119e95750336119de82611e05565b6001600160a01b0316145b611a355760405162461bcd60e51b815260206004820152601760248201527f4552433732313a206e6f7420756e62696e6420726f6c650000000000000000006044820152606401610d51565b611180816131da565b600080516020615705833981519152611a5681612c1a565b6115b78585858561328c565b60006001600160a01b038216611acc5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610d51565b506001600160a01b031660009081526008602052604090205490565b611af06127b1565b611afa60006132ff565b565b600080516020615705833981519152611b1481612c1a565b60005b828110156115b757611b4185858584818110611b3557611b356152ff565b90506020020135612cdc565b80611b4b81615315565b915050611b17565b6000610c1d601a83612c46565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a611b8a81612c1a565b61118061334f565b600080516020615705833981519152611baa81612c1a565b611bb584848461338c565b50505050565b611bc36127b1565b600090815260046020526040812055565b7f8378e411615856da82f6ab87f6d0060c19c0e71c4ff9dc58c6b8976c23a1deee611bfe81612c1a565b611071826133bf565b6000828152600260205260408120611c1f9083613526565b9392505050565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600080516020615705833981519152611c6981612c1a565b6115b785858585613532565b606060068054610c3290615248565b611c8c6127b1565b611c97601a82612c46565b611ce35760405162461bcd60e51b815260206004820152601e60248201527f45524337323141747461636861626c653a206e6f7420617070726f76656400006044820152606401610d51565b611cee601a82612ea3565b506040516001600160a01b038216907fa067f99427db91329926fe838e69bf65a2cbfcfe35670d0c807e0a059664616090600090a250565b611d2e6127b1565b611d39601882612c46565b15611d995760405162461bcd60e51b815260206004820152602a60248201527f45524337323141747461636861626c653a20636f6c6c656374696f6e20616c726044820152696561647920736c61766560b01b6064820152608401610d51565b611da46018826124be565b506040516001600160a01b038216907f7701426aaa4c0c88a30924a7aba88dce66b18c4020b54e4e19c9e0eb0abc299290600090a250565b6110713383836135b0565b611def6127b1565b611afa6000600355565b611bb584848484613680565b6000818152601560205260408120546001600160a01b0316611e395760405162461bcd60e51b8152600401610d5190615330565b506000908152601560205260409020546001600160a01b031690565b6060611e608261267a565b6000611e6a613800565b90506000815111611e8a5760405180602001604052806000815250611c1f565b80611e948461380f565b604051602001611ea5929190615371565b6040516020818303038152906040529392505050565b6000818152600260205260408120610c1d9061390d565b611eda6127b1565b611ee5601a82612c46565b15611f3d5760405162461bcd60e51b815260206004820152602260248201527f45524337323141747461636861626c653a20616c726561647920617070726f76604482015261195960f21b6064820152608401610d51565b611f48601a826124be565b506040516001600160a01b038216907fd62044ed2ee3ee4b9e9539cff949fcce21f6edf85844020b8cbec05dd63c971a90600090a250565b60008281526001602081905260409091200154611f9c81612c1a565b610df28383612c68565b600c8054611fb390615248565b80601f0160208091040260200160405190810160405280929190818152602001828054611fdf90615248565b801561202c5780601f106120015761010080835404028352916020019161202c565b820191906000526020600020905b81548152906001019060200180831161200f57829003601f168201915b505050505081565b60008051602061570583398151915261204c81612c1a565b818311611bb55761205d8484612cdc565b8261206781615315565b93505061204c565b604080518082019091526000808252602082015260008381526016602052604090205482106120f65760405162461bcd60e51b815260206004820152602d60248201527f45524337323141747461636861626c653a20746f6b656e496420696e6465782060448201526c6f7574206f6620626f756e647360981b6064820152608401610d51565b6000838152601660205260409020805483908110612116576121166152ff565b60009182526020918290206040805180820190915260029092020180546001600160a01b031682526001015491810191909152905092915050565b600061215c336112a7565b6121c45760405162461bcd60e51b815260206004820152603360248201527f45524337323141747461636861626c653a20736c61766520746f206e6f6e206260448201527237bab73222a9219b9918903932b1b2b4bb32b960691b6064820152608401610d51565b6001600160a01b038616156122c857856001600160a01b03166121e685611944565b6001600160a01b03161461224f5760405162461bcd60e51b815260206004820152602a60248201527f45524337323141747461636861626c653a20736c61766520746f20696e636f726044820152693932b1ba1037bbb732b960b11b6064820152608401610d51565b6000848152601660208181526040808420805433808752601785528387208c8852855283872082905594845282518084019093529382528183018a81526001808601835591865292909420905160029093020180546001600160a01b0319166001600160a01b03909316929092178255519101556122d3565b6122d3843387613917565b5063f176d4c160e01b9695505050505050565b6122ee6127b1565b6001600160a01b0381166123535760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d51565b611180816132ff565b6000805160206156e583398151915261237481612c1a565b610df28383613a7e565b611071338383613b97565b6000805160206156e58339815191526123a181612c1a565b60005b82518110156115b757846001600160a01b03166323b872dd30868685815181106123d0576123d06152ff565b60209081029190910101516040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b15801561242a57600080fd5b505af115801561243e573d6000803e3d6000fd5b505050508061244c90615315565b90506123a4565b61245d8282611c26565b6110715760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b6000611c1f836001600160a01b038416613c5e565b606060006124e2836002615299565b6124ed9060026153a0565b67ffffffffffffffff81111561250557612505614d0c565b6040519080825280601f01601f19166020018201604052801561252f576020820181803683370190505b509050600360fc1b8160008151811061254a5761254a6152ff565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612579576125796152ff565b60200101906001600160f81b031916908160001a905350600061259d846002615299565b6125a89060016153a0565b90505b6001811115612620576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106125dc576125dc6152ff565b1a60f81b8282815181106125f2576125f26152ff565b60200101906001600160f81b031916908160001a90535060049490941c93612619816153b8565b90506125ab565b508315611c1f5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610d51565b6000610c1d82613cad565b61268381612738565b6111805760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610d51565b600081815260096020526040902080546001600160a01b0319166001600160a01b03841690811790915581906126ff82611944565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000908152600760205260409020546001600160a01b0316151590565b60008181526012602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fbd5378dc6d0395c338ca88b324966808490d6a9983bbc7a0f7a8429a44a3176291a4505050565b6000546001600160a01b03163314611afa5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d51565b6127106001600160601b03821611156128365760405162461bcd60e51b8152600401610d51906153cf565b6001600160a01b03821661288c5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610d51565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600355565b6000828152600160208190526040808320909101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b6000818152601560205260409020546001600160a01b03161561298b576000818152601560205260409020546001600160a01b031633141561295957610df2838383613cd2565b612964601a33612c46565b6129805760405162461bcd60e51b8152600401610d5190615419565b610df2838383613e79565b612996838383613e79565b60005b600082815260166020526040902054811015611bb55760008281526016602052604090208054829081106129cf576129cf6152ff565b600091825260208083206002909202909101548483526016909152604090912080546001600160a01b03909216916323b872dd91879187919086908110612a1857612a186152ff565b60009182526020909120600160029092020101546040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b158015612a7b57600080fd5b505af1158015612a8f573d6000803e3d6000fd5b505050508080612a9e90615315565b915050612999565b6014546001600160a01b031615611bb5578015612b44576001600160a01b03841615612b3f57601454604051638832e6e360e01b81523360048201526024810184905260606044820152600060648201526001600160a01b0390911690638832e6e390608401600060405180830381600087803b158015612b2657600080fd5b505af1158015612b3a573d6000803e3d6000fd5b505050505b611bb5565b601454604051634f558e7960e01b8152600481018490526001600160a01b0390911690634f558e7990602401602060405180830381865afa158015612b8d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bb191906152e2565b15611bb557601454604051630852cd8d60e31b8152600481018490526001600160a01b03909116906342966c6890602401600060405180830381600087803b158015612bfc57600080fd5b505af1158015612c10573d6000803e3d6000fd5b5050505050505050565b6111808133613ea9565b612c2e8282612453565b6000828152600260205260409020610df290826124be565b6001600160a01b03811660009081526001830160205260408120541515611c1f565b612c728282613f0d565b6000828152600260205260409020610df29082612ea3565b612c92613f74565b600b805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b038216612d325760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610d51565b612d3b81612738565b15612d885760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610d51565b612d9460008383613fbd565b6001600160a01b0382166000908152600860205260408120805460019290612dbd9084906153a0565b909155505060008181526007602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600080612e2783611944565b9050806001600160a01b0316846001600160a01b03161480612e6e57506001600160a01b038082166000908152600a602090815260408083209388168352929052205460ff165b80612e925750836001600160a01b0316612e8784610cb5565b6001600160a01b0316145b949350505050565b61118081613fc8565b6000611c1f836001600160a01b038416613fd1565b6000612ec382612738565b612f2a5760405162461bcd60e51b815260206004820152603260248201527f455243353035383a206c6f636b206f70657261746f7220717565727920666f72604482015271103737b732bc34b9ba32b73a103a37b5b2b760711b6064820152608401610d51565b6000612f3583611944565b9050806001600160a01b0316846001600160a01b03161480612f7c57506001600160a01b0380821660009081526013602090815260408083209388168352929052205460ff165b80612e925750836001600160a01b0316612e87846115be565b826001600160a01b0316612fa883611944565b6001600160a01b0316146130095760405162461bcd60e51b815260206004820152602260248201527f455243353035383a206c6f636b2066726f6d20696e636f7272656374206f776e60448201526132b960f11b6064820152608401610d51565b6000828152601160209081526040808320849055601282529182902080546001600160a01b031916331790558151838152915184926001600160a01b0387811693908916927f967ad762aa9070ada8db64577288e214771e89667066ae38e8750cb8a86c54299281900390910190a4611bb584848484612aa6565b6127106001600160601b03821611156130af5760405162461bcd60e51b8152600401610d51906153cf565b6001600160a01b0382166131055760405162461bcd60e51b815260206004820152601b60248201527f455243323938313a20496e76616c696420706172616d657465727300000000006044820152606401610d51565b6040805180820182526001600160a01b0393841681526001600160601b0392831660208083019182526000968752600490529190942093519051909116600160a01b029116179055565b6040516315dbbcbf60e11b81523060048201526001600160a01b03821690632bb7797e90602401602060405180830381865afa158015613193573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131b7919061546b565b601480546001600160a01b0319166001600160a01b039290921691909117905550565b6000818152601560205260409020546001600160a01b031661320e5760405162461bcd60e51b8152600401610d5190615330565b6000818152601560209081526040808320805460018201548351948501909352848452909361324d936001600160a01b039092169290918691906140c4565b6132695760405162461bcd60e51b8152600401610d5190615488565b50600090815260156020526040812080546001600160a01b031916815560010155565b600083815260156020908152604080832080546001600160a01b0319166001600160a01b0387161781556001810185905581519283019091529181526132d99084908790879086906140c4565b6132f55760405162461bcd60e51b8152600401610d5190615488565b6115b78585612cdc565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6133576141ae565b600b805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612cbf3390565b6133968383612cdc565b6133a360008484846141f4565b610df25760405162461bcd60e51b8152600401610d51906154ef565b6000818152601660205260408120541161341b5760405162461bcd60e51b815260206004820181905260248201527f45524337323141747461636861626c653a206e6f20736c61766520746f6b656e6044820152606401610d51565b600081815260166020526040812054905b8181101561350e576000838152601660205260409020805482908110613454576134546152ff565b600091825260208083206002909202909101548583526016909152604090912080546001600160a01b03909216916369b67970919084908110613499576134996152ff565b9060005260206000209060020201600101546040518263ffffffff1660e01b81526004016134c991815260200190565b600060405180830381600087803b1580156134e357600080fd5b505af11580156134f7573d6000803e3d6000fd5b50505050808061350690615315565b91505061342c565b50600082815260166020526040812061107191614ab7565b6000611c1f83836142ea565b4282116135985760405162461bcd60e51b815260206004820152602e60248201527f455243353035383a206c6f636b206d696e7420666f7220696e76616c6964206c60448201526d6f636b20626c6f636b2074696d6560901b6064820152608401610d51565b6135a384848361338c565b611bb56000858585612f95565b816001600160a01b0316836001600160a01b031614156136125760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610d51565b6001600160a01b038381166000818152600a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3191015b60405180910390a3505050565b6000828152601560205260409020546001600160a01b0316156136fb576000828152601560205260409020546001600160a01b03163314156136c857612b3f84848484614314565b6136d3601a33612c46565b6136ef5760405162461bcd60e51b8152600401610d5190615419565b612b3f84848484614347565b61370784848484614347565b60005b6000838152601660205260409020548110156115b7576000838152601660205260409020805482908110613740576137406152ff565b600091825260208083206002909202909101548583526016909152604090912080546001600160a01b039092169163b88d4fde91889188919086908110613789576137896152ff565b906000526020600020906002020160010154866040518563ffffffff1660e01b81526004016137bb9493929190615541565b600060405180830381600087803b1580156137d557600080fd5b505af11580156137e9573d6000803e3d6000fd5b5050505080806137f890615315565b91505061370a565b606061380a614379565b905090565b6060816138335750506040805180820190915260018152600360fc1b602082015290565b8160005b811561385d578061384781615315565b91506138569050600a836152ce565b9150613837565b60008167ffffffffffffffff81111561387857613878614d0c565b6040519080825280601f01601f1916602001820160405280156138a2576020820181803683370190505b5090505b8415612e92576138b760018361557e565b91506138c4600a86615595565b6138cf9060306153a0565b60f81b8183815181106138e4576138e46152ff565b60200101906001600160f81b031916908160001a905350613906600a866152ce565b94506138a6565b6000610c1d825490565b6000838152601660205260408120546139329060019061557e565b6001600160a01b0384166000908152601760209081526040808320868452825280832054888452601690925282208054939450909284908110613977576139776152ff565b60009182526020808320604080518082018252600290940290910180546001600160a01b031684526001810154848401528a8552601690925290922080549293509091849081106139ca576139ca6152ff565b6000918252602080832084516002939093020180546001600160a01b0319166001600160a01b039384161781559381015160019485015584548216835260178082526040808520958701548552948252848420879055918916835290815282822087835281528282208290558882526016905220805480613a4d57613a4d6155a9565b60008281526020812060026000199093019283020180546001600160a01b0319168155600101559055505050505050565b80471015613ace5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610d51565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114613b1b576040519150601f19603f3d011682016040523d82523d6000602084013e613b20565b606091505b5050905080610df25760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610d51565b816001600160a01b0316836001600160a01b03161415613bf95760405162461bcd60e51b815260206004820152601f60248201527f455243353035383a206c6f636b20617070726f766520746f2063616c6c6572006044820152606401610d51565b6001600160a01b03838116600081815260136020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527fbb3b2937fc41058c97e1ad0d0bbac3c664894dd823924eb7717d814fe700f0349101613673565b6000818152600183016020526040812054613ca557508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610c1d565b506000610c1d565b60006001600160e01b0319821663a80646d160e01b1480610c1d5750610c1d82614388565b826001600160a01b0316613ce582611944565b6001600160a01b031614613d495760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610d51565b6001600160a01b038216613dab5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610d51565b613db6838383613fbd565b613dc16000826126ca565b6001600160a01b0383166000908152600860205260408120805460019290613dea90849061557e565b90915550506001600160a01b0382166000908152600860205260408120805460019290613e189084906153a0565b909155505060008181526007602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b613e8233611475565b613e9e5760405162461bcd60e51b8152600401610d51906155bf565b610df2838383613cd2565b613eb38282611c26565b61107157613ecb816001600160a01b031660146124d3565b613ed68360206124d3565b604051602001613ee792919061560d565b60408051601f198184030181529082905262461bcd60e51b8252610d5191600401614b9e565b613f178282611c26565b156110715760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600b5460ff16611afa5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610d51565b610df28383836143ad565b611bc381614422565b600081815260018301602052604081205480156140ba576000613ff560018361557e565b85549091506000906140099060019061557e565b905081811461406e576000866000018281548110614029576140296152ff565b906000526020600020015490508087600001848154811061404c5761404c6152ff565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061407f5761407f6155a9565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610c1d565b6000915050610c1d565b60405163f176d4c160e01b81526000906001600160a01b0387169063f176d4c1906140fb9033908990899089908990600401615682565b6020604051808303816000875af1925050508015614136575060408051601f3d908101601f19168201909252614133918101906156c7565b60015b614190573d808015614164576040519150601f19603f3d011682016040523d82523d6000602084013e614169565b606091505b5080516141885760405162461bcd60e51b8152600401610d5190615488565b805181602001fd5b6001600160e01b03191663f176d4c160e01b14905095945050505050565b600b5460ff1615611afa5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610d51565b60006001600160a01b0384163b156142df57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290614238903390899088908890600401615541565b6020604051808303816000875af1925050508015614273575060408051601f3d908101601f19168201909252614270918101906156c7565b60015b6142c5573d8080156142a1576040519150601f19603f3d011682016040523d82523d6000602084013e6142a6565b606091505b5080516141885760405162461bcd60e51b8152600401610d51906154ef565b6001600160e01b031916630a85bd0160e11b149050612e92565b506001949350505050565b6000826000018281548110614301576143016152ff565b9060005260206000200154905092915050565b61431f848484613cd2565b61432b848484846141f4565b611bb55760405162461bcd60e51b8152600401610d51906154ef565b6143513383612e1b565b61436d5760405162461bcd60e51b8152600401610d51906155bf565b611bb584848484614314565b6060600c8054610c3290615248565b60006001600160e01b0319821663780e9d6360e01b1480610c1d5750610c1d826145c7565b6143b8838383614607565b600081815260116020526040902054421015610df25760405162461bcd60e51b8152602060048201526024808201527f455243353035383a20746f6b656e207472616e73666572207768696c65206c6f60448201526318dad95960e21b6064820152608401610d51565b61442b81614679565b600081815260156020526040902080546001600160a01b0316156144b5578054600182015460408051602081019091526000808252614478936001600160a01b03169290918691906140c4565b6144945760405162461bcd60e51b8152600401610d5190615488565b600082815260156020526040812080546001600160a01b0319168155600101555b6000828152601660205260409020548015610df25760005b818110156145af5760008481526016602052604090208054829081106144f5576144f56152ff565b600091825260208083206002909202909101548683526016909152604090912080546001600160a01b03909216916342966c6891908490811061453a5761453a6152ff565b9060005260206000209060020201600101546040518263ffffffff1660e01b815260040161456a91815260200190565b600060405180830381600087803b15801561458457600080fd5b505af1158015614598573d6000803e3d6000fd5b5050505080806145a790615315565b9150506144cd565b506000838152601660205260408120610df291614ab7565b60006001600160e01b031982166380ac58cd60e01b14806145f857506001600160e01b03198216635b5e139f60e01b145b80610c1d5750610c1d826146c5565b6146128383836146ea565b600b5460ff1615610df25760405162461bcd60e51b815260206004820152602b60248201527f4552433732315061757361626c653a20746f6b656e207472616e73666572207760448201526a1a1a5b19481c185d5cd95960aa1b6064820152608401610d51565b600061468482611944565b905061468f826147a2565b60008281526011602090815260408083208390556012909152902080546001600160a01b03191690556110713382846000612aa6565b60006001600160e01b0319821663152a902d60e11b1480610c1d5750610c1d82614849565b6001600160a01b0383166147455761474081600f80546000838152601060205260408120829055600182018355919091527f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac8020155565b614768565b816001600160a01b0316836001600160a01b03161461476857614768838261486e565b6001600160a01b03821661477f57610df28161490b565b826001600160a01b0316826001600160a01b031614610df257610df282826149ba565b60006147ad82611944565b90506147bb81600084613fbd565b6147c66000836126ca565b6001600160a01b03811660009081526008602052604081208054600192906147ef90849061557e565b909155505060008281526007602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b60006001600160e01b03198216635a05180f60e01b1480610c1d5750610c1d826149fe565b6000600161487b84611a62565b614885919061557e565b6000838152600e60205260409020549091508082146148d8576001600160a01b0384166000908152600d602090815260408083208584528252808320548484528184208190558352600e90915290208190555b506000918252600e602090815260408084208490556001600160a01b039094168352600d81528383209183525290812055565b600f5460009061491d9060019061557e565b600083815260106020526040812054600f8054939450909284908110614945576149456152ff565b9060005260206000200154905080600f8381548110614966576149666152ff565b600091825260208083209091019290925582815260109091526040808220849055858252812055600f80548061499e5761499e6155a9565b6001900381819060005260206000200160009055905550505050565b60006149c583611a62565b6001600160a01b039093166000908152600d602090815260408083208684528252808320859055938252600e9052919091209190915550565b60006001600160e01b03198216637965db0b60e01b1480610c1d57506301ffc9a760e01b6001600160e01b0319831614610c1d565b828054614a3f90615248565b90600052602060002090601f016020900481019282614a615760008555614aa7565b82601f10614a7a57805160ff1916838001178555614aa7565b82800160010185558215614aa7579182015b82811115614aa7578251825591602001919060010190614a8c565b50614ab3929150614ad8565b5090565b50805460008255600202906000526020600020908101906111809190614aed565b5b80821115614ab35760008155600101614ad9565b5b80821115614ab35780546001600160a01b031916815560006001820155600201614aee565b6001600160e01b03198116811461118057600080fd5b600060208284031215614b3b57600080fd5b8135611c1f81614b13565b60005b83811015614b61578181015183820152602001614b49565b83811115611bb55750506000910152565b60008151808452614b8a816020860160208601614b46565b601f01601f19169290920160200192915050565b602081526000611c1f6020830184614b72565b600060208284031215614bc357600080fd5b5035919050565b6001600160a01b038116811461118057600080fd5b60008060408385031215614bf257600080fd5b8235614bfd81614bca565b946020939093013593505050565b80356001600160601b0381168114614c2257600080fd5b919050565b60008060408385031215614c3a57600080fd5b8235614c4581614bca565b9150614c5360208401614c0b565b90509250929050565b60008060408385031215614c6f57600080fd5b50508035926020909101359150565b600080600060608486031215614c9357600080fd5b8335614c9e81614bca565b92506020840135614cae81614bca565b929592945050506040919091013590565b60008060408385031215614cd257600080fd5b823591506020830135614ce481614bca565b809150509250929050565b600060208284031215614d0157600080fd5b8135611c1f81614bca565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715614d4b57614d4b614d0c565b604052919050565b600067ffffffffffffffff831115614d6d57614d6d614d0c565b614d80601f8401601f1916602001614d22565b9050828152838383011115614d9457600080fd5b828260208301376000602084830101529392505050565b600060208284031215614dbd57600080fd5b813567ffffffffffffffff811115614dd457600080fd5b8201601f81018413614de557600080fd5b612e9284823560208401614d53565b600080600060608486031215614e0957600080fd5b8335614e1481614bca565b95602085013595506040909401359392505050565b600080600060608486031215614e3e57600080fd5b833592506020840135614e5081614bca565b9150614e5e60408501614c0b565b90509250925092565b60008060008060808587031215614e7d57600080fd5b8435614e8881614bca565b9350602085013592506040850135614e9f81614bca565b9396929550929360600135925050565b600080600060408486031215614ec457600080fd5b8335614ecf81614bca565b9250602084013567ffffffffffffffff80821115614eec57600080fd5b818601915086601f830112614f0057600080fd5b813581811115614f0f57600080fd5b8760208260051b8501011115614f2457600080fd5b6020830194508093505050509250925092565b600082601f830112614f4857600080fd5b611c1f83833560208501614d53565b600080600060608486031215614f6c57600080fd5b8335614f7781614bca565b925060208401359150604084013567ffffffffffffffff811115614f9a57600080fd5b614fa686828701614f37565b9150509250925092565b60008060408385031215614fc357600080fd5b8235614fce81614bca565b91506020830135614ce481614bca565b60008060008060808587031215614ff457600080fd5b8435614fff81614bca565b93506020850135925060408501359150606085013567ffffffffffffffff81111561502957600080fd5b61503587828801614f37565b91505092959194509250565b801515811461118057600080fd5b6000806040838503121561506257600080fd5b823561506d81614bca565b91506020830135614ce481615041565b6000806000806080858703121561509357600080fd5b843561509e81614bca565b935060208501356150ae81614bca565b925060408501359150606085013567ffffffffffffffff81111561502957600080fd5b60008060008060008060a087890312156150ea57600080fd5b86356150f581614bca565b9550602087013561510581614bca565b94506040870135935060608701359250608087013567ffffffffffffffff8082111561513057600080fd5b818901915089601f83011261514457600080fd5b81358181111561515357600080fd5b8a602082850101111561516557600080fd5b6020830194508093505050509295509295509295565b60008060006060848603121561519057600080fd5b833561519b81614bca565b92506020848101356151ac81614bca565b9250604085013567ffffffffffffffff808211156151c957600080fd5b818701915087601f8301126151dd57600080fd5b8135818111156151ef576151ef614d0c565b8060051b9150615200848301614d22565b818152918301840191848101908a84111561521a57600080fd5b938501935b838510156152385784358252938501939085019061521f565b8096505050505050509250925092565b600181811c9082168061525c57607f821691505b6020821081141561527d57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156152b3576152b3615283565b500290565b634e487b7160e01b600052601260045260246000fd5b6000826152dd576152dd6152b8565b500490565b6000602082840312156152f457600080fd5b8151611c1f81615041565b634e487b7160e01b600052603260045260246000fd5b600060001982141561532957615329615283565b5060010190565b60208082526021908201527f45524337323141747461636861626c653a206e6f7420736c61766520746f6b656040820152603760f91b606082015260800190565b60008351615383818460208801614b46565b835190830190615397818360208801614b46565b01949350505050565b600082198211156153b3576153b3615283565b500190565b6000816153c7576153c7615283565b506000190190565b6020808252602a908201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646040820152692073616c65507269636560b01b606082015260800190565b60208082526032908201527f45524337323141747461636861626c653a20736c61766520746f6b656e207472604082015271185b9cd9995c881b9bdd08185b1b1bddd95960721b606082015260800190565b60006020828403121561547d57600080fd5b8151611c1f81614bca565b60208082526041908201527f45524337323141747461636861626c653a207472616e7366657220746f206e6f60408201527f6e20426f756e64455243373231526563656976657220696d706c656d656e74656060820152603960f91b608082015260a00190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061557490830184614b72565b9695505050505050565b60008282101561559057615590615283565b500390565b6000826155a4576155a46152b8565b500690565b634e487b7160e01b600052603160045260246000fd5b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351615645816017850160208801614b46565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351615676816028840160208801614b46565b01602801949350505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906156bc90830184614b72565b979650505050505050565b6000602082840312156156d957600080fd5b8151611c1f81614b1356fe10dac8c06a04bec0b551627dad28bc00d6516b0caacd1c7b345fcdb5211334e49f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6a264697066735822122074885f227dd37401def754e2692af8530668dfa6a44bea6c94824fe09d428a0b64736f6c634300080b0033
Loading...
Loading
Loading...
Loading
[ 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.