Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
SNIFMPP
Compiler Version
v0.8.12+commit.f00d7308
Optimization Enabled:
Yes with 2000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.12; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol"; import "erc721a/contracts/extensions/ERC721AQueryableUUPSUpgradeable.sol"; import "erc721a/contracts/extensions/ERC721ABurnableUUPSUpgradeable.sol"; import "erc721a/contracts/extensions/ERC721AGoverenedUUPSUpgradeable.sol"; import "./Interfaces/ISNIF.sol"; error FailedToWithdraw(); error FromFlaggedAddress(); error ToFlaggedAddress(); error PassIsFlagged(); error Unauthorized(); /// @title SNIF /// @author @KfishNFT /// @notice SNIF Marketplace Pass /** @dev Any function which updates state will require a signature from an address with the correct role This is an upgradeable contract using UUPSUpgradeable (IERC1822Proxiable / ERC1967Proxy) from OpenZeppelin */ contract SNIFMPP is Initializable, AccessControlUpgradeable, ERC721AQueryableUUPSUpgradeable, ERC721ABurnableUUPSUpgradeable, ERC721AGoverenedUUPSUpgradeable { /// @notice Role assigned to an address that can perform upgrades to the contract /// @dev role can be granted by the DEFAULT_ADMIN_ROLE bytes32 public constant UPGRADER_ROLE = keccak256("UPGRADER_ROLE"); /// @notice Role assigned to addresses that can perform managemenet actions /// @dev role can be granted by the DEFAULT_ADMIN_ROLE bytes32 public constant MANAGER_ROLE = keccak256("MANAGER_ROLE"); /// @notice Role assigned to addresses that can mint /// @dev role can be granted by the DEFAULT_ADMIN_ROLE bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); /// @notice a way to keep track of flagged passes that are untransferable uint256[] private flaggedPasses; /// @notice a way to keep track of flagged addresses that are unable to transfer passes address[] private flaggedAddresses; /// @notice base URI used to retrieve metadata string public baseURI; /// @notice setting an owner in order to comply with ownable interfaces /// @dev this variable was only added for compatibility with contracts that request an owner address public owner; /// @notice SNIF contract ISNIF public snif; event PassFlagged(address indexed sender, uint256 tokenId); event PassUnflagged(address indexed sender, uint256 tokenId); event AddressFlagged(address indexed sender, address flaggedAddress); event AddressUnflagged(address indexed sender, address unflaggedAddress); event AdminTransfer(address indexed sender, address from, address to, uint256 tokenId); event PassBurned(address indexed sender, uint256 tokenId); event OwnershipTransferred(address indexed sender, address previousOwner, address newOwner); event BaseURIChanged(address indexed sender, string previousURI, string newURI); /// @notice Initializer function which replaces constructor for upgradeable contracts /// @dev This should be called at deploy time function initialize() public initializer { __ERC721A_init("SNIFMPP", "SNIFMPP"); __AccessControl_init(); _grantRole(DEFAULT_ADMIN_ROLE, 0x1980c5a48909811200977D41C1E28a4bA32537F6); _grantRole(DEFAULT_ADMIN_ROLE, msg.sender); _grantRole(UPGRADER_ROLE, msg.sender); _grantRole(MINTER_ROLE, msg.sender); snif = ISNIF(0x1D0EC4a86AC39FEF4485169B4D14dC39D0ea64Cd); baseURI = "ipfs://QmXEeFZHQGY1gYdWztKrfbtVF2cvj5CvmTmTVrNxhtpm7p"; owner = msg.sender; } /* Functions that require authorized roles */ /// @notice Airdrop! function airdrop(address[] calldata recipients_) external onlyRole(MINTER_ROLE) { for (uint256 i = 0; i < recipients_.length; i++) { _mint(recipients_[i], 1, "", false); } } /// @notice Used to set a new owner value /// @dev This is not the same as Ownable and was only added for compatibility /// @param newOwner_ The new owner function transferOwnership(address newOwner_) external onlyRole(DEFAULT_ADMIN_ROLE) { owner = newOwner_; } /// @notice Used to set the baseURI for metadata /// @param baseURI_ the base URI function setBaseURI(string memory baseURI_) external managed { baseURI = baseURI_; } /// @notice Check whether a pass has been flagged /// @param tokenId_ the pass's token id function isPassFlagged(uint256 tokenId_) public view returns (bool) { for (uint256 i = 0; i < flaggedPasses.length; i++) { if (flaggedPasses[i] == tokenId_) return true; } return false; } /// @notice Retrieve list of flagged passes function getFlaggedPasses() external view returns (uint256[] memory) { return flaggedPasses; } /// @notice Check whether an address has been flagged /// @param address_ the address function isAddressFlagged(address address_) public view returns (bool) { for (uint256 i = 0; i < flaggedAddresses.length; i++) { if (flaggedAddresses[i] == address_) return true; } return false; } /// @notice Get list of flagged addresses function getFlaggedAddresses() external view returns (address[] memory) { return flaggedAddresses; } /// @notice used to flag an address and remove the ability for it to transfer passes /// @dev callable by admin or manager /// @param address_ the address that will be flagged function flagAddress(address address_) external managed { flaggedAddresses.push(address_); emit AddressFlagged(msg.sender, address_); } /// @notice used to remove the flag of an address and restore the ability for it to transfer passes /// @dev callable by admin or manager /// @param address_ the address that will be unflagged function unflagAddress(address address_) external managed { for (uint256 i = 0; i < flaggedAddresses.length; i++) { if (flaggedAddresses[i] == address_) { flaggedAddresses[i] = flaggedAddresses[flaggedAddresses.length - 1]; flaggedAddresses.pop(); break; } } emit AddressUnflagged(msg.sender, address_); } /// @notice used to flag a pass and make it untransferrable /// @dev callable by admin or manager /// @param tokenId_ the pass that will be flagged function flagPass(uint256 tokenId_) external managed { flaggedPasses.push(tokenId_); emit PassFlagged(msg.sender, tokenId_); } /// @notice used to remove the flag of a pass and restore the ability for it to be transferred /// @dev callable by admin or manager /// @param tokenId_ the pass that will be unflagged function unflagPass(uint256 tokenId_) external managed { for (uint256 i = 0; i < flaggedPasses.length; i++) { if (flaggedPasses[i] == tokenId_) { flaggedPasses[i] = flaggedPasses[flaggedPasses.length - 1]; flaggedPasses.pop(); break; } } emit PassUnflagged(msg.sender, tokenId_); } /// @notice this function will burn passes minted from this address /// @param tokenId_ the pass's tokenId function burn(uint256 tokenId_) public override onlyRole(DEFAULT_ADMIN_ROLE) { _burn(tokenId_, false); emit PassBurned(msg.sender, tokenId_); } /// @notice Hook to check whether a pass is transferrable /// @dev admins can always transfer regardless of whether passes are flagged /// @param from address that holds the tokenId /// @param to address that will receive the tokenId /// @param startTokenId index of first tokenId that will be transferred /// @param quantity amount that will be transferred function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal override { if (!hasRole(DEFAULT_ADMIN_ROLE, msg.sender)) { if (isAddressFlagged(from)) revert FromFlaggedAddress(); if (isAddressFlagged(to)) revert ToFlaggedAddress(); for (uint256 i = startTokenId; i < startTokenId + quantity; i++) { if (isPassFlagged(i)) revert PassIsFlagged(); } } super._beforeTokenTransfers(from, to, startTokenId, quantity); } /* Admin Functions */ /// @notice admin transfer of token from one address to another and meant to be used with extreme care /// @dev only callable from an address with the admin role /// @param from_ the address that holds the tokenId /// @param to_ the address which will receive the tokenId /// @param tokenId_ the pass's tokenId function adminTransfer( address from_, address to_, uint256 tokenId_ ) external onlyRole(DEFAULT_ADMIN_ROLE) { _adminTransferFrom(from_, to_, tokenId_); emit AdminTransfer(msg.sender, from_, to_, tokenId_); } /// @notice Withdraw function in case anyone sends ETH to contract by mistake function withdraw() external payable onlyRole(DEFAULT_ADMIN_ROLE) { // solhint-disable-next-line avoid-low-level-calls (bool success, ) = payable(msg.sender).call{value: address(this).balance}(""); if (!success) revert FailedToWithdraw(); } /* ERC721A Overrides */ /// @notice Override of ERC721A start token ID /// @return The initial tokenId function _startTokenId() internal view virtual override returns (uint256) { return 1; } /// @notice Override of ERC721A tokenURI(uint256) /// @param tokenId the tokenId without offsets /// @return The tokenURI with metadata function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); return bytes(baseURI).length > 0 ? baseURI : ""; } /// @notice Override of ERC721A and AccessControlUpgradeable supportsInterface function /// @param interfaceId the interfaceId /// @return bool if interfaceId is supported or not function supportsInterface(bytes4 interfaceId) public view virtual override(AccessControlUpgradeable, ERC721AUUPSUpgradeable) returns (bool) { return interfaceId == type(IERC721Upgradeable).interfaceId || interfaceId == type(IERC721MetadataUpgradeable).interfaceId || interfaceId == type(AccessControlUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /// @notice UUPS Upgradeable authorization function /// @dev Only the UPGRADER_ROLE can upgrade the contract /// @param newImplementation The address of the new implementation // solhint-disable-next-line no-empty-blocks function _authorizeUpgrade(address newImplementation) internal override onlyRole(UPGRADER_ROLE) {} /* Modifiers */ /// @notice Modifier that ensures the function is being called by an address that is either a manager or a default admin modifier managed() { if (!hasRole(MANAGER_ROLE, msg.sender) && !hasRole(DEFAULT_ADMIN_ROLE, msg.sender)) revert Unauthorized(); _; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.0; import "../../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() initializer {} * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { // If the contract is initializing we ignore whether _initialized is set in order to support multiple // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the // contract may have been reentered. require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} modifier, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } function _isConstructor() private view returns (bool) { return !AddressUpgradeable.isContract(address(this)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControlUpgradeable.sol"; import "../utils/ContextUpgradeable.sol"; import "../utils/StringsUpgradeable.sol"; import "../utils/introspection/ERC165Upgradeable.sol"; import "../proxy/utils/Initializable.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 AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable { function __AccessControl_init() internal onlyInitializing { } function __AccessControl_init_unchained() internal onlyInitializing { } 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, _msgSender()); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControlUpgradeable).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 `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 ", StringsUpgradeable.toHexString(uint160(account), 20), " is missing role ", StringsUpgradeable.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. */ 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. */ 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`. */ 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. * * [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. */ 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. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // Creator: Chiru Labs pragma solidity ^0.8.4; import '../ERC721AUUPSUpgradeable.sol'; error InvalidQueryRange(); /** * @title ERC721A Queryable * @dev ERC721A subclass with convenience query functions. */ abstract contract ERC721AQueryableUUPSUpgradeable is ERC721AUUPSUpgradeable { /** * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting. * * If the `tokenId` is out of bounds: * - `addr` = `address(0)` * - `startTimestamp` = `0` * - `burned` = `false` * * If the `tokenId` is burned: * - `addr` = `<Address of owner before token was burned>` * - `startTimestamp` = `<Timestamp when token was burned>` * - `burned = `true` * * Otherwise: * - `addr` = `<Address of owner>` * - `startTimestamp` = `<Timestamp of start of ownership>` * - `burned = `false` */ function explicitOwnershipOf(uint256 tokenId) public view returns (TokenOwnership memory) { TokenOwnership memory ownership; if (tokenId < _startTokenId() || tokenId >= _currentIndex) { return ownership; } ownership = _ownerships[tokenId]; if (ownership.burned) { return ownership; } return _ownershipOf(tokenId); } /** * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order. * See {ERC721AQueryable-explicitOwnershipOf} */ function explicitOwnershipsOf(uint256[] memory tokenIds) external view returns (TokenOwnership[] memory) { unchecked { uint256 tokenIdsLength = tokenIds.length; TokenOwnership[] memory ownerships = new TokenOwnership[](tokenIdsLength); for (uint256 i; i != tokenIdsLength; ++i) { ownerships[i] = explicitOwnershipOf(tokenIds[i]); } return ownerships; } } /** * @dev Returns an array of token IDs owned by `owner`, * in the range [`start`, `stop`) * (i.e. `start <= tokenId < stop`). * * This function allows for tokens to be queried if the collection * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}. * * Requirements: * * - `start` < `stop` */ function tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) external view returns (uint256[] memory) { unchecked { if (start >= stop) revert InvalidQueryRange(); uint256 tokenIdsIdx; uint256 stopLimit = _currentIndex; // Set `start = max(start, _startTokenId())`. if (start < _startTokenId()) { start = _startTokenId(); } // Set `stop = min(stop, _currentIndex)`. if (stop > stopLimit) { stop = stopLimit; } uint256 tokenIdsMaxLength = balanceOf(owner); // Set `tokenIdsMaxLength = min(balanceOf(owner), stop - start)`, // to cater for cases where `balanceOf(owner)` is too big. if (start < stop) { uint256 rangeLength = stop - start; if (rangeLength < tokenIdsMaxLength) { tokenIdsMaxLength = rangeLength; } } else { tokenIdsMaxLength = 0; } uint256[] memory tokenIds = new uint256[](tokenIdsMaxLength); if (tokenIdsMaxLength == 0) { return tokenIds; } // We need to call `explicitOwnershipOf(start)`, // because the slot at `start` may not be initialized. TokenOwnership memory ownership = explicitOwnershipOf(start); address currOwnershipAddr; // If the starting slot exists (i.e. not burned), initialize `currOwnershipAddr`. // `ownership.address` will not be zero, as `start` is clamped to the valid token ID range. if (!ownership.burned) { currOwnershipAddr = ownership.addr; } for (uint256 i = start; i != stop && tokenIdsIdx != tokenIdsMaxLength; ++i) { ownership = _ownerships[i]; if (ownership.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { tokenIds[tokenIdsIdx++] = i; } } // Downsize the array to fit. assembly { mstore(tokenIds, tokenIdsIdx) } return tokenIds; } } /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(totalSupply) in complexity. * It is meant to be called off-chain. * * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into * multiple smaller scans if the collection is large enough to cause * an out-of-gas error (10K pfp collections should be fine). */ function tokensOfOwner(address owner) external view returns (uint256[] memory) { unchecked { uint256 tokenIdsIdx; address currOwnershipAddr; uint256 tokenIdsLength = balanceOf(owner); uint256[] memory tokenIds = new uint256[](tokenIdsLength); TokenOwnership memory ownership; for (uint256 i = _startTokenId(); tokenIdsIdx != tokenIdsLength; ++i) { ownership = _ownerships[i]; if (ownership.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { tokenIds[tokenIdsIdx++] = i; } } return tokenIds; } } }
// SPDX-License-Identifier: MIT // Creator: Chiru Labs pragma solidity ^0.8.4; import '../ERC721AUUPSUpgradeable.sol'; /** * @title ERC721A Burnable Token * @dev ERC721A Token that can be irreversibly burned (destroyed). */ abstract contract ERC721ABurnableUUPSUpgradeable is ERC721AUUPSUpgradeable { /** * @dev Burns `tokenId`. See {ERC721A-_burn}. * * Requirements: * * - The caller must own `tokenId` or be an approved operator. */ function burn(uint256 tokenId) public virtual { _burn(tokenId, true); } }
// SPDX-License-Identifier: MIT // Creator: Chiru Labs pragma solidity ^0.8.4; import '../ERC721AUUPSUpgradeable.sol'; /** * @title ERC721A Goverend Token * @dev ERC721A Token that can transferred without approval. */ abstract contract ERC721AGoverenedUUPSUpgradeable is ERC721AUUPSUpgradeable { /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _adminTransferFrom( address from, address to, uint256 tokenId ) internal { _transfer(from, to, tokenId, false); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.12; interface ISNIF { function ownerOf(uint256 tokenId) external view returns (address owner); function balanceOf(address owner) external view returns (uint256 balance); function totalSupply() external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @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 Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControlUpgradeable { /** * @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 v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @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 ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library StringsUpgradeable { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable { function __ERC165_init() internal onlyInitializing { } function __ERC165_init_unchained() internal onlyInitializing { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165Upgradeable).interfaceId; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// 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 IERC165Upgradeable { /** * @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 // Creator: Chiru Labs pragma solidity ^0.8.4; import '@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol'; import '@openzeppelin/contracts-upgradeable/token/ERC721/IERC721ReceiverUpgradeable.sol'; import '@openzeppelin/contracts-upgradeable/token/ERC721/extensions/IERC721MetadataUpgradeable.sol'; import '@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol'; import '@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol'; import '@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol'; import '@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol'; import '@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol'; import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; error ApprovalCallerNotOwnerNorApproved(); error ApprovalQueryForNonexistentToken(); error ApproveToCaller(); error ApprovalToCurrentOwner(); error BalanceQueryForZeroAddress(); error MintToZeroAddress(); error MintZeroQuantity(); error OwnerQueryForNonexistentToken(); error TransferCallerNotOwnerNorApproved(); error TransferFromIncorrectOwner(); error TransferToNonERC721ReceiverImplementer(); error TransferToZeroAddress(); error URIQueryForNonexistentToken(); /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..). * * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256). */ abstract contract ERC721AUUPSUpgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable, UUPSUpgradeable { using AddressUpgradeable for address; using StringsUpgradeable for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps track of the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; } // Compiler will pack this into a single 256bit word. struct AddressData { // Realistically, 2**64-1 is more than enough. uint64 balance; // Keeps track of mint count with minimal overhead for tokenomics. uint64 numberMinted; // Keeps track of burn count with minimal overhead for tokenomics. uint64 numberBurned; // For miscellaneous variable(s) pertaining to the address // (e.g. number of whitelist mint slots used). // If there are multiple variables, please pack them into a uint64. uint64 aux; } // The tokenId of the next token to be minted. uint256 internal _currentIndex; // The number of tokens burned. uint256 internal _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. See _ownershipOf implementation for details. mapping(uint256 => TokenOwnership) internal _ownerships; // Mapping owner address to address data mapping(address => AddressData) private _addressData; // 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; function __ERC721A_init(string memory name_, string memory symbol_) internal onlyInitializing { __ERC721A_init_unchained(name_, symbol_); __Context_init_unchained(); __ERC165_init_unchained(); } function __ERC721A_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } /** * To change the starting tokenId, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Burned tokens are calculated here, use _totalMinted() if you want to count just minted tokens. */ function totalSupply() public view returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than _currentIndex - _startTokenId() times unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view returns (uint256) { // Counter underflow is impossible as _currentIndex does not decrement, // and it is initialized to _startTokenId() unchecked { return _currentIndex - _startTokenId(); } } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) { return interfaceId == type(IERC721Upgradeable).interfaceId || interfaceId == type(IERC721MetadataUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return uint256(_addressData[owner].balance); } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return uint256(_addressData[owner].numberMinted); } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return uint256(_addressData[owner].numberBurned); } /** * Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return _addressData[owner].aux; } /** * Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal { _addressData[owner].aux = aux; } /** * Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around in the collection over time. */ function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr && curr < _currentIndex) { TokenOwnership memory ownership = _ownerships[curr]; if (!ownership.burned) { if (ownership.addr != address(0)) { return ownership; } // Invariant: // There will always be an ownership that has an address and is not burned // before an ownership that does not have an address and is not burned. // Hence, curr will not underflow. while (true) { curr--; ownership = _ownerships[curr]; if (ownership.addr != address(0)) { return ownership; } } } } } revert OwnerQueryForNonexistentToken(); } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { return _ownershipOf(tokenId).addr; } /** * @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) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ''; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public override { address owner = ERC721AUUPSUpgradeable.ownerOf(tokenId); if (to == owner) revert ApprovalToCurrentOwner(); if (_msgSender() != owner && !isApprovedForAll(owner, _msgSender())) { revert ApprovalCallerNotOwnerNorApproved(); } _approve(to, tokenId, owner); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { if (operator == _msgSender()) revert ApproveToCaller(); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { _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 { _transfer(from, to, tokenId); if (to.isContract() && !_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @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`), */ function _exists(uint256 tokenId) internal view returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && !_ownerships[tokenId].burned; } function _safeMint(address to, uint256 quantity) internal { _safeMint(to, quantity, ''); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { _mint(to, quantity, _data, true); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _mint( address to, uint256 quantity, bytes memory _data, bool safe ) internal { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1 // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1 unchecked { _addressData[to].balance += uint64(quantity); _addressData[to].numberMinted += uint64(quantity); _ownerships[startTokenId].addr = to; _ownerships[startTokenId].startTimestamp = uint64(block.timestamp); uint256 updatedIndex = startTokenId; uint256 end = updatedIndex + quantity; if (safe && to.isContract()) { do { emit Transfer(address(0), to, updatedIndex); if (!_checkContractOnERC721Received(address(0), to, updatedIndex++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (updatedIndex != end); // Reentrancy protection if (_currentIndex != startTokenId) revert(); } else { do { emit Transfer(address(0), to, updatedIndex++); } while (updatedIndex != end); } _currentIndex = updatedIndex; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Transfers `tokenId` from `from` to `to`. * * 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 ) private { _transfer(from, to, tokenId, true); } /** * @dev Transfers `tokenId` from `from` to `to`. * * 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, bool approvalCheck ) internal virtual { TokenOwnership memory prevOwnership = _ownershipOf(tokenId); if (prevOwnership.addr != from) revert TransferFromIncorrectOwner(); if(approvalCheck) { bool isApprovedOrOwner = (_msgSender() == from || isApprovedForAll(from, _msgSender()) || getApproved(tokenId) == _msgSender()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); } _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, from); // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { _addressData[from].balance -= 1; _addressData[to].balance += 1; TokenOwnership storage currSlot = _ownerships[tokenId]; currSlot.addr = to; currSlot.startTimestamp = uint64(block.timestamp); // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; TokenOwnership storage nextSlot = _ownerships[nextTokenId]; if (nextSlot.addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId != _currentIndex) { nextSlot.addr = from; nextSlot.startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev This is equivalent to _burn(tokenId, false) */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { TokenOwnership memory prevOwnership = _ownershipOf(tokenId); address from = prevOwnership.addr; if (approvalCheck) { bool isApprovedOrOwner = (_msgSender() == from || isApprovedForAll(from, _msgSender()) || getApproved(tokenId) == _msgSender()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, from); // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { AddressData storage addressData = _addressData[from]; addressData.balance -= 1; addressData.numberBurned += 1; // Keep track of who burned the token, and the timestamp of burning. TokenOwnership storage currSlot = _ownerships[tokenId]; currSlot.addr = from; currSlot.startTimestamp = uint64(block.timestamp); currSlot.burned = true; // If the ownership slot of tokenId+1 is not explicitly set, that means the burn initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; TokenOwnership storage nextSlot = _ownerships[nextTokenId]; if (nextSlot.addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId != _currentIndex) { nextSlot.addr = from; nextSlot.startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve( address to, uint256 tokenId, address owner ) internal { _tokenApprovals[tokenId] = to; emit Approval(owner, to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target 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 _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721ReceiverUpgradeable(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } /** * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting. * And also called before burning one token. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * And also called after one token has been burned. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165Upgradeable.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721Upgradeable is IERC165Upgradeable { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721ReceiverUpgradeable { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721Upgradeable.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721MetadataUpgradeable is IERC721Upgradeable { /** * @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.5.0) (proxy/utils/UUPSUpgradeable.sol) pragma solidity ^0.8.0; import "../../interfaces/draft-IERC1822Upgradeable.sol"; import "../ERC1967/ERC1967UpgradeUpgradeable.sol"; import "./Initializable.sol"; /** * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy. * * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing * `UUPSUpgradeable` with a custom implementation of upgrades. * * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism. * * _Available since v4.1._ */ abstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable { function __UUPSUpgradeable_init() internal onlyInitializing { } function __UUPSUpgradeable_init_unchained() internal onlyInitializing { } /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment address private immutable __self = address(this); /** * @dev Check that the execution is being performed through a delegatecall call and that the execution context is * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to * fail. */ modifier onlyProxy() { require(address(this) != __self, "Function must be called through delegatecall"); require(_getImplementation() == __self, "Function must be called through active proxy"); _; } /** * @dev Check that the execution is not being performed through a delegate call. This allows a function to be * callable on the implementing contract but not through proxies. */ modifier notDelegated() { require(address(this) == __self, "UUPSUpgradeable: must not be called through delegatecall"); _; } /** * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the * implementation. It is used to validate that the this implementation remains valid after an upgrade. * * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier. */ function proxiableUUID() external view virtual override notDelegated returns (bytes32) { return _IMPLEMENTATION_SLOT; } /** * @dev Upgrade the implementation of the proxy to `newImplementation`. * * Calls {_authorizeUpgrade}. * * Emits an {Upgraded} event. */ function upgradeTo(address newImplementation) external virtual onlyProxy { _authorizeUpgrade(newImplementation); _upgradeToAndCallUUPS(newImplementation, new bytes(0), false); } /** * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call * encoded in `data`. * * Calls {_authorizeUpgrade}. * * Emits an {Upgraded} event. */ function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual onlyProxy { _authorizeUpgrade(newImplementation); _upgradeToAndCallUUPS(newImplementation, data, true); } /** * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by * {upgradeTo} and {upgradeToAndCall}. * * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}. * * ```solidity * function _authorizeUpgrade(address) internal override onlyOwner {} * ``` */ function _authorizeUpgrade(address newImplementation) internal virtual; /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol) pragma solidity ^0.8.0; /** * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified * proxy whose upgrades are fully controlled by the current implementation. */ interface IERC1822ProxiableUpgradeable { /** * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation * address. * * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this * function revert if invoked through a proxy. */ function proxiableUUID() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol) pragma solidity ^0.8.2; import "../beacon/IBeaconUpgradeable.sol"; import "../../interfaces/draft-IERC1822Upgradeable.sol"; import "../../utils/AddressUpgradeable.sol"; import "../../utils/StorageSlotUpgradeable.sol"; import "../utils/Initializable.sol"; /** * @dev This abstract contract provides getters and event emitting update functions for * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots. * * _Available since v4.1._ * * @custom:oz-upgrades-unsafe-allow delegatecall */ abstract contract ERC1967UpgradeUpgradeable is Initializable { function __ERC1967Upgrade_init() internal onlyInitializing { } function __ERC1967Upgrade_init_unchained() internal onlyInitializing { } // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1 bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143; /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev Emitted when the implementation is upgraded. */ event Upgraded(address indexed implementation); /** * @dev Returns the current implementation address. */ function _getImplementation() internal view returns (address) { return StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value; } /** * @dev Stores a new address in the EIP1967 implementation slot. */ function _setImplementation(address newImplementation) private { require(AddressUpgradeable.isContract(newImplementation), "ERC1967: new implementation is not a contract"); StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; } /** * @dev Perform implementation upgrade * * Emits an {Upgraded} event. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Perform implementation upgrade with additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCall( address newImplementation, bytes memory data, bool forceCall ) internal { _upgradeTo(newImplementation); if (data.length > 0 || forceCall) { _functionDelegateCall(newImplementation, data); } } /** * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCallUUPS( address newImplementation, bytes memory data, bool forceCall ) internal { // Upgrades from old implementations will perform a rollback test. This test requires the new // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing // this special case will break upgrade paths from old UUPS implementation to new ones. if (StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT).value) { _setImplementation(newImplementation); } else { try IERC1822ProxiableUpgradeable(newImplementation).proxiableUUID() returns (bytes32 slot) { require(slot == _IMPLEMENTATION_SLOT, "ERC1967Upgrade: unsupported proxiableUUID"); } catch { revert("ERC1967Upgrade: new implementation is not UUPS"); } _upgradeToAndCall(newImplementation, data, forceCall); } } /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Emitted when the admin account has changed. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Returns the current admin. */ function _getAdmin() internal view returns (address) { return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value; } /** * @dev Stores a new address in the EIP1967 admin slot. */ function _setAdmin(address newAdmin) private { require(newAdmin != address(0), "ERC1967: new admin is the zero address"); StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin; } /** * @dev Changes the admin of the proxy. * * Emits an {AdminChanged} event. */ function _changeAdmin(address newAdmin) internal { emit AdminChanged(_getAdmin(), newAdmin); _setAdmin(newAdmin); } /** * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy. * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor. */ bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50; /** * @dev Emitted when the beacon is upgraded. */ event BeaconUpgraded(address indexed beacon); /** * @dev Returns the current beacon. */ function _getBeacon() internal view returns (address) { return StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value; } /** * @dev Stores a new beacon in the EIP1967 beacon slot. */ function _setBeacon(address newBeacon) private { require(AddressUpgradeable.isContract(newBeacon), "ERC1967: new beacon is not a contract"); require( AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()), "ERC1967: beacon implementation is not a contract" ); StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value = newBeacon; } /** * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that). * * Emits a {BeaconUpgraded} event. */ function _upgradeBeaconToAndCall( address newBeacon, bytes memory data, bool forceCall ) internal { _setBeacon(newBeacon); emit BeaconUpgraded(newBeacon); if (data.length > 0 || forceCall) { _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data); } } /** * @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) private returns (bytes memory) { require(AddressUpgradeable.isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return AddressUpgradeable.verifyCallResult(success, returndata, "Address: low-level delegate call failed"); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol) pragma solidity ^0.8.0; /** * @dev This is the interface that {BeaconProxy} expects of its beacon. */ interface IBeaconUpgradeable { /** * @dev Must return an address that can be used as a delegate call target. * * {BeaconProxy} will check that this address is a contract. */ function implementation() external view returns (address); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol) pragma solidity ^0.8.0; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ``` * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` * * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._ */ library StorageSlotUpgradeable { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { assembly { r.slot := slot } } }
{ "optimizer": { "enabled": true, "runs": 2000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"FailedToWithdraw","type":"error"},{"inputs":[],"name":"FromFlaggedAddress","type":"error"},{"inputs":[],"name":"InvalidQueryRange","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"PassIsFlagged","type":"error"},{"inputs":[],"name":"ToFlaggedAddress","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"address","name":"flaggedAddress","type":"address"}],"name":"AddressFlagged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"address","name":"unflaggedAddress","type":"address"}],"name":"AddressUnflagged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"AdminTransfer","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":"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":"sender","type":"address"},{"indexed":false,"internalType":"string","name":"previousURI","type":"string"},{"indexed":false,"internalType":"string","name":"newURI","type":"string"}],"name":"BaseURIChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beacon","type":"address"}],"name":"BeaconUpgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"PassBurned","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"PassFlagged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"PassUnflagged","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":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MANAGER_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":"UPGRADER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from_","type":"address"},{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"tokenId_","type":"uint256"}],"name":"adminTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"recipients_","type":"address[]"}],"name":"airdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"explicitOwnershipOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"}],"internalType":"struct ERC721AUUPSUpgradeable.TokenOwnership","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"explicitOwnershipsOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"}],"internalType":"struct ERC721AUUPSUpgradeable.TokenOwnership[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"address_","type":"address"}],"name":"flagAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId_","type":"uint256"}],"name":"flagPass","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFlaggedAddresses","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFlaggedPasses","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"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":"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":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"address_","type":"address"}],"name":"isAddressFlagged","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":"uint256","name":"tokenId_","type":"uint256"}],"name":"isPassFlagged","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","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":"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":"baseURI_","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"snif","outputs":[{"internalType":"contract ISNIF","name":"","type":"address"}],"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":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"stop","type":"uint256"}],"name":"tokensOfOwnerIn","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"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":"address_","type":"address"}],"name":"unflagAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId_","type":"uint256"}],"name":"unflagPass","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"payable","type":"function"}]
Contract Creation Code
60a06040523060805234801561001457600080fd5b5060805161439261004c60003960008181610cd901528181610d6f015281816112720152818161130801526113ff01526143926000f3fe6080604052600436106103135760003560e01c80637ccd134a1161019a578063b88d4fde116100e1578063da72c1e81161008a578063f2fde38b11610064578063f2fde38b1461093c578063f72c0d8b1461095c578063fb72afd31461099057600080fd5b8063da72c1e81461089e578063e985e9c5146108be578063ec87621c1461090857600080fd5b8063d5391393116100bb578063d539139314610835578063d547741f14610869578063d807d4421461088957600080fd5b8063b88d4fde146107c8578063c23dc68f146107e8578063c87b56dd1461081557600080fd5b806399a2557a116101435780639ef5b8e51161011d5780639ef5b8e514610772578063a217fddf14610793578063a22cb465146107a857600080fd5b806399a2557a146107125780639a760fc6146107325780639c4f541a1461075257600080fd5b80638da5cb5b116101745780638da5cb5b1461069657806391d14854146106b757806395d89b41146106fd57600080fd5b80637ccd134a146106325780638129fc1c146106545780638462151c1461066957600080fd5b806342842e0e1161025e5780635a6eaa6e116102075780636c0360eb116101e15780636c0360eb146105dd57806370a08231146105f2578063729ad39e1461061257600080fd5b80635a6eaa6e146105705780635bbb2177146105905780636352211e146105bd57600080fd5b80634f1ef286116102385780634f1ef2861461052857806352d1902d1461053b57806355f804b31461055057600080fd5b806342842e0e146104c85780634294e544146104e857806342966c681461050857600080fd5b8063248a9ca3116102c05780633659cfe61161029a5780633659cfe61461048057806337cb2e09146104a05780633ccfd60b146104c057600080fd5b8063248a9ca3146104105780632f2ff15d1461044057806336568abe1461046057600080fd5b8063095ea7b3116102f1578063095ea7b3146103a757806318160ddd146103c957806323b872dd146103f057600080fd5b806301ffc9a71461031857806306fdde031461034d578063081812fc1461036f575b600080fd5b34801561032457600080fd5b50610338610333366004613afe565b6109b0565b60405190151581526020015b60405180910390f35b34801561035957600080fd5b50610362610a5c565b6040516103449190613b73565b34801561037b57600080fd5b5061038f61038a366004613b86565b610aee565b6040516001600160a01b039091168152602001610344565b3480156103b357600080fd5b506103c76103c2366004613bbb565b610b4c565b005b3480156103d557600080fd5b5060fc5460fb5403600019015b604051908152602001610344565b3480156103fc57600080fd5b506103c761040b366004613be5565b610c0c565b34801561041c57600080fd5b506103e261042b366004613b86565b60009081526065602052604090206001015490565b34801561044c57600080fd5b506103c761045b366004613c21565b610c17565b34801561046c57600080fd5b506103c761047b366004613c21565b610c3d565b34801561048c57600080fd5b506103c761049b366004613c4d565b610cce565b3480156104ac57600080fd5b506103c76104bb366004613c4d565b610e6c565b6103c7610f8c565b3480156104d457600080fd5b506103c76104e3366004613be5565b61101a565b3480156104f457600080fd5b506103c7610503366004613c4d565b611035565b34801561051457600080fd5b506103c7610523366004613b86565b611217565b6103c7610536366004613d27565b611267565b34801561054757600080fd5b506103e26113f2565b34801561055c57600080fd5b506103c761056b366004613d75565b6114b7565b34801561057c57600080fd5b506103c761058b366004613b86565b611556565b34801561059c57600080fd5b506105b06105ab366004613dbe565b6116d3565b6040516103449190613e64565b3480156105c957600080fd5b5061038f6105d8366004613b86565b61179a565b3480156105e957600080fd5b506103626117ac565b3480156105fe57600080fd5b506103e261060d366004613c4d565b61183b565b34801561061e57600080fd5b506103c761062d366004613ecf565b6118a4565b34801561063e57600080fd5b50610647611935565b6040516103449190613f44565b34801561066057600080fd5b506103c7611997565b34801561067557600080fd5b50610689610684366004613c4d565b611c14565b6040516103449190613f85565b3480156106a257600080fd5b506101065461038f906001600160a01b031681565b3480156106c357600080fd5b506103386106d2366004613c21565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561070957600080fd5b50610362611d5e565b34801561071e57600080fd5b5061068961072d366004613fbd565b611d6d565b34801561073e57600080fd5b5061033861074d366004613c4d565b611f50565b34801561075e57600080fd5b5061033861076d366004613b86565b611fbc565b34801561077e57600080fd5b506101075461038f906001600160a01b031681565b34801561079f57600080fd5b506103e2600081565b3480156107b457600080fd5b506103c76107c3366004613ff0565b61200c565b3480156107d457600080fd5b506103c76107e336600461402c565b6120bc565b3480156107f457600080fd5b50610808610803366004613b86565b612107565b6040516103449190614094565b34801561082157600080fd5b50610362610830366004613b86565b6121c2565b34801561084157600080fd5b506103e27f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b34801561087557600080fd5b506103c7610884366004613c21565b6122c1565b34801561089557600080fd5b506106896122e7565b3480156108aa57600080fd5b506103c76108b9366004613be5565b61233f565b3480156108ca57600080fd5b506103386108d93660046140ca565b6001600160a01b0391821660009081526101026020908152604080832093909416825291909152205460ff1690565b34801561091457600080fd5b506103e27f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b0881565b34801561094857600080fd5b506103c7610957366004613c4d565b6123a9565b34801561096857600080fd5b506103e27f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b34801561099c57600080fd5b506103c76109ab366004613b86565b6123e6565b60006001600160e01b031982167f80ac58cd000000000000000000000000000000000000000000000000000000001480610a1357506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610a4757506001600160e01b031982167fda8def7300000000000000000000000000000000000000000000000000000000145b80610a565750610a56826124d9565b92915050565b606060fd8054610a6b906140f4565b80601f0160208091040260200160405190810160405280929190818152602001828054610a97906140f4565b8015610ae45780601f10610ab957610100808354040283529160200191610ae4565b820191906000526020600020905b815481529060010190602001808311610ac757829003601f168201915b5050505050905090565b6000610af98261254b565b610b2f576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50600090815261010160205260409020546001600160a01b031690565b6000610b578261179a565b9050806001600160a01b0316836001600160a01b03161415610ba5576040517f943f7b8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336001600160a01b03821614801590610bc55750610bc381336108d9565b155b15610bfc576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610c07838383612585565b505050565b610c078383836125ef565b600082815260656020526040902060010154610c3381336125fc565b610c07838361267c565b6001600160a01b0381163314610cc05760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b610cca828261271e565b5050565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161415610d6d5760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f64656c656761746563616c6c00000000000000000000000000000000000000006064820152608401610cb7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610dc87f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b031614610e445760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f6163746976652070726f787900000000000000000000000000000000000000006064820152608401610cb7565b610e4d816127a1565b60408051600080825260208201909252610e69918391906127cc565b50565b3360009081527fcee91eb23e767f0f440dd9fce5554f355614443931e9ac5ce78c67b9e06e6f70602052604090205460ff16158015610eda57503360009081527fffdfc1249c027f9191656349feb0761381bb32c9f557e01f419fd08754bf5a1b602052604090205460ff16155b15610ef7576040516282b42960e81b815260040160405180910390fd5b61010480546001810182556000919091527f4c0be60200faa20559308cb7b5a1bb3255c16cb1cab91f525b5ae7a03d02fabe01805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03831690811790915560405190815233907ff34c09a7cee2ec36676b00d8197a8db8ba2c6e091727126e27c8e3c34747f1a3906020015b60405180910390a250565b6000610f9881336125fc565b604051600090339047908381818185875af1925050503d8060008114610fda576040519150601f19603f3d011682016040523d82523d6000602084013e610fdf565b606091505b5050905080610cca576040517f2684a07900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610c07838383604051806020016040528060008152506120bc565b3360009081527fcee91eb23e767f0f440dd9fce5554f355614443931e9ac5ce78c67b9e06e6f70602052604090205460ff161580156110a357503360009081527fffdfc1249c027f9191656349feb0761381bb32c9f557e01f419fd08754bf5a1b602052604090205460ff16155b156110c0576040516282b42960e81b815260040160405180910390fd5b60005b610104548110156111db57816001600160a01b031661010482815481106110ec576110ec61412f565b6000918252602090912001546001600160a01b031614156111c95761010480546111189060019061415b565b815481106111285761112861412f565b60009182526020909120015461010480546001600160a01b0390921691839081106111555761115561412f565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555061010480548061119557611195614172565b6000828152602090208101600019908101805473ffffffffffffffffffffffffffffffffffffffff191690550190556111db565b806111d381614188565b9150506110c3565b506040516001600160a01b038216815233907fcc229432447e3f287b17d54ea5b3efb13d26e022102362f4d8eba4ac37fb8c7690602001610f81565b600061122381336125fc565b61122e82600061296c565b60405182815233907febf58b3208042e45d5e059eaa32ca2cde0bb4d975dc4a3744c96122254ea79559060200160405180910390a25050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614156113065760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f64656c656761746563616c6c00000000000000000000000000000000000000006064820152608401610cb7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166113617f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b0316146113dd5760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f6163746976652070726f787900000000000000000000000000000000000000006064820152608401610cb7565b6113e6826127a1565b610cca828260016127cc565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146114925760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401610cb7565b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90565b3360009081527fcee91eb23e767f0f440dd9fce5554f355614443931e9ac5ce78c67b9e06e6f70602052604090205460ff1615801561152557503360009081527fffdfc1249c027f9191656349feb0761381bb32c9f557e01f419fd08754bf5a1b602052604090205460ff16155b15611542576040516282b42960e81b815260040160405180910390fd5b8051610cca90610105906020840190613a4f565b3360009081527fcee91eb23e767f0f440dd9fce5554f355614443931e9ac5ce78c67b9e06e6f70602052604090205460ff161580156115c457503360009081527fffdfc1249c027f9191656349feb0761381bb32c9f557e01f419fd08754bf5a1b602052604090205460ff16155b156115e1576040516282b42960e81b815260040160405180910390fd5b60005b610103548110156116a0578161010382815481106116045761160461412f565b9060005260206000200154141561168e5761010380546116269060019061415b565b815481106116365761163661412f565b906000526020600020015461010382815481106116555761165561412f565b60009182526020909120015561010380548061167357611673614172565b600190038181906000526020600020016000905590556116a0565b8061169881614188565b9150506115e4565b5060405181815233907fb70d5efd04a6c6286cb9d839961d27cf9c5046d5df12b1e553dd77b5c30f0ac190602001610f81565b805160609060008167ffffffffffffffff8111156116f3576116f3613c68565b60405190808252806020026020018201604052801561173e57816020015b60408051606081018252600080825260208083018290529282015282526000199092019101816117115790505b50905060005b8281146117925761176d8582815181106117605761176061412f565b6020026020010151612107565b82828151811061177f5761177f61412f565b6020908102919091010152600101611744565b509392505050565b60006117a582612b8b565b5192915050565b61010580546117ba906140f4565b80601f01602080910402602001604051908101604052809291908181526020018280546117e6906140f4565b80156118335780601f1061180857610100808354040283529160200191611833565b820191906000526020600020905b81548152906001019060200180831161181657829003601f168201915b505050505081565b60006001600160a01b03821661187d576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b03166000908152610100602052604090205467ffffffffffffffff1690565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a66118cf81336125fc565b60005b8281101561192f5761191d8484838181106118ef576118ef61412f565b90506020020160208101906119049190613c4d565b6001604051806020016040528060008152506000612cce565b8061192781614188565b9150506118d2565b50505050565b6060610104805480602002602001604051908101604052809291908181526020018280548015610ae457602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611970575050505050905090565b600054610100900460ff166119b25760005460ff16156119b6565b303b155b611a285760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610cb7565b600054610100900460ff16158015611a6757600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000166101011790555b611adb6040518060400160405280600781526020017f534e49464d5050000000000000000000000000000000000000000000000000008152506040518060400160405280600781526020017f534e49464d505000000000000000000000000000000000000000000000000000815250612ef2565b611ae3612f85565b611b026000731980c5a48909811200977d41c1e28a4ba32537f661267c565b611b0d60003361267c565b611b377f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e33361267c565b611b617f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a63361267c565b610107805473ffffffffffffffffffffffffffffffffffffffff1916731d0ec4a86ac39fef4485169b4d14dc39d0ea64cd1790556040805160608101909152603580825261430160208301398051611bc29161010591602090910190613a4f565b50610106805473ffffffffffffffffffffffffffffffffffffffff1916331790558015610e6957600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b60606000806000611c248561183b565b905060008167ffffffffffffffff811115611c4157611c41613c68565b604051908082528060200260200182016040528015611c6a578160200160208202803683370190505b50604080516060810182526000808252602082018190529181019190915290915060015b838614611d5257600081815260ff6020818152604092839020835160608101855290546001600160a01b038116825267ffffffffffffffff600160a01b82041692820192909252600160e01b909104909116158015928201929092529250611cf557611d4a565b81516001600160a01b031615611d0a57815194505b876001600160a01b0316856001600160a01b03161415611d4a5780838780600101985081518110611d3d57611d3d61412f565b6020026020010181815250505b600101611c8e565b50909695505050505050565b606060fe8054610a6b906140f4565b6060818310611da8576040517f32c1995a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60fb546000906001851015611dbc57600194505b80841115611dc8578093505b6000611dd38761183b565b905084861015611df25785850381811015611dec578091505b50611df6565b5060005b60008167ffffffffffffffff811115611e1157611e11613c68565b604051908082528060200260200182016040528015611e3a578160200160208202803683370190505b50905081611e4d579350611f4992505050565b6000611e5888612107565b905060008160400151611e69575080515b885b888114158015611e7b5750848714155b15611f3d57600081815260ff6020818152604092839020835160608101855290546001600160a01b038116825267ffffffffffffffff600160a01b82041692820192909252600160e01b909104909116158015928201929092529350611ee057611f35565b82516001600160a01b031615611ef557825191505b8a6001600160a01b0316826001600160a01b03161415611f355780848880600101995081518110611f2857611f2861412f565b6020026020010181815250505b600101611e6b565b50505092835250909150505b9392505050565b6000805b61010454811015611fb357826001600160a01b03166101048281548110611f7d57611f7d61412f565b6000918252602090912001546001600160a01b03161415611fa15750600192915050565b80611fab81614188565b915050611f54565b50600092915050565b6000805b61010354811015611fb357826101038281548110611fe057611fe061412f565b90600052602060002001541415611ffa5750600192915050565b8061200481614188565b915050611fc0565b6001600160a01b03821633141561204f576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000818152610102602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6120c78484846125ef565b6001600160a01b0383163b151580156120e957506120e784848484613004565b155b1561192f576040516368d2bf6b60e11b815260040160405180910390fd5b6040805160608082018352600080835260208084018290528385018290528451928301855281835282018190529281019290925290600183108061214d575060fb548310155b156121585792915050565b50600082815260ff6020818152604092839020835160608101855290546001600160a01b038116825267ffffffffffffffff600160a01b82041692820192909252600160e01b90910490911615801592820192909252906121b95792915050565b611f4983612b8b565b60606121cd8261254b565b612203576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006101058054612213906140f4565b90501161222f5760405180602001604052806000815250610a56565b610105805461223d906140f4565b80601f0160208091040260200160405190810160405280929190818152602001828054612269906140f4565b80156122b65780601f1061228b576101008083540402835291602001916122b6565b820191906000526020600020905b81548152906001019060200180831161229957829003601f168201915b505050505092915050565b6000828152606560205260409020600101546122dd81336125fc565b610c07838361271e565b6060610103805480602002602001604051908101604052809291908181526020018280548015610ae457602002820191906000526020600020905b815481526020019060010190808311612322575050505050905090565b600061234b81336125fc565b61235684848461311f565b604080516001600160a01b0386811682528516602082015290810183905233907f360bb0808951709e17b8c0ff5cf74aa15579508d1227398aac32794efdfe75ea9060600160405180910390a250505050565b60006123b581336125fc565b50610106805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b3360009081527fcee91eb23e767f0f440dd9fce5554f355614443931e9ac5ce78c67b9e06e6f70602052604090205460ff1615801561245457503360009081527fffdfc1249c027f9191656349feb0761381bb32c9f557e01f419fd08754bf5a1b602052604090205460ff16155b15612471576040516282b42960e81b815260040160405180910390fd5b61010380546001810182556000919091527f02c297ab74aad0aede3a1895c857b1f2c71e6a203feb727bec95ac752998cb780181905560405181815233907f6aa6f2d5815f452776524be118aee25ce1b225322a65ffa23a005ba32334a78f90602001610f81565b60006001600160e01b031982167f80ac58cd00000000000000000000000000000000000000000000000000000000148061253c57506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610a565750610a568261312c565b60008160011115801561255f575060fb5482105b8015610a56575050600090815260ff6020819052604090912054600160e01b9004161590565b60008281526101016020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b610c078383836001613193565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610cca5761263a816001600160a01b031660146133e2565b6126458360206133e2565b6040516020016126569291906141a3565b60408051601f198184030181529082905262461bcd60e51b8252610cb791600401613b73565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610cca5760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556126da3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff1615610cca5760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3610cca81336125fc565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff16156127ff57610c078361360b565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015612859575060408051601f3d908101601f1916820190925261285691810190614224565b60015b6128cb5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201527f6f6e206973206e6f7420555550530000000000000000000000000000000000006064820152608401610cb7565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc81146129605760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f7860448201527f6961626c655555494400000000000000000000000000000000000000000000006064820152608401610cb7565b50610c078383836136d6565b600061297783612b8b565b805190915082156129f6576000336001600160a01b03831614806129a057506129a082336108d9565b806129bb5750336129b086610aee565b6001600160a01b0316145b9050806129f4576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505b612a048160008660016136fb565b612a1060008583612585565b6001600160a01b03808216600081815261010060209081526040808320805470010000000000000000000000000000000060001967ffffffffffffffff80841691909101811667ffffffffffffffff19841681178390048216600190810183169093027fffffffffffffffff0000000000000000ffffffffffffffff0000000000000000909416179290921783558b865260ff90945282852080547fffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffff42909316600160a01b026001600160e01b03199091169097179690961716600160e01b178555918901808452922080549194909116612b405760fb548214612b40578054602087015167ffffffffffffffff16600160a01b026001600160e01b03199091166001600160a01b038716171781555b5050604051869250600091506001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a4505060fc805460010190555050565b60408051606081018252600080825260208201819052918101919091528180600111158015612bbb575060fb5481105b15612c9c57600081815260ff6020818152604092839020835160608101855290546001600160a01b038116825267ffffffffffffffff600160a01b82041692820192909252600160e01b909104909116151591810182905290612c9a5780516001600160a01b031615612c2f579392505050565b5060001901600081815260ff6020818152604092839020835160608101855290546001600160a01b03811680835267ffffffffffffffff600160a01b83041693830193909352600160e01b90049092161515928201929092529015612c95579392505050565b612c2f565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60fb546001600160a01b038516612d11576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83612d48576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612d5560008683876136fb565b6001600160a01b03851660008181526101006020908152604080832080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000811667ffffffffffffffff8083168c0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168c0181169092021790915585845260ff90925290912080546001600160e01b031916909217600160a01b429092169190910217905580808501838015612e1757506001600160a01b0387163b15155b15612ea0575b60405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4612e686000888480600101955088613004565b612e85576040516368d2bf6b60e11b815260040160405180910390fd5b80821415612e1d578260fb5414612e9b57600080fd5b612ee6565b5b6040516001830192906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a480821415612ea1575b5060fb555b5050505050565b600054610100900460ff16612f6f5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610cb7565b612f79828261381d565b612f81612f85565b610cca5b600054610100900460ff166130025760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610cb7565b565b6040517f150b7a020000000000000000000000000000000000000000000000000000000081526000906001600160a01b0385169063150b7a029061305290339089908890889060040161423d565b6020604051808303816000875af192505050801561308d575060408051601f3d908101601f1916820190925261308a91810190614279565b60015b6130e8573d8080156130bb576040519150601f19603f3d011682016040523d82523d6000602084013e6130c0565b606091505b5080516130e0576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b0319167f150b7a02000000000000000000000000000000000000000000000000000000001490505b949350505050565b610c078383836000613193565b60006001600160e01b031982167f7965db0b000000000000000000000000000000000000000000000000000000001480610a5657507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614610a56565b600061319e83612b8b565b9050846001600160a01b031681600001516001600160a01b0316146131ef576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81156132a9576000336001600160a01b0387161480613213575061321386336108d9565b8061322e57503361322385610aee565b6001600160a01b0316145b905080613267576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0385166132a7576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505b6132b685858560016136fb565b6132c260008487612585565b6001600160a01b03858116600090815261010060209081526040808320805467ffffffffffffffff1980821667ffffffffffffffff9283166000190183161790925589861680865283862080549384169383166001908101841694909417905589865260ff90945282852080546001600160e01b031916909417600160a01b429092169190910217835587018084529220805491939091166133995760fb548214613399578054602085015167ffffffffffffffff16600160a01b026001600160e01b03199091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612eeb565b606060006133f1836002614296565b6133fc9060026142b5565b67ffffffffffffffff81111561341457613414613c68565b6040519080825280601f01601f19166020018201604052801561343e576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106134755761347561412f565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106134d8576134d861412f565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000613514846002614296565b61351f9060016142b5565b90505b60018111156135bc577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106135605761356061412f565b1a60f81b8282815181106135765761357661412f565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c936135b5816142cd565b9050613522565b508315611f495760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610cb7565b6001600160a01b0381163b6136885760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e7472616374000000000000000000000000000000000000006064820152608401610cb7565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6136df836138cb565b6000825111806136ec5750805b15610c075761192f838361390b565b3360009081527fffdfc1249c027f9191656349feb0761381bb32c9f557e01f419fd08754bf5a1b602052604090205460ff166138185761373a84611f50565b15613771576040517f2a4591c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61377a83611f50565b156137b1576040517ff1d6b21800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b815b6137bd82846142b5565b811015613816576137cd81611fbc565b15613804576040517f72d273cf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8061380e81614188565b9150506137b3565b505b61192f565b600054610100900460ff1661389a5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610cb7565b81516138ad9060fd906020850190613a4f565b5080516138c19060fe906020840190613a4f565b50600160fb555050565b6138d48161360b565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b61398a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152608401610cb7565b600080846001600160a01b0316846040516139a591906142e4565b600060405180830381855af49150503d80600081146139e0576040519150601f19603f3d011682016040523d82523d6000602084013e6139e5565b606091505b5091509150613a0d828260405180606001604052806027815260200161433660279139613a16565b95945050505050565b60608315613a25575081611f49565b825115613a355782518084602001fd5b8160405162461bcd60e51b8152600401610cb79190613b73565b828054613a5b906140f4565b90600052602060002090601f016020900481019282613a7d5760008555613ac3565b82601f10613a9657805160ff1916838001178555613ac3565b82800160010185558215613ac3579182015b82811115613ac3578251825591602001919060010190613aa8565b50613acf929150613ad3565b5090565b5b80821115613acf5760008155600101613ad4565b6001600160e01b031981168114610e6957600080fd5b600060208284031215613b1057600080fd5b8135611f4981613ae8565b60005b83811015613b36578181015183820152602001613b1e565b8381111561192f5750506000910152565b60008151808452613b5f816020860160208601613b1b565b601f01601f19169290920160200192915050565b602081526000611f496020830184613b47565b600060208284031215613b9857600080fd5b5035919050565b80356001600160a01b0381168114613bb657600080fd5b919050565b60008060408385031215613bce57600080fd5b613bd783613b9f565b946020939093013593505050565b600080600060608486031215613bfa57600080fd5b613c0384613b9f565b9250613c1160208501613b9f565b9150604084013590509250925092565b60008060408385031215613c3457600080fd5b82359150613c4460208401613b9f565b90509250929050565b600060208284031215613c5f57600080fd5b611f4982613b9f565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715613ca757613ca7613c68565b604052919050565b600067ffffffffffffffff831115613cc957613cc9613c68565b613cdc6020601f19601f86011601613c7e565b9050828152838383011115613cf057600080fd5b828260208301376000602084830101529392505050565b600082601f830112613d1857600080fd5b611f4983833560208501613caf565b60008060408385031215613d3a57600080fd5b613d4383613b9f565b9150602083013567ffffffffffffffff811115613d5f57600080fd5b613d6b85828601613d07565b9150509250929050565b600060208284031215613d8757600080fd5b813567ffffffffffffffff811115613d9e57600080fd5b8201601f81018413613daf57600080fd5b61311784823560208401613caf565b60006020808385031215613dd157600080fd5b823567ffffffffffffffff80821115613de957600080fd5b818501915085601f830112613dfd57600080fd5b813581811115613e0f57613e0f613c68565b8060051b9150613e20848301613c7e565b8181529183018401918481019088841115613e3a57600080fd5b938501935b83851015613e5857843582529385019390850190613e3f565b98975050505050505050565b6020808252825182820181905260009190848201906040850190845b81811015611d5257613ebc83855180516001600160a01b0316825260208082015167ffffffffffffffff16908301526040908101511515910152565b9284019260609290920191600101613e80565b60008060208385031215613ee257600080fd5b823567ffffffffffffffff80821115613efa57600080fd5b818501915085601f830112613f0e57600080fd5b813581811115613f1d57600080fd5b8660208260051b8501011115613f3257600080fd5b60209290920196919550909350505050565b6020808252825182820181905260009190848201906040850190845b81811015611d525783516001600160a01b031683529284019291840191600101613f60565b6020808252825182820181905260009190848201906040850190845b81811015611d5257835183529284019291840191600101613fa1565b600080600060608486031215613fd257600080fd5b613fdb84613b9f565b95602085013595506040909401359392505050565b6000806040838503121561400357600080fd5b61400c83613b9f565b91506020830135801515811461402157600080fd5b809150509250929050565b6000806000806080858703121561404257600080fd5b61404b85613b9f565b935061405960208601613b9f565b925060408501359150606085013567ffffffffffffffff81111561407c57600080fd5b61408887828801613d07565b91505092959194509250565b81516001600160a01b0316815260208083015167ffffffffffffffff169082015260408083015115159082015260608101610a56565b600080604083850312156140dd57600080fd5b6140e683613b9f565b9150613c4460208401613b9f565b600181811c9082168061410857607f821691505b6020821081141561412957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008282101561416d5761416d614145565b500390565b634e487b7160e01b600052603160045260246000fd5b600060001982141561419c5761419c614145565b5060010190565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516141db816017850160208801613b1b565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351614218816028840160208801613b1b565b01602801949350505050565b60006020828403121561423657600080fd5b5051919050565b60006001600160a01b0380871683528086166020840152508360408301526080606083015261426f6080830184613b47565b9695505050505050565b60006020828403121561428b57600080fd5b8151611f4981613ae8565b60008160001904831182151516156142b0576142b0614145565b500290565b600082198211156142c8576142c8614145565b500190565b6000816142dc576142dc614145565b506000190190565b600082516142f6818460208701613b1b565b919091019291505056fe697066733a2f2f516d584565465a4851475931675964577a744b7266627456463263766a3543766d546d5456724e786874706d3770416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122063e3a290e9282f8043133287d1c091b0df4b75bb711cc08a30221fd77524f97a64736f6c634300080c0033
Deployed Bytecode
0x6080604052600436106103135760003560e01c80637ccd134a1161019a578063b88d4fde116100e1578063da72c1e81161008a578063f2fde38b11610064578063f2fde38b1461093c578063f72c0d8b1461095c578063fb72afd31461099057600080fd5b8063da72c1e81461089e578063e985e9c5146108be578063ec87621c1461090857600080fd5b8063d5391393116100bb578063d539139314610835578063d547741f14610869578063d807d4421461088957600080fd5b8063b88d4fde146107c8578063c23dc68f146107e8578063c87b56dd1461081557600080fd5b806399a2557a116101435780639ef5b8e51161011d5780639ef5b8e514610772578063a217fddf14610793578063a22cb465146107a857600080fd5b806399a2557a146107125780639a760fc6146107325780639c4f541a1461075257600080fd5b80638da5cb5b116101745780638da5cb5b1461069657806391d14854146106b757806395d89b41146106fd57600080fd5b80637ccd134a146106325780638129fc1c146106545780638462151c1461066957600080fd5b806342842e0e1161025e5780635a6eaa6e116102075780636c0360eb116101e15780636c0360eb146105dd57806370a08231146105f2578063729ad39e1461061257600080fd5b80635a6eaa6e146105705780635bbb2177146105905780636352211e146105bd57600080fd5b80634f1ef286116102385780634f1ef2861461052857806352d1902d1461053b57806355f804b31461055057600080fd5b806342842e0e146104c85780634294e544146104e857806342966c681461050857600080fd5b8063248a9ca3116102c05780633659cfe61161029a5780633659cfe61461048057806337cb2e09146104a05780633ccfd60b146104c057600080fd5b8063248a9ca3146104105780632f2ff15d1461044057806336568abe1461046057600080fd5b8063095ea7b3116102f1578063095ea7b3146103a757806318160ddd146103c957806323b872dd146103f057600080fd5b806301ffc9a71461031857806306fdde031461034d578063081812fc1461036f575b600080fd5b34801561032457600080fd5b50610338610333366004613afe565b6109b0565b60405190151581526020015b60405180910390f35b34801561035957600080fd5b50610362610a5c565b6040516103449190613b73565b34801561037b57600080fd5b5061038f61038a366004613b86565b610aee565b6040516001600160a01b039091168152602001610344565b3480156103b357600080fd5b506103c76103c2366004613bbb565b610b4c565b005b3480156103d557600080fd5b5060fc5460fb5403600019015b604051908152602001610344565b3480156103fc57600080fd5b506103c761040b366004613be5565b610c0c565b34801561041c57600080fd5b506103e261042b366004613b86565b60009081526065602052604090206001015490565b34801561044c57600080fd5b506103c761045b366004613c21565b610c17565b34801561046c57600080fd5b506103c761047b366004613c21565b610c3d565b34801561048c57600080fd5b506103c761049b366004613c4d565b610cce565b3480156104ac57600080fd5b506103c76104bb366004613c4d565b610e6c565b6103c7610f8c565b3480156104d457600080fd5b506103c76104e3366004613be5565b61101a565b3480156104f457600080fd5b506103c7610503366004613c4d565b611035565b34801561051457600080fd5b506103c7610523366004613b86565b611217565b6103c7610536366004613d27565b611267565b34801561054757600080fd5b506103e26113f2565b34801561055c57600080fd5b506103c761056b366004613d75565b6114b7565b34801561057c57600080fd5b506103c761058b366004613b86565b611556565b34801561059c57600080fd5b506105b06105ab366004613dbe565b6116d3565b6040516103449190613e64565b3480156105c957600080fd5b5061038f6105d8366004613b86565b61179a565b3480156105e957600080fd5b506103626117ac565b3480156105fe57600080fd5b506103e261060d366004613c4d565b61183b565b34801561061e57600080fd5b506103c761062d366004613ecf565b6118a4565b34801561063e57600080fd5b50610647611935565b6040516103449190613f44565b34801561066057600080fd5b506103c7611997565b34801561067557600080fd5b50610689610684366004613c4d565b611c14565b6040516103449190613f85565b3480156106a257600080fd5b506101065461038f906001600160a01b031681565b3480156106c357600080fd5b506103386106d2366004613c21565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561070957600080fd5b50610362611d5e565b34801561071e57600080fd5b5061068961072d366004613fbd565b611d6d565b34801561073e57600080fd5b5061033861074d366004613c4d565b611f50565b34801561075e57600080fd5b5061033861076d366004613b86565b611fbc565b34801561077e57600080fd5b506101075461038f906001600160a01b031681565b34801561079f57600080fd5b506103e2600081565b3480156107b457600080fd5b506103c76107c3366004613ff0565b61200c565b3480156107d457600080fd5b506103c76107e336600461402c565b6120bc565b3480156107f457600080fd5b50610808610803366004613b86565b612107565b6040516103449190614094565b34801561082157600080fd5b50610362610830366004613b86565b6121c2565b34801561084157600080fd5b506103e27f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b34801561087557600080fd5b506103c7610884366004613c21565b6122c1565b34801561089557600080fd5b506106896122e7565b3480156108aa57600080fd5b506103c76108b9366004613be5565b61233f565b3480156108ca57600080fd5b506103386108d93660046140ca565b6001600160a01b0391821660009081526101026020908152604080832093909416825291909152205460ff1690565b34801561091457600080fd5b506103e27f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b0881565b34801561094857600080fd5b506103c7610957366004613c4d565b6123a9565b34801561096857600080fd5b506103e27f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b34801561099c57600080fd5b506103c76109ab366004613b86565b6123e6565b60006001600160e01b031982167f80ac58cd000000000000000000000000000000000000000000000000000000001480610a1357506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610a4757506001600160e01b031982167fda8def7300000000000000000000000000000000000000000000000000000000145b80610a565750610a56826124d9565b92915050565b606060fd8054610a6b906140f4565b80601f0160208091040260200160405190810160405280929190818152602001828054610a97906140f4565b8015610ae45780601f10610ab957610100808354040283529160200191610ae4565b820191906000526020600020905b815481529060010190602001808311610ac757829003601f168201915b5050505050905090565b6000610af98261254b565b610b2f576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50600090815261010160205260409020546001600160a01b031690565b6000610b578261179a565b9050806001600160a01b0316836001600160a01b03161415610ba5576040517f943f7b8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336001600160a01b03821614801590610bc55750610bc381336108d9565b155b15610bfc576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610c07838383612585565b505050565b610c078383836125ef565b600082815260656020526040902060010154610c3381336125fc565b610c07838361267c565b6001600160a01b0381163314610cc05760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b610cca828261271e565b5050565b306001600160a01b037f000000000000000000000000f473e0d06ddffeb5dd570520c1a0edf4d5955452161415610d6d5760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f64656c656761746563616c6c00000000000000000000000000000000000000006064820152608401610cb7565b7f000000000000000000000000f473e0d06ddffeb5dd570520c1a0edf4d59554526001600160a01b0316610dc87f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b031614610e445760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f6163746976652070726f787900000000000000000000000000000000000000006064820152608401610cb7565b610e4d816127a1565b60408051600080825260208201909252610e69918391906127cc565b50565b3360009081527fcee91eb23e767f0f440dd9fce5554f355614443931e9ac5ce78c67b9e06e6f70602052604090205460ff16158015610eda57503360009081527fffdfc1249c027f9191656349feb0761381bb32c9f557e01f419fd08754bf5a1b602052604090205460ff16155b15610ef7576040516282b42960e81b815260040160405180910390fd5b61010480546001810182556000919091527f4c0be60200faa20559308cb7b5a1bb3255c16cb1cab91f525b5ae7a03d02fabe01805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03831690811790915560405190815233907ff34c09a7cee2ec36676b00d8197a8db8ba2c6e091727126e27c8e3c34747f1a3906020015b60405180910390a250565b6000610f9881336125fc565b604051600090339047908381818185875af1925050503d8060008114610fda576040519150601f19603f3d011682016040523d82523d6000602084013e610fdf565b606091505b5050905080610cca576040517f2684a07900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610c07838383604051806020016040528060008152506120bc565b3360009081527fcee91eb23e767f0f440dd9fce5554f355614443931e9ac5ce78c67b9e06e6f70602052604090205460ff161580156110a357503360009081527fffdfc1249c027f9191656349feb0761381bb32c9f557e01f419fd08754bf5a1b602052604090205460ff16155b156110c0576040516282b42960e81b815260040160405180910390fd5b60005b610104548110156111db57816001600160a01b031661010482815481106110ec576110ec61412f565b6000918252602090912001546001600160a01b031614156111c95761010480546111189060019061415b565b815481106111285761112861412f565b60009182526020909120015461010480546001600160a01b0390921691839081106111555761115561412f565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555061010480548061119557611195614172565b6000828152602090208101600019908101805473ffffffffffffffffffffffffffffffffffffffff191690550190556111db565b806111d381614188565b9150506110c3565b506040516001600160a01b038216815233907fcc229432447e3f287b17d54ea5b3efb13d26e022102362f4d8eba4ac37fb8c7690602001610f81565b600061122381336125fc565b61122e82600061296c565b60405182815233907febf58b3208042e45d5e059eaa32ca2cde0bb4d975dc4a3744c96122254ea79559060200160405180910390a25050565b306001600160a01b037f000000000000000000000000f473e0d06ddffeb5dd570520c1a0edf4d59554521614156113065760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f64656c656761746563616c6c00000000000000000000000000000000000000006064820152608401610cb7565b7f000000000000000000000000f473e0d06ddffeb5dd570520c1a0edf4d59554526001600160a01b03166113617f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b0316146113dd5760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f6163746976652070726f787900000000000000000000000000000000000000006064820152608401610cb7565b6113e6826127a1565b610cca828260016127cc565b6000306001600160a01b037f000000000000000000000000f473e0d06ddffeb5dd570520c1a0edf4d595545216146114925760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401610cb7565b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90565b3360009081527fcee91eb23e767f0f440dd9fce5554f355614443931e9ac5ce78c67b9e06e6f70602052604090205460ff1615801561152557503360009081527fffdfc1249c027f9191656349feb0761381bb32c9f557e01f419fd08754bf5a1b602052604090205460ff16155b15611542576040516282b42960e81b815260040160405180910390fd5b8051610cca90610105906020840190613a4f565b3360009081527fcee91eb23e767f0f440dd9fce5554f355614443931e9ac5ce78c67b9e06e6f70602052604090205460ff161580156115c457503360009081527fffdfc1249c027f9191656349feb0761381bb32c9f557e01f419fd08754bf5a1b602052604090205460ff16155b156115e1576040516282b42960e81b815260040160405180910390fd5b60005b610103548110156116a0578161010382815481106116045761160461412f565b9060005260206000200154141561168e5761010380546116269060019061415b565b815481106116365761163661412f565b906000526020600020015461010382815481106116555761165561412f565b60009182526020909120015561010380548061167357611673614172565b600190038181906000526020600020016000905590556116a0565b8061169881614188565b9150506115e4565b5060405181815233907fb70d5efd04a6c6286cb9d839961d27cf9c5046d5df12b1e553dd77b5c30f0ac190602001610f81565b805160609060008167ffffffffffffffff8111156116f3576116f3613c68565b60405190808252806020026020018201604052801561173e57816020015b60408051606081018252600080825260208083018290529282015282526000199092019101816117115790505b50905060005b8281146117925761176d8582815181106117605761176061412f565b6020026020010151612107565b82828151811061177f5761177f61412f565b6020908102919091010152600101611744565b509392505050565b60006117a582612b8b565b5192915050565b61010580546117ba906140f4565b80601f01602080910402602001604051908101604052809291908181526020018280546117e6906140f4565b80156118335780601f1061180857610100808354040283529160200191611833565b820191906000526020600020905b81548152906001019060200180831161181657829003601f168201915b505050505081565b60006001600160a01b03821661187d576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b03166000908152610100602052604090205467ffffffffffffffff1690565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a66118cf81336125fc565b60005b8281101561192f5761191d8484838181106118ef576118ef61412f565b90506020020160208101906119049190613c4d565b6001604051806020016040528060008152506000612cce565b8061192781614188565b9150506118d2565b50505050565b6060610104805480602002602001604051908101604052809291908181526020018280548015610ae457602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611970575050505050905090565b600054610100900460ff166119b25760005460ff16156119b6565b303b155b611a285760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610cb7565b600054610100900460ff16158015611a6757600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000166101011790555b611adb6040518060400160405280600781526020017f534e49464d5050000000000000000000000000000000000000000000000000008152506040518060400160405280600781526020017f534e49464d505000000000000000000000000000000000000000000000000000815250612ef2565b611ae3612f85565b611b026000731980c5a48909811200977d41c1e28a4ba32537f661267c565b611b0d60003361267c565b611b377f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e33361267c565b611b617f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a63361267c565b610107805473ffffffffffffffffffffffffffffffffffffffff1916731d0ec4a86ac39fef4485169b4d14dc39d0ea64cd1790556040805160608101909152603580825261430160208301398051611bc29161010591602090910190613a4f565b50610106805473ffffffffffffffffffffffffffffffffffffffff1916331790558015610e6957600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b60606000806000611c248561183b565b905060008167ffffffffffffffff811115611c4157611c41613c68565b604051908082528060200260200182016040528015611c6a578160200160208202803683370190505b50604080516060810182526000808252602082018190529181019190915290915060015b838614611d5257600081815260ff6020818152604092839020835160608101855290546001600160a01b038116825267ffffffffffffffff600160a01b82041692820192909252600160e01b909104909116158015928201929092529250611cf557611d4a565b81516001600160a01b031615611d0a57815194505b876001600160a01b0316856001600160a01b03161415611d4a5780838780600101985081518110611d3d57611d3d61412f565b6020026020010181815250505b600101611c8e565b50909695505050505050565b606060fe8054610a6b906140f4565b6060818310611da8576040517f32c1995a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60fb546000906001851015611dbc57600194505b80841115611dc8578093505b6000611dd38761183b565b905084861015611df25785850381811015611dec578091505b50611df6565b5060005b60008167ffffffffffffffff811115611e1157611e11613c68565b604051908082528060200260200182016040528015611e3a578160200160208202803683370190505b50905081611e4d579350611f4992505050565b6000611e5888612107565b905060008160400151611e69575080515b885b888114158015611e7b5750848714155b15611f3d57600081815260ff6020818152604092839020835160608101855290546001600160a01b038116825267ffffffffffffffff600160a01b82041692820192909252600160e01b909104909116158015928201929092529350611ee057611f35565b82516001600160a01b031615611ef557825191505b8a6001600160a01b0316826001600160a01b03161415611f355780848880600101995081518110611f2857611f2861412f565b6020026020010181815250505b600101611e6b565b50505092835250909150505b9392505050565b6000805b61010454811015611fb357826001600160a01b03166101048281548110611f7d57611f7d61412f565b6000918252602090912001546001600160a01b03161415611fa15750600192915050565b80611fab81614188565b915050611f54565b50600092915050565b6000805b61010354811015611fb357826101038281548110611fe057611fe061412f565b90600052602060002001541415611ffa5750600192915050565b8061200481614188565b915050611fc0565b6001600160a01b03821633141561204f576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000818152610102602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6120c78484846125ef565b6001600160a01b0383163b151580156120e957506120e784848484613004565b155b1561192f576040516368d2bf6b60e11b815260040160405180910390fd5b6040805160608082018352600080835260208084018290528385018290528451928301855281835282018190529281019290925290600183108061214d575060fb548310155b156121585792915050565b50600082815260ff6020818152604092839020835160608101855290546001600160a01b038116825267ffffffffffffffff600160a01b82041692820192909252600160e01b90910490911615801592820192909252906121b95792915050565b611f4983612b8b565b60606121cd8261254b565b612203576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006101058054612213906140f4565b90501161222f5760405180602001604052806000815250610a56565b610105805461223d906140f4565b80601f0160208091040260200160405190810160405280929190818152602001828054612269906140f4565b80156122b65780601f1061228b576101008083540402835291602001916122b6565b820191906000526020600020905b81548152906001019060200180831161229957829003601f168201915b505050505092915050565b6000828152606560205260409020600101546122dd81336125fc565b610c07838361271e565b6060610103805480602002602001604051908101604052809291908181526020018280548015610ae457602002820191906000526020600020905b815481526020019060010190808311612322575050505050905090565b600061234b81336125fc565b61235684848461311f565b604080516001600160a01b0386811682528516602082015290810183905233907f360bb0808951709e17b8c0ff5cf74aa15579508d1227398aac32794efdfe75ea9060600160405180910390a250505050565b60006123b581336125fc565b50610106805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b3360009081527fcee91eb23e767f0f440dd9fce5554f355614443931e9ac5ce78c67b9e06e6f70602052604090205460ff1615801561245457503360009081527fffdfc1249c027f9191656349feb0761381bb32c9f557e01f419fd08754bf5a1b602052604090205460ff16155b15612471576040516282b42960e81b815260040160405180910390fd5b61010380546001810182556000919091527f02c297ab74aad0aede3a1895c857b1f2c71e6a203feb727bec95ac752998cb780181905560405181815233907f6aa6f2d5815f452776524be118aee25ce1b225322a65ffa23a005ba32334a78f90602001610f81565b60006001600160e01b031982167f80ac58cd00000000000000000000000000000000000000000000000000000000148061253c57506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610a565750610a568261312c565b60008160011115801561255f575060fb5482105b8015610a56575050600090815260ff6020819052604090912054600160e01b9004161590565b60008281526101016020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b610c078383836001613193565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610cca5761263a816001600160a01b031660146133e2565b6126458360206133e2565b6040516020016126569291906141a3565b60408051601f198184030181529082905262461bcd60e51b8252610cb791600401613b73565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16610cca5760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556126da3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff1615610cca5760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3610cca81336125fc565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff16156127ff57610c078361360b565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015612859575060408051601f3d908101601f1916820190925261285691810190614224565b60015b6128cb5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201527f6f6e206973206e6f7420555550530000000000000000000000000000000000006064820152608401610cb7565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc81146129605760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f7860448201527f6961626c655555494400000000000000000000000000000000000000000000006064820152608401610cb7565b50610c078383836136d6565b600061297783612b8b565b805190915082156129f6576000336001600160a01b03831614806129a057506129a082336108d9565b806129bb5750336129b086610aee565b6001600160a01b0316145b9050806129f4576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505b612a048160008660016136fb565b612a1060008583612585565b6001600160a01b03808216600081815261010060209081526040808320805470010000000000000000000000000000000060001967ffffffffffffffff80841691909101811667ffffffffffffffff19841681178390048216600190810183169093027fffffffffffffffff0000000000000000ffffffffffffffff0000000000000000909416179290921783558b865260ff90945282852080547fffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffff42909316600160a01b026001600160e01b03199091169097179690961716600160e01b178555918901808452922080549194909116612b405760fb548214612b40578054602087015167ffffffffffffffff16600160a01b026001600160e01b03199091166001600160a01b038716171781555b5050604051869250600091506001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a4505060fc805460010190555050565b60408051606081018252600080825260208201819052918101919091528180600111158015612bbb575060fb5481105b15612c9c57600081815260ff6020818152604092839020835160608101855290546001600160a01b038116825267ffffffffffffffff600160a01b82041692820192909252600160e01b909104909116151591810182905290612c9a5780516001600160a01b031615612c2f579392505050565b5060001901600081815260ff6020818152604092839020835160608101855290546001600160a01b03811680835267ffffffffffffffff600160a01b83041693830193909352600160e01b90049092161515928201929092529015612c95579392505050565b612c2f565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60fb546001600160a01b038516612d11576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83612d48576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612d5560008683876136fb565b6001600160a01b03851660008181526101006020908152604080832080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000811667ffffffffffffffff8083168c0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168c0181169092021790915585845260ff90925290912080546001600160e01b031916909217600160a01b429092169190910217905580808501838015612e1757506001600160a01b0387163b15155b15612ea0575b60405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4612e686000888480600101955088613004565b612e85576040516368d2bf6b60e11b815260040160405180910390fd5b80821415612e1d578260fb5414612e9b57600080fd5b612ee6565b5b6040516001830192906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a480821415612ea1575b5060fb555b5050505050565b600054610100900460ff16612f6f5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610cb7565b612f79828261381d565b612f81612f85565b610cca5b600054610100900460ff166130025760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610cb7565b565b6040517f150b7a020000000000000000000000000000000000000000000000000000000081526000906001600160a01b0385169063150b7a029061305290339089908890889060040161423d565b6020604051808303816000875af192505050801561308d575060408051601f3d908101601f1916820190925261308a91810190614279565b60015b6130e8573d8080156130bb576040519150601f19603f3d011682016040523d82523d6000602084013e6130c0565b606091505b5080516130e0576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b0319167f150b7a02000000000000000000000000000000000000000000000000000000001490505b949350505050565b610c078383836000613193565b60006001600160e01b031982167f7965db0b000000000000000000000000000000000000000000000000000000001480610a5657507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614610a56565b600061319e83612b8b565b9050846001600160a01b031681600001516001600160a01b0316146131ef576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81156132a9576000336001600160a01b0387161480613213575061321386336108d9565b8061322e57503361322385610aee565b6001600160a01b0316145b905080613267576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0385166132a7576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505b6132b685858560016136fb565b6132c260008487612585565b6001600160a01b03858116600090815261010060209081526040808320805467ffffffffffffffff1980821667ffffffffffffffff9283166000190183161790925589861680865283862080549384169383166001908101841694909417905589865260ff90945282852080546001600160e01b031916909417600160a01b429092169190910217835587018084529220805491939091166133995760fb548214613399578054602085015167ffffffffffffffff16600160a01b026001600160e01b03199091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612eeb565b606060006133f1836002614296565b6133fc9060026142b5565b67ffffffffffffffff81111561341457613414613c68565b6040519080825280601f01601f19166020018201604052801561343e576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106134755761347561412f565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106134d8576134d861412f565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000613514846002614296565b61351f9060016142b5565b90505b60018111156135bc577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106135605761356061412f565b1a60f81b8282815181106135765761357661412f565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c936135b5816142cd565b9050613522565b508315611f495760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610cb7565b6001600160a01b0381163b6136885760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e7472616374000000000000000000000000000000000000006064820152608401610cb7565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6136df836138cb565b6000825111806136ec5750805b15610c075761192f838361390b565b3360009081527fffdfc1249c027f9191656349feb0761381bb32c9f557e01f419fd08754bf5a1b602052604090205460ff166138185761373a84611f50565b15613771576040517f2a4591c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61377a83611f50565b156137b1576040517ff1d6b21800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b815b6137bd82846142b5565b811015613816576137cd81611fbc565b15613804576040517f72d273cf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8061380e81614188565b9150506137b3565b505b61192f565b600054610100900460ff1661389a5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610cb7565b81516138ad9060fd906020850190613a4f565b5080516138c19060fe906020840190613a4f565b50600160fb555050565b6138d48161360b565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b61398a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152608401610cb7565b600080846001600160a01b0316846040516139a591906142e4565b600060405180830381855af49150503d80600081146139e0576040519150601f19603f3d011682016040523d82523d6000602084013e6139e5565b606091505b5091509150613a0d828260405180606001604052806027815260200161433660279139613a16565b95945050505050565b60608315613a25575081611f49565b825115613a355782518084602001fd5b8160405162461bcd60e51b8152600401610cb79190613b73565b828054613a5b906140f4565b90600052602060002090601f016020900481019282613a7d5760008555613ac3565b82601f10613a9657805160ff1916838001178555613ac3565b82800160010185558215613ac3579182015b82811115613ac3578251825591602001919060010190613aa8565b50613acf929150613ad3565b5090565b5b80821115613acf5760008155600101613ad4565b6001600160e01b031981168114610e6957600080fd5b600060208284031215613b1057600080fd5b8135611f4981613ae8565b60005b83811015613b36578181015183820152602001613b1e565b8381111561192f5750506000910152565b60008151808452613b5f816020860160208601613b1b565b601f01601f19169290920160200192915050565b602081526000611f496020830184613b47565b600060208284031215613b9857600080fd5b5035919050565b80356001600160a01b0381168114613bb657600080fd5b919050565b60008060408385031215613bce57600080fd5b613bd783613b9f565b946020939093013593505050565b600080600060608486031215613bfa57600080fd5b613c0384613b9f565b9250613c1160208501613b9f565b9150604084013590509250925092565b60008060408385031215613c3457600080fd5b82359150613c4460208401613b9f565b90509250929050565b600060208284031215613c5f57600080fd5b611f4982613b9f565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715613ca757613ca7613c68565b604052919050565b600067ffffffffffffffff831115613cc957613cc9613c68565b613cdc6020601f19601f86011601613c7e565b9050828152838383011115613cf057600080fd5b828260208301376000602084830101529392505050565b600082601f830112613d1857600080fd5b611f4983833560208501613caf565b60008060408385031215613d3a57600080fd5b613d4383613b9f565b9150602083013567ffffffffffffffff811115613d5f57600080fd5b613d6b85828601613d07565b9150509250929050565b600060208284031215613d8757600080fd5b813567ffffffffffffffff811115613d9e57600080fd5b8201601f81018413613daf57600080fd5b61311784823560208401613caf565b60006020808385031215613dd157600080fd5b823567ffffffffffffffff80821115613de957600080fd5b818501915085601f830112613dfd57600080fd5b813581811115613e0f57613e0f613c68565b8060051b9150613e20848301613c7e565b8181529183018401918481019088841115613e3a57600080fd5b938501935b83851015613e5857843582529385019390850190613e3f565b98975050505050505050565b6020808252825182820181905260009190848201906040850190845b81811015611d5257613ebc83855180516001600160a01b0316825260208082015167ffffffffffffffff16908301526040908101511515910152565b9284019260609290920191600101613e80565b60008060208385031215613ee257600080fd5b823567ffffffffffffffff80821115613efa57600080fd5b818501915085601f830112613f0e57600080fd5b813581811115613f1d57600080fd5b8660208260051b8501011115613f3257600080fd5b60209290920196919550909350505050565b6020808252825182820181905260009190848201906040850190845b81811015611d525783516001600160a01b031683529284019291840191600101613f60565b6020808252825182820181905260009190848201906040850190845b81811015611d5257835183529284019291840191600101613fa1565b600080600060608486031215613fd257600080fd5b613fdb84613b9f565b95602085013595506040909401359392505050565b6000806040838503121561400357600080fd5b61400c83613b9f565b91506020830135801515811461402157600080fd5b809150509250929050565b6000806000806080858703121561404257600080fd5b61404b85613b9f565b935061405960208601613b9f565b925060408501359150606085013567ffffffffffffffff81111561407c57600080fd5b61408887828801613d07565b91505092959194509250565b81516001600160a01b0316815260208083015167ffffffffffffffff169082015260408083015115159082015260608101610a56565b600080604083850312156140dd57600080fd5b6140e683613b9f565b9150613c4460208401613b9f565b600181811c9082168061410857607f821691505b6020821081141561412957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008282101561416d5761416d614145565b500390565b634e487b7160e01b600052603160045260246000fd5b600060001982141561419c5761419c614145565b5060010190565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516141db816017850160208801613b1b565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351614218816028840160208801613b1b565b01602801949350505050565b60006020828403121561423657600080fd5b5051919050565b60006001600160a01b0380871683528086166020840152508360408301526080606083015261426f6080830184613b47565b9695505050505050565b60006020828403121561428b57600080fd5b8151611f4981613ae8565b60008160001904831182151516156142b0576142b0614145565b500290565b600082198211156142c8576142c8614145565b500190565b6000816142dc576142dc614145565b506000190190565b600082516142f6818460208701613b1b565b919091019291505056fe697066733a2f2f516d584565465a4851475931675964577a744b7266627456463263766a3543766d546d5456724e786874706d3770416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122063e3a290e9282f8043133287d1c091b0df4b75bb711cc08a30221fd77524f97a64736f6c634300080c0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 35 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.