Feature Tip: Add private address tag to any address under My Name Tag !
ERC-721
Overview
Max Total Supply
2,730 CSK
Holders
869
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
5 CSKLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
CSKNFT
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: CODESEKAI pragma solidity =0.8.19; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; contract CSKNFT is ERC721, EIP712, ERC721Enumerable, ERC721Burnable, AccessControl, Ownable, ReentrancyGuard { using Counters for Counters.Counter; /// @dev Base token URI used as a prefix by tokenURI(). string public baseTokenURI; address payable public adminWallet; address public signWallet; address public cskGen; string public constant SIGNING_DOMAIN = "CODESEKAI"; string public constant SIGNATURE_VERSION = "1"; bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant TIMELOCK_DEV_ROLE = keccak256("TIMELOCK_DEV_ROLE"); address public timelockAddress; Counters.Counter private tokenIdCounter; constructor( string memory _baseTokenUri, address payable _adminWallet, address payable _signWallet, address _timelockAddress ) ERC721("CodeSekaiNFT", "CSK") EIP712(SIGNING_DOMAIN, SIGNATURE_VERSION) { require(_timelockAddress != address(0), "Invalid Timelock address"); require(_signWallet != address(0), "Invalid signWallet address"); require(_adminWallet != address(0), "Invalid adminWallet address"); _grantRole(DEFAULT_ADMIN_ROLE, msg.sender); _grantRole(TIMELOCK_DEV_ROLE, _timelockAddress); baseTokenURI = _baseTokenUri; adminWallet = _adminWallet; signWallet = _signWallet; timelockAddress = _timelockAddress; } uint256 public constant TOTAL_SUPPLY = 5_555; uint256 public PORTAL_PRICE = 0.0015 ether; uint256 public constant MAX_PORTAL_PRICE = 0.0015 ether; enum MintType { Whitelist, Waitlist, Mint } struct MintDates { uint256 START_WHITELIST; uint256 END_WHITELIST; uint256 START_WAITLIST; uint256 END_WAITLIST; uint256 MINT_START_DATE; uint256 MINT_END_DATE; } struct SignInfo { uint256 tokenId; string metadata; bool status; uint256 nonce; uint256 expirationTime; bytes signature; } struct UserAsset { uint256 tokenId; bool isAvailable; string metadata; } MintDates public mintDates; mapping(address => uint256) public updateTokenNonces; mapping(uint256 => UserAsset) public tokenInfo; event MintNft( address indexed userAddress, uint256 indexed tokenId, uint256 createdAt, string metadata, MintType indexed _mintType ); event ChangeItemStatus(address indexed userAddress, SignInfo); event SetCSKGen(address indexed prevCSKGen, address indexed newCSKGen); event ChangeSignWallet( address indexed prevSignWallet, address indexed newSignWallet, address indexed executor ); event SetBaseURI(string indexed prevBaseURI, string indexed baseURI); event SetAdminWallet( address indexed preAdminWallet, address indexed adminWallet ); event SetPortalPrice( uint256 indexed prePortalPrice, uint256 indexed portalPrice ); event SetPeriods( uint256 startWhitelistTime, uint256 endWhitelistTime, uint256 startWaitlistTime, uint256 endWaitlistTime, uint256 startMintTime, uint256 endMintTime, address indexed executer ); event SetTimelock( address indexed prevTimelockAddress, address indexed newTimeLockAddress ); function safeTransferFrom( address from, address to, uint256 tokenId ) public override(ERC721, IERC721) { require(checkFlagStatus(tokenId), "not available"); super.safeTransferFrom(from, to, tokenId); } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public override(ERC721, IERC721) { require(checkFlagStatus(tokenId), "not available"); super.safeTransferFrom(from, to, tokenId, data); } function transferFrom( address from, address to, uint256 tokenId ) public override(ERC721, IERC721) { require(checkFlagStatus(tokenId), "not available"); super.transferFrom(from, to, tokenId); } function _baseURI() internal view virtual override returns (string memory) { return baseTokenURI; } function setBaseURI( string memory _baseTokenURI ) public onlyRole(TIMELOCK_DEV_ROLE) { require(bytes(_baseTokenURI).length != 0, "Invalid _baseTokenURI"); string memory prevBaseURI = baseTokenURI; baseTokenURI = _baseTokenURI; emit SetBaseURI(prevBaseURI, baseTokenURI); } function getCurrentTokenId() public view returns (uint256) { return tokenIdCounter.current(); } function checkFlagStatus(uint256 tokenId) public view returns (bool) { _requireMinted(tokenId); return tokenInfo[tokenId].isAvailable; } function checkMetadata( uint256 tokenId ) public view returns (string memory) { _requireMinted(tokenId); return tokenInfo[tokenId].metadata; } function _hash(SignInfo memory info) internal view returns (bytes32) { return _hashTypedDataV4( keccak256( abi.encode( keccak256( "SignInfo(uint256 tokenId,string metadata,bool status,uint256 nonce,uint256 expirationTime)" ), info.tokenId, keccak256(bytes(info.metadata)), info.status, info.nonce, info.expirationTime ) ) ); } function _verify(SignInfo memory info) internal view returns (address) { bytes32 digest = _hash(info); return ECDSA.recover(digest, info.signature); } function getUserTokenAndInfos( address userAddress, uint256 cursor, uint256 resultsPerPage ) public view returns (UserAsset[] memory userAssets, uint256 newCursor) { uint256 balances = balanceOf(userAddress); require(cursor <= balances, "cursor is out of range"); require(resultsPerPage > 0, "resultsPerPage cannot be 0"); uint256 length = resultsPerPage; if (length > balances - cursor) { length = balances - cursor; } userAssets = new UserAsset[](length); for (uint256 i = 0; i < length; i++) { uint256 tokenId = tokenOfOwnerByIndex(userAddress, cursor + i); string memory metadata = tokenInfo[tokenId].metadata; bool status = checkFlagStatus(tokenId); userAssets[i].tokenId = tokenId; userAssets[i].isAvailable = status; userAssets[i].metadata = metadata; } return (userAssets, cursor + length); } function setPeriods( uint256 startWhitelistTime, uint256 endWhitelistTime, uint256 startWaitlistTime, uint256 endWaitlistTime, uint256 startMintTime, uint256 endMintTime ) public onlyRole(TIMELOCK_DEV_ROLE) { require( endWhitelistTime > startWhitelistTime, "invalid whitelist time" ); require(endWaitlistTime > startWaitlistTime, "invalid waitlist time"); require(endMintTime > startMintTime, "invalid mint time"); require( (endWhitelistTime < startWaitlistTime) && (endWaitlistTime < startMintTime), "invalid periods" ); mintDates.START_WHITELIST = startWhitelistTime; mintDates.END_WHITELIST = endWhitelistTime; mintDates.START_WAITLIST = startWaitlistTime; mintDates.END_WAITLIST = endWaitlistTime; mintDates.MINT_START_DATE = startMintTime; mintDates.MINT_END_DATE = endMintTime; emit SetPeriods( startWhitelistTime, endWhitelistTime, startWaitlistTime, endWaitlistTime, startMintTime, endMintTime, _msgSender() ); } function delMint(address _userAddr, string memory metadata) internal { uint256 currentSupply = totalSupply(); require(currentSupply < TOTAL_SUPPLY, "Max supply"); //start tokenId at 1 tokenIdCounter.increment(); uint256 tokenId = tokenIdCounter.current(); tokenInfo[tokenId] = UserAsset(tokenId, true, metadata); _safeMint(_userAddr, tokenId); } function mint( address _userAddr, string calldata metadata, MintType _mintType ) external { require(cskGen == _msgSender(), "permission denied"); if (_mintType == MintType.Mint) { require( block.timestamp >= mintDates.MINT_START_DATE, "not started." ); require(block.timestamp <= mintDates.MINT_END_DATE, "ended."); } else if (_mintType == MintType.Whitelist) { require( block.timestamp >= mintDates.START_WHITELIST, "Wl not started." ); require(block.timestamp <= mintDates.END_WHITELIST, "Wl ended."); } else if (_mintType == MintType.Waitlist) { require( block.timestamp >= mintDates.START_WAITLIST, "Waitlist not started." ); require( block.timestamp <= mintDates.END_WAITLIST, "Waitlist ended." ); } delMint(_userAddr, metadata); emit MintNft( _userAddr, tokenIdCounter.current(), block.timestamp, metadata, _mintType ); } function setAdminWallet( address _adminWallet ) public onlyRole(DEFAULT_ADMIN_ROLE) { require(_adminWallet != address(0), "Invalid adminWallet"); address prevAdminWallet = adminWallet; adminWallet = payable(_adminWallet); emit SetAdminWallet(prevAdminWallet, _adminWallet); } function setPortalPrice( uint256 newPrice ) public onlyRole(TIMELOCK_DEV_ROLE) { require(newPrice <= MAX_PORTAL_PRICE, "invalid portal price"); uint256 prevPortalPrice = PORTAL_PRICE; PORTAL_PRICE = newPrice; emit SetPortalPrice(prevPortalPrice, newPrice); } function setCSKGen(address newCSKGen) public onlyRole(TIMELOCK_DEV_ROLE) { require(newCSKGen != address(0), "Invalid address"); address prevCSKGen = cskGen; cskGen = newCSKGen; emit SetCSKGen(prevCSKGen, newCSKGen); } function updateFlagStatus( SignInfo calldata _info ) external payable nonReentrant { require(ownerOf(_info.tokenId) == msg.sender, "Not Owner."); require( tokenInfo[_info.tokenId].isAvailable != _info.status, "Same status." ); require(block.timestamp < _info.expirationTime, "Times out"); //verify address signer = _verify(_info); require(signer == signWallet, "not signed"); require( _info.nonce == updateTokenNonces[msg.sender]++, "Invalid nonce" ); if (_info.status) { require(msg.value == PORTAL_PRICE, "Invalid Amount"); tokenInfo[_info.tokenId].metadata = _info.metadata; (bool sent, ) = adminWallet.call{value: msg.value}(""); require(sent, "Failed send"); } tokenInfo[_info.tokenId].isAvailable = _info.status; emit ChangeItemStatus(msg.sender, _info); } function _beforeTokenTransfer( address from, address to, uint256 tokenId, uint256 batchSize ) internal override(ERC721, ERC721Enumerable) { super._beforeTokenTransfer(from, to, tokenId, batchSize); } function supportsInterface( bytes4 interfaceId ) public view override(ERC721, AccessControl, ERC721Enumerable) returns (bool) { return super.supportsInterface(interfaceId); } function burn(uint256 tokenId) public override { require(checkFlagStatus(tokenId), "not available"); delete tokenInfo[tokenId]; super.burn(tokenId); } function setSignWallet( address _signWallet ) public onlyRole(TIMELOCK_DEV_ROLE) { require(_signWallet != address(0), "Invalid address"); address prevSignWallet = signWallet; signWallet = _signWallet; emit ChangeSignWallet(prevSignWallet, signWallet, msg.sender); } function setTimelock( address newTimelockAddress ) external onlyRole(TIMELOCK_DEV_ROLE) { require( newTimelockAddress != address(0), "Invalid newTimelockAddress address" ); address prevTimelockAddress = timelockAddress; timelockAddress = newTimelockAddress; _revokeRole(TIMELOCK_DEV_ROLE, prevTimelockAddress); _grantRole(TIMELOCK_DEV_ROLE, newTimelockAddress); emit SetTimelock(prevTimelockAddress, newTimelockAddress); } function grantRole( bytes32 role, address account ) public virtual override(AccessControl) onlyRole(TIMELOCK_DEV_ROLE) { _grantRole(role, account); } function renounceRole( bytes32 role, address account ) public virtual override(AccessControl) { require( !(hasRole(DEFAULT_ADMIN_ROLE, account)), "AccessControl: cannot renounce the DEFAULT_ADMIN_ROLE account" ); super.renounceRole(role, account); } function revokeRole( bytes32 role, address account ) public virtual override(AccessControl) onlyRole(TIMELOCK_DEV_ROLE) { _revokeRole(role, account); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ```solidity * 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}: * * ```solidity * 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. We recommend using {AccessControlDefaultAdminRules} * to enforce additional security measures for this role. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `_msgSender()` is missing `role`. * Overriding this function changes the behavior of the {onlyRole} modifier. * * Format of the revert message is described in {_checkRole}. * * _Available since v4.6._ */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(account), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * May emit a {RoleGranted} event. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC5267.sol) pragma solidity ^0.8.0; interface IERC5267 { /** * @dev MAY be emitted to signal that the domain could have changed. */ event EIP712DomainChanged(); /** * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712 * signature. */ function eip712Domain() external view returns ( bytes1 fields, string memory name, string memory version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] memory extensions ); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == _ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: address zero is not a valid owner"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _ownerOf(tokenId); require(owner != address(0), "ERC721: invalid token ID"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { _requireMinted(tokenId); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not token owner or approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { _requireMinted(tokenId); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom(address from, address to, uint256 tokenId) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved"); _safeTransfer(from, to, tokenId, data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist */ function _ownerOf(uint256 tokenId) internal view virtual returns (address) { return _owners[tokenId]; } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _ownerOf(tokenId) != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { address owner = ERC721.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint(address to, uint256 tokenId, bytes memory data) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId, 1); // Check that tokenId was not minted by `_beforeTokenTransfer` hook require(!_exists(tokenId), "ERC721: token already minted"); unchecked { // Will not overflow unless all 2**256 token ids are minted to the same owner. // Given that tokens are minted one by one, it is impossible in practice that // this ever happens. Might change if we allow batch minting. // The ERC fails to describe this case. _balances[to] += 1; } _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId, 1); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * This is an internal function that does not check if the sender is authorized to operate on the token. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId, 1); // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook owner = ERC721.ownerOf(tokenId); // Clear approvals delete _tokenApprovals[tokenId]; unchecked { // Cannot overflow, as that would require more tokens to be burned/transferred // out than the owner initially received through minting and transferring in. _balances[owner] -= 1; } delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId, 1); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer(address from, address to, uint256 tokenId) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId, 1); // Check that tokenId was not transferred by `_beforeTokenTransfer` hook require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); // Clear approvals from the previous owner delete _tokenApprovals[tokenId]; unchecked { // `_balances[from]` cannot overflow for the same reason as described in `_burn`: // `from`'s balance is the number of token held, which is at least one before the current // transfer. // `_balances[to]` could overflow in the conditions described in `_mint`. That would require // all 2**256 token ids to be minted, which in practice is impossible. _balances[from] -= 1; _balances[to] += 1; } _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId, 1); } /** * @dev Approve `to` to operate on `tokenId` * * Emits an {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll(address owner, address operator, bool approved) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Reverts if the `tokenId` has not been minted yet. */ function _requireMinted(uint256 tokenId) internal view virtual { require(_exists(tokenId), "ERC721: invalid token ID"); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`. * - When `from` is zero, the tokens will be minted for `to`. * - When `to` is zero, ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * - `batchSize` is non-zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {} /** * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`. * - When `from` is zero, the tokens were minted for `to`. * - When `to` is zero, ``from``'s tokens were burned. * - `from` and `to` are never both zero. * - `batchSize` is non-zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {} /** * @dev Unsafe write access to the balances, used by extensions that "mint" tokens using an {ownerOf} override. * * WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant * being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such * that `ownerOf(tokenId)` is `a`. */ // solhint-disable-next-line func-name-mixedcase function __unsafe_increaseBalance(address account, uint256 amount) internal { _balances[account] += amount; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Burnable.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "../../../utils/Context.sol"; /** * @title ERC721 Burnable Token * @dev ERC721 Token that can be burned (destroyed). */ abstract contract ERC721Burnable is Context, ERC721 { /** * @dev Burns `tokenId`. See {ERC721-_burn}. * * Requirements: * * - The caller must own `tokenId` or be an approved operator. */ function burn(uint256 tokenId) public virtual { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved"); _burn(tokenId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "./IERC721Enumerable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev See {ERC721-_beforeTokenTransfer}. */ function _beforeTokenTransfer( address from, address to, uint256 firstTokenId, uint256 batchSize ) internal virtual override { super._beforeTokenTransfer(from, to, firstTokenId, batchSize); if (batchSize > 1) { // Will only trigger during construction. Batch transferring (minting) is not available afterwards. revert("ERC721Enumerable: consecutive transfers not supported"); } uint256 tokenId = firstTokenId; if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 tokenId) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [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://consensys.net/diligence/blog/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.8.0/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 functionCallWithValue(target, data, 0, "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"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or 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 { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/draft-EIP712.sol) pragma solidity ^0.8.0; // EIP-712 is Final as of 2022-08-11. This file is deprecated. import "./EIP712.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV // Deprecated in v4.8 } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. /// @solidity memory-safe-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) { // 32 is the length in bytes of hash, // enforced by the type signature above /// @solidity memory-safe-assembly assembly { mstore(0x00, "\x19Ethereum Signed Message:\n32") mstore(0x1c, hash) message := keccak256(0x00, 0x3c) } } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) { /// @solidity memory-safe-assembly assembly { let ptr := mload(0x40) mstore(ptr, "\x19\x01") mstore(add(ptr, 0x02), domainSeparator) mstore(add(ptr, 0x22), structHash) data := keccak256(ptr, 0x42) } } /** * @dev Returns an Ethereum Signed Data with intended validator, created from a * `validator` and `data` according to the version 0 of EIP-191. * * See {recover}. */ function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x00", validator, data)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/EIP712.sol) pragma solidity ^0.8.8; import "./ECDSA.sol"; import "../ShortStrings.sol"; import "../../interfaces/IERC5267.sol"; /** * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data. * * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible, * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding * they need in their contracts using a combination of `abi.encode` and `keccak256`. * * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA * ({_hashTypedDataV4}). * * The implementation of the domain separator was designed to be as efficient as possible while still properly updating * the chain id to protect against replay attacks on an eventual fork of the chain. * * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask]. * * NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain * separator of the implementation contract. This will cause the `_domainSeparatorV4` function to always rebuild the * separator from the immutable values, which is cheaper than accessing a cached version in cold storage. * * _Available since v3.4._ * * @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment */ abstract contract EIP712 is IERC5267 { using ShortStrings for *; bytes32 private constant _TYPE_HASH = keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"); // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to // invalidate the cached domain separator if the chain id changes. bytes32 private immutable _cachedDomainSeparator; uint256 private immutable _cachedChainId; address private immutable _cachedThis; bytes32 private immutable _hashedName; bytes32 private immutable _hashedVersion; ShortString private immutable _name; ShortString private immutable _version; string private _nameFallback; string private _versionFallback; /** * @dev Initializes the domain separator and parameter caches. * * The meaning of `name` and `version` is specified in * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]: * * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol. * - `version`: the current major version of the signing domain. * * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart * contract upgrade]. */ constructor(string memory name, string memory version) { _name = name.toShortStringWithFallback(_nameFallback); _version = version.toShortStringWithFallback(_versionFallback); _hashedName = keccak256(bytes(name)); _hashedVersion = keccak256(bytes(version)); _cachedChainId = block.chainid; _cachedDomainSeparator = _buildDomainSeparator(); _cachedThis = address(this); } /** * @dev Returns the domain separator for the current chain. */ function _domainSeparatorV4() internal view returns (bytes32) { if (address(this) == _cachedThis && block.chainid == _cachedChainId) { return _cachedDomainSeparator; } else { return _buildDomainSeparator(); } } function _buildDomainSeparator() private view returns (bytes32) { return keccak256(abi.encode(_TYPE_HASH, _hashedName, _hashedVersion, block.chainid, address(this))); } /** * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this * function returns the hash of the fully encoded EIP712 message for this domain. * * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example: * * ```solidity * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode( * keccak256("Mail(address to,string contents)"), * mailTo, * keccak256(bytes(mailContents)) * ))); * address signer = ECDSA.recover(digest, signature); * ``` */ function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) { return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash); } /** * @dev See {EIP-5267}. * * _Available since v4.9._ */ function eip712Domain() public view virtual override returns ( bytes1 fields, string memory name, string memory version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] memory extensions ) { return ( hex"0f", // 01111 _name.toStringWithFallback(_nameFallback), _version.toStringWithFallback(_versionFallback), block.chainid, address(this), bytes32(0), new uint256[](0) ); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1, "Math: mulDiv overflow"); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.0; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/ShortStrings.sol) pragma solidity ^0.8.8; import "./StorageSlot.sol"; // | string | 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | // | length | 0x BB | type ShortString is bytes32; /** * @dev This library provides functions to convert short memory strings * into a `ShortString` type that can be used as an immutable variable. * * Strings of arbitrary length can be optimized using this library if * they are short enough (up to 31 bytes) by packing them with their * length (1 byte) in a single EVM word (32 bytes). Additionally, a * fallback mechanism can be used for every other case. * * Usage example: * * ```solidity * contract Named { * using ShortStrings for *; * * ShortString private immutable _name; * string private _nameFallback; * * constructor(string memory contractName) { * _name = contractName.toShortStringWithFallback(_nameFallback); * } * * function name() external view returns (string memory) { * return _name.toStringWithFallback(_nameFallback); * } * } * ``` */ library ShortStrings { // Used as an identifier for strings longer than 31 bytes. bytes32 private constant _FALLBACK_SENTINEL = 0x00000000000000000000000000000000000000000000000000000000000000FF; error StringTooLong(string str); error InvalidShortString(); /** * @dev Encode a string of at most 31 chars into a `ShortString`. * * This will trigger a `StringTooLong` error is the input string is too long. */ function toShortString(string memory str) internal pure returns (ShortString) { bytes memory bstr = bytes(str); if (bstr.length > 31) { revert StringTooLong(str); } return ShortString.wrap(bytes32(uint256(bytes32(bstr)) | bstr.length)); } /** * @dev Decode a `ShortString` back to a "normal" string. */ function toString(ShortString sstr) internal pure returns (string memory) { uint256 len = byteLength(sstr); // using `new string(len)` would work locally but is not memory safe. string memory str = new string(32); /// @solidity memory-safe-assembly assembly { mstore(str, len) mstore(add(str, 0x20), sstr) } return str; } /** * @dev Return the length of a `ShortString`. */ function byteLength(ShortString sstr) internal pure returns (uint256) { uint256 result = uint256(ShortString.unwrap(sstr)) & 0xFF; if (result > 31) { revert InvalidShortString(); } return result; } /** * @dev Encode a string into a `ShortString`, or write it to storage if it is too long. */ function toShortStringWithFallback(string memory value, string storage store) internal returns (ShortString) { if (bytes(value).length < 32) { return toShortString(value); } else { StorageSlot.getStringSlot(store).value = value; return ShortString.wrap(_FALLBACK_SENTINEL); } } /** * @dev Decode a string that was encoded to `ShortString` or written to storage using {setWithFallback}. */ function toStringWithFallback(ShortString value, string storage store) internal pure returns (string memory) { if (ShortString.unwrap(value) != _FALLBACK_SENTINEL) { return toString(value); } else { return store; } } /** * @dev Return the length of a string that was encoded to `ShortString` or written to storage using {setWithFallback}. * * WARNING: This will return the "byte length" of the string. This may not reflect the actual length in terms of * actual characters as the UTF-8 encoding of a single character can span over multiple bytes. */ function byteLengthWithFallback(ShortString value, string storage store) internal view returns (uint256) { if (ShortString.unwrap(value) != _FALLBACK_SENTINEL) { return byteLength(value); } else { return bytes(store).length; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol) // This file was procedurally generated from scripts/generate/templates/StorageSlot.js. 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: * ```solidity * 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`, `uint256`._ * _Available since v4.9 for `string`, `bytes`._ */ library StorageSlot { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } struct StringSlot { string value; } struct BytesSlot { bytes value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` with member `value` located at `slot`. */ function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` representation of the string storage pointer `store`. */ function getStringSlot(string storage store) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } /** * @dev Returns an `BytesSlot` with member `value` located at `slot`. */ function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`. */ function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; import "./math/SignedMath.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toString(int256 value) internal pure returns (string memory) { return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value)))); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @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] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return keccak256(bytes(a)) == keccak256(bytes(b)); } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"_baseTokenUri","type":"string"},{"internalType":"address payable","name":"_adminWallet","type":"address"},{"internalType":"address payable","name":"_signWallet","type":"address"},{"internalType":"address","name":"_timelockAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidShortString","type":"error"},{"inputs":[{"internalType":"string","name":"str","type":"string"}],"name":"StringTooLong","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"userAddress","type":"address"},{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"metadata","type":"string"},{"internalType":"bool","name":"status","type":"bool"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expirationTime","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"indexed":false,"internalType":"struct CSKNFT.SignInfo","name":"","type":"tuple"}],"name":"ChangeItemStatus","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"prevSignWallet","type":"address"},{"indexed":true,"internalType":"address","name":"newSignWallet","type":"address"},{"indexed":true,"internalType":"address","name":"executor","type":"address"}],"name":"ChangeSignWallet","type":"event"},{"anonymous":false,"inputs":[],"name":"EIP712DomainChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"userAddress","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"createdAt","type":"uint256"},{"indexed":false,"internalType":"string","name":"metadata","type":"string"},{"indexed":true,"internalType":"enum CSKNFT.MintType","name":"_mintType","type":"uint8"}],"name":"MintNft","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"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":"preAdminWallet","type":"address"},{"indexed":true,"internalType":"address","name":"adminWallet","type":"address"}],"name":"SetAdminWallet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"string","name":"prevBaseURI","type":"string"},{"indexed":true,"internalType":"string","name":"baseURI","type":"string"}],"name":"SetBaseURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"prevCSKGen","type":"address"},{"indexed":true,"internalType":"address","name":"newCSKGen","type":"address"}],"name":"SetCSKGen","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"startWhitelistTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endWhitelistTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"startWaitlistTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endWaitlistTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"startMintTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endMintTime","type":"uint256"},{"indexed":true,"internalType":"address","name":"executer","type":"address"}],"name":"SetPeriods","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"prePortalPrice","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"portalPrice","type":"uint256"}],"name":"SetPortalPrice","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"prevTimelockAddress","type":"address"},{"indexed":true,"internalType":"address","name":"newTimeLockAddress","type":"address"}],"name":"SetTimelock","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_PORTAL_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PORTAL_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SIGNATURE_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SIGNING_DOMAIN","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TIMELOCK_DEV_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOTAL_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"adminWallet","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"checkFlagStatus","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"checkMetadata","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cskGen","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"eip712Domain","outputs":[{"internalType":"bytes1","name":"fields","type":"bytes1"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"version","type":"string"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"verifyingContract","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256[]","name":"extensions","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentTokenId","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":"address","name":"userAddress","type":"address"},{"internalType":"uint256","name":"cursor","type":"uint256"},{"internalType":"uint256","name":"resultsPerPage","type":"uint256"}],"name":"getUserTokenAndInfos","outputs":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bool","name":"isAvailable","type":"bool"},{"internalType":"string","name":"metadata","type":"string"}],"internalType":"struct CSKNFT.UserAsset[]","name":"userAssets","type":"tuple[]"},{"internalType":"uint256","name":"newCursor","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_userAddr","type":"address"},{"internalType":"string","name":"metadata","type":"string"},{"internalType":"enum CSKNFT.MintType","name":"_mintType","type":"uint8"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintDates","outputs":[{"internalType":"uint256","name":"START_WHITELIST","type":"uint256"},{"internalType":"uint256","name":"END_WHITELIST","type":"uint256"},{"internalType":"uint256","name":"START_WAITLIST","type":"uint256"},{"internalType":"uint256","name":"END_WAITLIST","type":"uint256"},{"internalType":"uint256","name":"MINT_START_DATE","type":"uint256"},{"internalType":"uint256","name":"MINT_END_DATE","type":"uint256"}],"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":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"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":"_adminWallet","type":"address"}],"name":"setAdminWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_baseTokenURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newCSKGen","type":"address"}],"name":"setCSKGen","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"startWhitelistTime","type":"uint256"},{"internalType":"uint256","name":"endWhitelistTime","type":"uint256"},{"internalType":"uint256","name":"startWaitlistTime","type":"uint256"},{"internalType":"uint256","name":"endWaitlistTime","type":"uint256"},{"internalType":"uint256","name":"startMintTime","type":"uint256"},{"internalType":"uint256","name":"endMintTime","type":"uint256"}],"name":"setPeriods","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newPrice","type":"uint256"}],"name":"setPortalPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_signWallet","type":"address"}],"name":"setSignWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newTimelockAddress","type":"address"}],"name":"setTimelock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signWallet","outputs":[{"internalType":"address","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":[],"name":"timelockAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenInfo","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bool","name":"isAvailable","type":"bool"},{"internalType":"string","name":"metadata","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"metadata","type":"string"},{"internalType":"bool","name":"status","type":"bool"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expirationTime","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"internalType":"struct CSKNFT.SignInfo","name":"_info","type":"tuple"}],"name":"updateFlagStatus","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"updateTokenNonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
6101606040526605543df729c0006015553480156200001d57600080fd5b50604051620051923803806200519283398101604081905262000040916200050b565b60405180604001604052806009815260200168434f444553454b414960b81b815250604051806040016040528060018152602001603160f81b8152506040518060400160405280600c81526020016b10dbd91954d95ad85a53919560a21b8152506040518060400160405280600381526020016243534b60e81b8152508160009081620000ce91906200068c565b506001620000dd82826200068c565b50620000ef915083905060066200033f565b61012052620001008160076200033f565b61014052815160208084019190912060e052815190820120610100524660a0526200018e60e05161010051604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201529081019290925260608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b60805250503060c052620001a23362000378565b6001600e556001600160a01b038116620002035760405162461bcd60e51b815260206004820152601860248201527f496e76616c69642054696d656c6f636b2061646472657373000000000000000060448201526064015b60405180910390fd5b6001600160a01b0382166200025b5760405162461bcd60e51b815260206004820152601a60248201527f496e76616c6964207369676e57616c6c657420616464726573730000000000006044820152606401620001fa565b6001600160a01b038316620002b35760405162461bcd60e51b815260206004820152601b60248201527f496e76616c69642061646d696e57616c6c6574206164647265737300000000006044820152606401620001fa565b620002c0600033620003ca565b620002ec7fc333ad7c59d0314e06cdfc5ceb07dfd5c920357439ea113d519954117258ede282620003ca565b600f620002fa85826200068c565b50601080546001600160a01b039485166001600160a01b03199182161790915560118054938516938216939093179092556013805491909316911617905550620007b2565b60006020835110156200035f5762000357836200046f565b905062000372565b816200036c84826200068c565b5060ff90505b92915050565b600d80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000828152600c602090815260408083206001600160a01b038516845290915290205460ff166200046b576000828152600c602090815260408083206001600160a01b03851684529091529020805460ff191660011790556200042a3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b600080829050601f815111156200049d578260405163305a27a960e01b8152600401620001fa919062000758565b8051620004aa826200078d565b179392505050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620004e5578181015183820152602001620004cb565b50506000910152565b80516001600160a01b03811681146200050657600080fd5b919050565b600080600080608085870312156200052257600080fd5b84516001600160401b03808211156200053a57600080fd5b818701915087601f8301126200054f57600080fd5b815181811115620005645762000564620004b2565b604051601f8201601f19908116603f011681019083821181831017156200058f576200058f620004b2565b816040528281528a6020848701011115620005a957600080fd5b620005bc836020830160208801620004c8565b8098505050505050620005d260208601620004ee565b9250620005e260408601620004ee565b9150620005f260608601620004ee565b905092959194509250565b600181811c908216806200061257607f821691505b6020821081036200063357634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200068757600081815260208120601f850160051c81016020861015620006625750805b601f850160051c820191505b8181101562000683578281556001016200066e565b5050505b505050565b81516001600160401b03811115620006a857620006a8620004b2565b620006c081620006b98454620005fd565b8462000639565b602080601f831160018114620006f85760008415620006df5750858301515b600019600386901b1c1916600185901b17855562000683565b600085815260208120601f198616915b82811015620007295788860151825594840194600190910190840162000708565b5085821015620007485787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b602081526000825180602084015262000779816040850160208701620004c8565b601f01601f19169190910160400192915050565b80516020808301519190811015620006335760001960209190910360031b1b16919050565b60805160a05160c05160e0516101005161012051610140516149856200080d6000396000611c6a01526000611c3f01526000613904015260006138dc01526000613837015260006138610152600061388b01526149856000f3fe6080604052600436106103505760003560e01c80635b46c0e2116101c6578063b88d4fde116100f7578063dfb955fb11610095578063f2fde38b1161006f578063f2fde38b14610a36578063f5633ba214610a56578063fa6ad33514610a76578063ff3fc2da14610ace57600080fd5b8063dfb955fb14610998578063e3faad94146109b8578063e985e9c5146109ed57600080fd5b8063cc33c875116100d1578063cc33c87514610900578063d53913931461092f578063d547741f14610963578063d547cfb71461098357600080fd5b8063b88d4fde146108a0578063bdacb303146108c0578063c87b56dd146108e057600080fd5b8063902d55a511610164578063a217fddf1161013e578063a217fddf1461081c578063a22cb46514610831578063a319e93314610851578063a41572961461087357600080fd5b8063902d55a5146107d157806391d14854146107e757806395d89b411461080757600080fd5b806370a08231116101a057806370a0823114610756578063715018a61461077657806384b0196e1461078b5780638da5cb5b146107b357600080fd5b80635b46c0e2146106f65780636352211e146107165780636a4b88831461073657600080fd5b8063319c2e24116102a05780634bc66f321161023e5780634f6ccce7116102185780634f6ccce7146106745780635301b9aa1461069457806355f804b3146106c157806356189236146106e157600080fd5b80634bc66f32146106065780634ce74859146106265780634de4c9b31461064657600080fd5b806336b19cd71161027a57806336b19cd71461059057806342842e0e146105b057806342966c68146105d0578063488cacbd146105f057600080fd5b8063319c2e2414610530578063350829331461055057806336568abe1461057057600080fd5b80631e1b4c441161030d57806328444381116102e757806328444381146104b0578063288234d5146104d05780632f2ff15d146104f05780632f745c591461051057600080fd5b80631e1b4c441461044557806323b872dd14610460578063248a9ca31461048057600080fd5b806301ffc9a714610355578063028ad8961461038a57806306fdde03146103b7578063081812fc146103cc578063095ea7b31461040457806318160ddd14610426575b600080fd5b34801561036157600080fd5b50610375610370366004613c0d565b610ae1565b60405190151581526020015b60405180910390f35b34801561039657600080fd5b506103aa6103a5366004613c2a565b610af2565b6040516103819190613c93565b3480156103c357600080fd5b506103aa610b9e565b3480156103d857600080fd5b506103ec6103e7366004613c2a565b610c30565b6040516001600160a01b039091168152602001610381565b34801561041057600080fd5b5061042461041f366004613cc2565b610c57565b005b34801561043257600080fd5b50600a545b604051908152602001610381565b34801561045157600080fd5b506104376605543df729c00081565b34801561046c57600080fd5b5061042461047b366004613cec565b610d71565b34801561048c57600080fd5b5061043761049b366004613c2a565b6000908152600c602052604090206001015490565b3480156104bc57600080fd5b506104246104cb366004613d28565b610da1565b3480156104dc57600080fd5b506104246104eb366004613d6b565b610f56565b3480156104fc57600080fd5b5061042461050b366004613d86565b61100a565b34801561051c57600080fd5b5061043761052b366004613cc2565b61102c565b34801561053c57600080fd5b5061042461054b366004613c2a565b6110c2565b34801561055c57600080fd5b5061042461056b366004613d6b565b611162565b34801561057c57600080fd5b5061042461058b366004613d86565b61120c565b34801561059c57600080fd5b506010546103ec906001600160a01b031681565b3480156105bc57600080fd5b506104246105cb366004613cec565b611298565b3480156105dc57600080fd5b506104246105eb366004613c2a565b6112c8565b3480156105fc57600080fd5b5061043760155481565b34801561061257600080fd5b506013546103ec906001600160a01b031681565b34801561063257600080fd5b506011546103ec906001600160a01b031681565b34801561065257600080fd5b50610666610661366004613db2565b611326565b604051610381929190613de5565b34801561068057600080fd5b5061043761068f366004613c2a565b6115bd565b3480156106a057600080fd5b506104376106af366004613d6b565b601c6020526000908152604090205481565b3480156106cd57600080fd5b506104246106dc366004613f36565b611650565b3480156106ed57600080fd5b506104376117aa565b34801561070257600080fd5b50610424610711366004613d6b565b6117ba565b34801561072257600080fd5b506103ec610731366004613c2a565b61186d565b34801561074257600080fd5b50610424610751366004613f6a565b6118cd565b34801561076257600080fd5b50610437610771366004613d6b565b611b97565b34801561078257600080fd5b50610424611c1d565b34801561079757600080fd5b506107a0611c31565b6040516103819796959493929190614003565b3480156107bf57600080fd5b50600d546001600160a01b03166103ec565b3480156107dd57600080fd5b506104376115b381565b3480156107f357600080fd5b50610375610802366004613d86565b611cba565b34801561081357600080fd5b506103aa611ce5565b34801561082857600080fd5b50610437600081565b34801561083d57600080fd5b5061042461084c3660046140a9565b611cf4565b34801561085d57600080fd5b5061043760008051602061493083398151915281565b34801561087f57600080fd5b506103aa604051806040016040528060018152602001603160f81b81525081565b3480156108ac57600080fd5b506104246108bb3660046140d3565b611cff565b3480156108cc57600080fd5b506104246108db366004613d6b565b611d36565b3480156108ec57600080fd5b506103aa6108fb366004613c2a565b611e43565b34801561090c57600080fd5b5061092061091b366004613c2a565b611eaa565b6040516103819392919061413a565b34801561093b57600080fd5b506104377f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b34801561096f57600080fd5b5061042461097e366004613d86565b611f59565b34801561098f57600080fd5b506103aa611f7b565b3480156109a457600080fd5b506012546103ec906001600160a01b031681565b3480156109c457600080fd5b506103aa60405180604001604052806009815260200168434f444553454b414960b81b81525081565b3480156109f957600080fd5b50610375610a08366004614164565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b348015610a4257600080fd5b50610424610a51366004613d6b565b612009565b348015610a6257600080fd5b50610375610a71366004613c2a565b61207f565b348015610a8257600080fd5b50601654601754601854601954601a54601b54610aa195949392919086565b604080519687526020870195909552938501929092526060840152608083015260a082015260c001610381565b610424610adc36600461418e565b6120a3565b6000610aec826123f2565b92915050565b6060610afd82612417565b6000828152601d602052604090206002018054610b19906141c8565b80601f0160208091040260200160405190810160405280929190818152602001828054610b45906141c8565b8015610b925780601f10610b6757610100808354040283529160200191610b92565b820191906000526020600020905b815481529060010190602001808311610b7557829003601f168201915b50505050509050919050565b606060008054610bad906141c8565b80601f0160208091040260200160405190810160405280929190818152602001828054610bd9906141c8565b8015610c265780601f10610bfb57610100808354040283529160200191610c26565b820191906000526020600020905b815481529060010190602001808311610c0957829003601f168201915b5050505050905090565b6000610c3b82612417565b506000908152600460205260409020546001600160a01b031690565b6000610c628261186d565b9050806001600160a01b0316836001600160a01b031603610cd45760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b0382161480610cf05750610cf08133610a08565b610d625760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610ccb565b610d6c8383612476565b505050565b610d7a8161207f565b610d965760405162461bcd60e51b8152600401610ccb90614202565b610d6c8383836124e4565b600080516020614930833981519152610db981612516565b868611610e015760405162461bcd60e51b8152602060048201526016602482015275696e76616c69642077686974656c6973742074696d6560501b6044820152606401610ccb565b848411610e485760405162461bcd60e51b8152602060048201526015602482015274696e76616c696420776169746c6973742074696d6560581b6044820152606401610ccb565b828211610e8b5760405162461bcd60e51b8152602060048201526011602482015270696e76616c6964206d696e742074696d6560781b6044820152606401610ccb565b8486108015610e9957508284105b610ed75760405162461bcd60e51b815260206004820152600f60248201526e696e76616c696420706572696f647360881b6044820152606401610ccb565b6016879055601786905560188590556019849055601a839055601b8290556040805188815260208101889052808201879052606081018690526080810185905260a08101849052905133917f797278196c2f78691eb428a138fbee4296c7a0612a1581bc95b37de41a7130a3919081900360c00190a250505050505050565b600080516020614930833981519152610f6e81612516565b6001600160a01b038216610fb65760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b6044820152606401610ccb565b601180546001600160a01b038481166001600160a01b031983168117909355604051911691339183907f99d2e723b48ee50423bb3b0401cd4432d2fa651b5afce731a39107fef09621c490600090a4505050565b60008051602061493083398151915261102281612516565b610d6c8383612520565b600061103783611b97565b82106110995760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610ccb565b506001600160a01b03919091166000908152600860209081526040808320938352929052205490565b6000805160206149308339815191526110da81612516565b6605543df729c0008211156111285760405162461bcd60e51b8152602060048201526014602482015273696e76616c696420706f7274616c20707269636560601b6044820152606401610ccb565b6015805490839055604051839082907fba3984dee41c532cd8fc4063e920d18f683f7bde96a041bb6dec6aacd3d40b4290600090a3505050565b600061116d81612516565b6001600160a01b0382166111b95760405162461bcd60e51b8152602060048201526013602482015272125b9d985b1a590818591b5a5b95d85b1b195d606a1b6044820152606401610ccb565b601080546001600160a01b038481166001600160a01b0319831681179093556040519116919082907f9f0ac88be9159761bacf6c9e7c294c397ebf594607f6b3f2f70e7e0841ea68e890600090a3505050565b611217600082611cba565b1561128a5760405162461bcd60e51b815260206004820152603d60248201527f416363657373436f6e74726f6c3a2063616e6e6f742072656e6f756e6365207460448201527f68652044454641554c545f41444d494e5f524f4c45206163636f756e740000006064820152608401610ccb565b61129482826125a6565b5050565b6112a18161207f565b6112bd5760405162461bcd60e51b8152600401610ccb90614202565b610d6c838383612620565b6112d18161207f565b6112ed5760405162461bcd60e51b8152600401610ccb90614202565b6000818152601d6020526040812081815560018101805460ff19169055906113186002830182613ba9565b50506113238161263b565b50565b606060008061133486611b97565b90508085111561137f5760405162461bcd60e51b8152602060048201526016602482015275637572736f72206973206f7574206f662072616e676560501b6044820152606401610ccb565b600084116113cf5760405162461bcd60e51b815260206004820152601a60248201527f726573756c7473506572506167652063616e6e6f7420626520300000000000006044820152606401610ccb565b836113da868361423f565b8111156113ee576113eb868361423f565b90505b806001600160401b0381111561140657611406613e6c565b60405190808252806020026020018201604052801561145357816020015b604080516060808201835260008083526020830152918101919091528152602001906001900390816114245790505b50935060005b818110156115a35760006114718961052b848b614252565b6000818152601d6020526040812060020180549293509091611492906141c8565b80601f01602080910402602001604051908101604052809291908181526020018280546114be906141c8565b801561150b5780601f106114e05761010080835404028352916020019161150b565b820191906000526020600020905b8154815290600101906020018083116114ee57829003601f168201915b50505050509050600061151d8361207f565b90508288858151811061153257611532614265565b602002602001015160000181815250508088858151811061155557611555614265565b602002602001015160200190151590811515815250508188858151811061157e5761157e614265565b602002602001015160400181905250505050808061159b9061427b565b915050611459565b50836115af8288614252565b935093505050935093915050565b60006115c8600a5490565b821061162b5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610ccb565b600a828154811061163e5761163e614265565b90600052602060002001549050919050565b60008051602061493083398151915261166881612516565b81516000036116b15760405162461bcd60e51b8152602060048201526015602482015274496e76616c6964205f62617365546f6b656e55524960581b6044820152606401610ccb565b6000600f80546116c0906141c8565b80601f01602080910402602001604051908101604052809291908181526020018280546116ec906141c8565b80156117395780601f1061170e57610100808354040283529160200191611739565b820191906000526020600020905b81548152906001019060200180831161171c57829003601f168201915b5050505050905082600f908161174f91906142e2565b50600f60405161175f91906143a1565b6040518091039020816040516117759190614417565b604051908190038120907fc73341c723fd9197b17090f0c077cf2bbe4d89f2f7d71969b3a7e5c50d570a3890600090a3505050565b60006117b560145490565b905090565b6000805160206149308339815191526117d281612516565b6001600160a01b03821661181a5760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b6044820152606401610ccb565b601280546001600160a01b038481166001600160a01b0319831681179093556040519116919082907f022bcc736fcce4f2891ebee18957cdaf4834700a089dcca5678fe139be0fdf7690600090a3505050565b6000818152600260205260408120546001600160a01b031680610aec5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610ccb565b6012546001600160a01b0316331461191b5760405162461bcd60e51b81526020600482015260116024820152701c195c9b5a5cdcda5bdb8819195b9a5959607a1b6044820152606401610ccb565b600281600281111561192f5761192f614433565b036119b557601a544210156119755760405162461bcd60e51b815260206004820152600c60248201526b3737ba1039ba30b93a32b21760a11b6044820152606401610ccb565b601b544211156119b05760405162461bcd60e51b815260206004820152600660248201526532b73232b21760d11b6044820152606401610ccb565b611af7565b60008160028111156119c9576119c9614433565b03611a5057601654421015611a125760405162461bcd60e51b815260206004820152600f60248201526e2bb6103737ba1039ba30b93a32b21760891b6044820152606401610ccb565b6017544211156119b05760405162461bcd60e51b81526020600482015260096024820152682bb61032b73232b21760b91b6044820152606401610ccb565b6001816002811115611a6457611a64614433565b03611af757601854421015611ab35760405162461bcd60e51b81526020600482015260156024820152742bb0b4ba3634b9ba103737ba1039ba30b93a32b21760591b6044820152606401610ccb565b601954421115611af75760405162461bcd60e51b815260206004820152600f60248201526e2bb0b4ba3634b9ba1032b73232b21760891b6044820152606401610ccb565b611b378484848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061266992505050565b806002811115611b4957611b49614433565b601454856001600160a01b03167f1d9cc3511fa62c9d237a08f6270194c9a991d958889e2f600b7fa66267a82f21428787604051611b8993929190614472565b60405180910390a450505050565b60006001600160a01b038216611c015760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610ccb565b506001600160a01b031660009081526003602052604090205490565b611c25612734565b611c2f600061278e565b565b600060608082808083611c657f000000000000000000000000000000000000000000000000000000000000000060066127e0565b611c907f000000000000000000000000000000000000000000000000000000000000000060076127e0565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b6000918252600c602090815260408084206001600160a01b0393909316845291905290205460ff1690565b606060018054610bad906141c8565b61129433838361288b565b611d088261207f565b611d245760405162461bcd60e51b8152600401610ccb90614202565b611d3084848484612959565b50505050565b600080516020614930833981519152611d4e81612516565b6001600160a01b038216611daf5760405162461bcd60e51b815260206004820152602260248201527f496e76616c6964206e657754696d656c6f636b41646472657373206164647265604482015261737360f01b6064820152608401610ccb565b601380546001600160a01b038481166001600160a01b031983161790925516611de66000805160206149308339815191528261298b565b611dfe60008051602061493083398151915284612520565b826001600160a01b0316816001600160a01b03167f91aa98337922135c1d3ae8654f8d0b938c01a35c402eb21e568af3755e4dcd7960405160405180910390a3505050565b6060611e4e82612417565b6000611e586129f2565b90506000815111611e785760405180602001604052806000815250611ea3565b80611e8284612a01565b604051602001611e9392919061448c565b6040516020818303038152906040525b9392505050565b601d60205260009081526040902080546001820154600283018054929360ff90921692611ed6906141c8565b80601f0160208091040260200160405190810160405280929190818152602001828054611f02906141c8565b8015611f4f5780601f10611f2457610100808354040283529160200191611f4f565b820191906000526020600020905b815481529060010190602001808311611f3257829003601f168201915b5050505050905083565b600080516020614930833981519152611f7181612516565b610d6c838361298b565b600f8054611f88906141c8565b80601f0160208091040260200160405190810160405280929190818152602001828054611fb4906141c8565b80156120015780601f10611fd657610100808354040283529160200191612001565b820191906000526020600020905b815481529060010190602001808311611fe457829003601f168201915b505050505081565b612011612734565b6001600160a01b0381166120765760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610ccb565b6113238161278e565b600061208a82612417565b506000908152601d602052604090206001015460ff1690565b6120ab612a93565b336120b6823561186d565b6001600160a01b0316146120f95760405162461bcd60e51b815260206004820152600a6024820152692737ba1027bbb732b91760b11b6044820152606401610ccb565b61210960608201604083016144bb565b81356000908152601d602052604090206001015490151560ff9091161515036121635760405162461bcd60e51b815260206004820152600c60248201526b29b0b6b29039ba30ba3ab99760a11b6044820152606401610ccb565b806080013542106121a25760405162461bcd60e51b8152602060048201526009602482015268151a5b595cc81bdd5d60ba1b6044820152606401610ccb565b60006121b56121b0836144d6565b612aec565b6011549091506001600160a01b038083169116146122025760405162461bcd60e51b815260206004820152600a6024820152691b9bdd081cda59db995960b21b6044820152606401610ccb565b336000908152601c6020526040812080549161221d8361427b565b919050558260600135146122635760405162461bcd60e51b815260206004820152600d60248201526c496e76616c6964206e6f6e636560981b6044820152606401610ccb565b61227360608301604084016144bb565b1561237a5760155434146122ba5760405162461bcd60e51b815260206004820152600e60248201526d125b9d985b1a5908105b5bdd5b9d60921b6044820152606401610ccb565b6122c76020830183614571565b83356000908152601d60205260409020600201916122e69190836145b7565b506010546040516000916001600160a01b03169034908381818185875af1925050503d8060008114612334576040519150601f19603f3d011682016040523d82523d6000602084013e612339565b606091505b50509050806123785760405162461bcd60e51b815260206004820152600b60248201526a11985a5b1959081cd95b9960aa1b6044820152606401610ccb565b505b61238a60608301604084016144bb565b82356000908152601d602052604090819020600101805460ff1916921515929092179091555133907f50c26df4176583f007fef350b56798e9961ac962ef55bc82d7fddd18468151b0906123df9085906146bb565b60405180910390a2506113236001600e55565b60006001600160e01b03198216637965db0b60e01b1480610aec5750610aec82612b08565b6000818152600260205260409020546001600160a01b03166113235760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610ccb565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906124ab8261186d565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6124ef335b82612b2d565b61250b5760405162461bcd60e51b8152600401610ccb90614742565b610d6c838383612bac565b6113238133612d1d565b61252a8282611cba565b611294576000828152600c602090815260408083206001600160a01b03851684529091529020805460ff191660011790556125623390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6001600160a01b03811633146126165760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610ccb565b611294828261298b565b610d6c83838360405180602001604052806000815250611cff565b612644336124e9565b6126605760405162461bcd60e51b8152600401610ccb90614742565b61132381612d76565b6000612674600a5490565b90506115b381106126b45760405162461bcd60e51b815260206004820152600a6024820152694d617820737570706c7960b01b6044820152606401610ccb565b6126c2601480546001019055565b60006126cd60145490565b60408051606081018252828152600160208083018281528385018981526000878152601d90935294909120835181559051918101805460ff191692151592909217909155915192935091600282019061272690826142e2565b50905050611d308482612e19565b600d546001600160a01b03163314611c2f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ccb565b600d80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b606060ff83146127fa576127f383612e33565b9050610aec565b818054612806906141c8565b80601f0160208091040260200160405190810160405280929190818152602001828054612832906141c8565b801561287f5780601f106128545761010080835404028352916020019161287f565b820191906000526020600020905b81548152906001019060200180831161286257829003601f168201915b50505050509050610aec565b816001600160a01b0316836001600160a01b0316036128ec5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610ccb565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6129633383612b2d565b61297f5760405162461bcd60e51b8152600401610ccb90614742565b611d3084848484612e72565b6129958282611cba565b15611294576000828152600c602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6060600f8054610bad906141c8565b60606000612a0e83612ea5565b60010190506000816001600160401b03811115612a2d57612a2d613e6c565b6040519080825280601f01601f191660200182016040528015612a57576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084612a6157509392505050565b6002600e5403612ae55760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610ccb565b6002600e55565b600080612af883612f7d565b9050611ea3818460a00151613018565b60006001600160e01b0319821663780e9d6360e01b1480610aec5750610aec8261303c565b600080612b398361186d565b9050806001600160a01b0316846001600160a01b03161480612b8057506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b80612ba45750836001600160a01b0316612b9984610c30565b6001600160a01b0316145b949350505050565b826001600160a01b0316612bbf8261186d565b6001600160a01b031614612be55760405162461bcd60e51b8152600401610ccb9061478f565b6001600160a01b038216612c475760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610ccb565b612c54838383600161308c565b826001600160a01b0316612c678261186d565b6001600160a01b031614612c8d5760405162461bcd60e51b8152600401610ccb9061478f565b600081815260046020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260038552838620805460001901905590871680865283862080546001019055868652600290945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b612d278282611cba565b61129457612d3481613098565b612d3f8360206130aa565b604051602001612d509291906147d4565b60408051601f198184030181529082905262461bcd60e51b8252610ccb91600401613c93565b6000612d818261186d565b9050612d9181600084600161308c565b612d9a8261186d565b600083815260046020908152604080832080546001600160a01b03199081169091556001600160a01b0385168085526003845282852080546000190190558785526002909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b611294828260405180602001604052806000815250613245565b60606000612e4083613278565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b612e7d848484612bac565b612e89848484846132a0565b611d305760405162461bcd60e51b8152600401610ccb90614849565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310612ee45772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310612f10576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310612f2e57662386f26fc10000830492506010015b6305f5e1008310612f46576305f5e100830492506008015b6127108310612f5a57612710830492506004015b60648310612f6c576064830492506002015b600a8310610aec5760010192915050565b6000610aec7f1f659cf23b0e6195218a7ba7ae14471abfae0d16ca69b995575f707702723bfb8360000151846020015180519060200120856040015186606001518760800151604051602001612ffd969594939291909586526020860194909452604085019290925215156060840152608083015260a082015260c00190565b604051602081830303815290604052805190602001206133a1565b600080600061302785856133ce565b9150915061303481613413565b509392505050565b60006001600160e01b031982166380ac58cd60e01b148061306d57506001600160e01b03198216635b5e139f60e01b145b80610aec57506301ffc9a760e01b6001600160e01b0319831614610aec565b611d308484848461355d565b6060610aec6001600160a01b03831660145b606060006130b983600261489b565b6130c4906002614252565b6001600160401b038111156130db576130db613e6c565b6040519080825280601f01601f191660200182016040528015613105576020820181803683370190505b509050600360fc1b8160008151811061312057613120614265565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061314f5761314f614265565b60200101906001600160f81b031916908160001a905350600061317384600261489b565b61317e906001614252565b90505b60018111156131f6576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106131b2576131b2614265565b1a60f81b8282815181106131c8576131c8614265565b60200101906001600160f81b031916908160001a90535060049490941c936131ef816148b2565b9050613181565b508315611ea35760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610ccb565b61324f8383613691565b61325c60008484846132a0565b610d6c5760405162461bcd60e51b8152600401610ccb90614849565b600060ff8216601f811115610aec57604051632cd44ac360e21b815260040160405180910390fd5b60006001600160a01b0384163b1561339657604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906132e49033908990889088906004016148c9565b6020604051808303816000875af192505050801561331f575060408051601f3d908101601f1916820190925261331c918101906148fc565b60015b61337c573d80801561334d576040519150601f19603f3d011682016040523d82523d6000602084013e613352565b606091505b5080516000036133745760405162461bcd60e51b8152600401610ccb90614849565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612ba4565b506001949350505050565b6000610aec6133ae61382a565b8360405161190160f01b8152600281019290925260228201526042902090565b60008082516041036134045760208301516040840151606085015160001a6133f887828585613955565b9450945050505061340c565b506000905060025b9250929050565b600081600481111561342757613427614433565b0361342f5750565b600181600481111561344357613443614433565b036134905760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610ccb565b60028160048111156134a4576134a4614433565b036134f15760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610ccb565b600381600481111561350557613505614433565b036113235760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610ccb565b60018111156135cc5760405162461bcd60e51b815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e7365637574697665207472604482015274185b9cd9995c9cc81b9bdd081cdd5c1c1bdc9d1959605a1b6064820152608401610ccb565b816001600160a01b0385166136285761362381600a80546000838152600b60205260408120829055600182018355919091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80155565b61364b565b836001600160a01b0316856001600160a01b03161461364b5761364b8582613a19565b6001600160a01b0384166136675761366281613ab6565b61368a565b846001600160a01b0316846001600160a01b03161461368a5761368a8482613b65565b5050505050565b6001600160a01b0382166136e75760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610ccb565b6000818152600260205260409020546001600160a01b03161561374c5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610ccb565b61375a60008383600161308c565b6000818152600260205260409020546001600160a01b0316156137bf5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610ccb565b6001600160a01b038216600081815260036020908152604080832080546001019055848352600290915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614801561388357507f000000000000000000000000000000000000000000000000000000000000000046145b156138ad57507f000000000000000000000000000000000000000000000000000000000000000090565b6117b5604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561398c5750600090506003613a10565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156139e0573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116613a0957600060019250925050613a10565b9150600090505b94509492505050565b60006001613a2684611b97565b613a30919061423f565b600083815260096020526040902054909150808214613a83576001600160a01b03841660009081526008602090815260408083208584528252808320548484528184208190558352600990915290208190555b5060009182526009602090815260408084208490556001600160a01b039094168352600881528383209183525290812055565b600a54600090613ac89060019061423f565b6000838152600b6020526040812054600a8054939450909284908110613af057613af0614265565b9060005260206000200154905080600a8381548110613b1157613b11614265565b6000918252602080832090910192909255828152600b9091526040808220849055858252812055600a805480613b4957613b49614919565b6001900381819060005260206000200160009055905550505050565b6000613b7083611b97565b6001600160a01b039093166000908152600860209081526040808320868452825280832085905593825260099052919091209190915550565b508054613bb5906141c8565b6000825580601f10613bc5575050565b601f01602090049060005260206000209081019061132391905b80821115613bf35760008155600101613bdf565b5090565b6001600160e01b03198116811461132357600080fd5b600060208284031215613c1f57600080fd5b8135611ea381613bf7565b600060208284031215613c3c57600080fd5b5035919050565b60005b83811015613c5e578181015183820152602001613c46565b50506000910152565b60008151808452613c7f816020860160208601613c43565b601f01601f19169290920160200192915050565b602081526000611ea36020830184613c67565b80356001600160a01b0381168114613cbd57600080fd5b919050565b60008060408385031215613cd557600080fd5b613cde83613ca6565b946020939093013593505050565b600080600060608486031215613d0157600080fd5b613d0a84613ca6565b9250613d1860208501613ca6565b9150604084013590509250925092565b60008060008060008060c08789031215613d4157600080fd5b505084359660208601359650604086013595606081013595506080810135945060a0013592509050565b600060208284031215613d7d57600080fd5b611ea382613ca6565b60008060408385031215613d9957600080fd5b82359150613da960208401613ca6565b90509250929050565b600080600060608486031215613dc757600080fd5b613dd084613ca6565b95602085013595506040909401359392505050565b60006040808301818452808651808352606092508286019150828160051b8701016020808a0160005b84811015613e5757898403605f1901865281518051855283810151151584860152880151888501889052613e4488860182613c67565b9684019694505090820190600101613e0e565b50509690960196909652509295945050505050565b634e487b7160e01b600052604160045260246000fd5b60405160c081016001600160401b0381118282101715613ea457613ea4613e6c565b60405290565b600082601f830112613ebb57600080fd5b81356001600160401b0380821115613ed557613ed5613e6c565b604051601f8301601f19908116603f01168101908282118183101715613efd57613efd613e6c565b81604052838152866020858801011115613f1657600080fd5b836020870160208301376000602085830101528094505050505092915050565b600060208284031215613f4857600080fd5b81356001600160401b03811115613f5e57600080fd5b612ba484828501613eaa565b60008060008060608587031215613f8057600080fd5b613f8985613ca6565b935060208501356001600160401b0380821115613fa557600080fd5b818701915087601f830112613fb957600080fd5b813581811115613fc857600080fd5b886020828501011115613fda57600080fd5b602083019550809450505050604085013560038110613ff857600080fd5b939692955090935050565b60ff60f81b881681526000602060e08184015261402360e084018a613c67565b8381036040850152614035818a613c67565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825283870192509083019060005b818110156140875783518352928401929184019160010161406b565b50909c9b505050505050505050505050565b80358015158114613cbd57600080fd5b600080604083850312156140bc57600080fd5b6140c583613ca6565b9150613da960208401614099565b600080600080608085870312156140e957600080fd5b6140f285613ca6565b935061410060208601613ca6565b92506040850135915060608501356001600160401b0381111561412257600080fd5b61412e87828801613eaa565b91505092959194509250565b838152821515602082015260606040820152600061415b6060830184613c67565b95945050505050565b6000806040838503121561417757600080fd5b61418083613ca6565b9150613da960208401613ca6565b6000602082840312156141a057600080fd5b81356001600160401b038111156141b657600080fd5b820160c08185031215611ea357600080fd5b600181811c908216806141dc57607f821691505b6020821081036141fc57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252600d908201526c6e6f7420617661696c61626c6560981b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b81810381811115610aec57610aec614229565b80820180821115610aec57610aec614229565b634e487b7160e01b600052603260045260246000fd5b60006001820161428d5761428d614229565b5060010190565b601f821115610d6c57600081815260208120601f850160051c810160208610156142bb5750805b601f850160051c820191505b818110156142da578281556001016142c7565b505050505050565b81516001600160401b038111156142fb576142fb613e6c565b61430f8161430984546141c8565b84614294565b602080601f831160018114614344576000841561432c5750858301515b600019600386901b1c1916600185901b1785556142da565b600085815260208120601f198616915b8281101561437357888601518255948401946001909101908401614354565b50858210156143915787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60008083546143af816141c8565b600182811680156143c757600181146143dc5761440b565b60ff198416875282151583028701945061440b565b8760005260208060002060005b858110156144025781548a8201529084019082016143e9565b50505082870194505b50929695505050505050565b60008251614429818460208701613c43565b9190910192915050565b634e487b7160e01b600052602160045260246000fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b83815260406020820152600061415b604083018486614449565b6000835161449e818460208801613c43565b8351908301906144b2818360208801613c43565b01949350505050565b6000602082840312156144cd57600080fd5b611ea382614099565b600060c082360312156144e857600080fd5b6144f0613e82565b8235815260208301356001600160401b038082111561450e57600080fd5b61451a36838701613eaa565b602084015261452b60408601614099565b6040840152606085013560608401526080850135608084015260a085013591508082111561455857600080fd5b5061456536828601613eaa565b60a08301525092915050565b6000808335601e1984360301811261458857600080fd5b8301803591506001600160401b038211156145a257600080fd5b60200191503681900382131561340c57600080fd5b6001600160401b038311156145ce576145ce613e6c565b6145e2836145dc83546141c8565b83614294565b6000601f84116001811461461657600085156145fe5750838201355b600019600387901b1c1916600186901b17835561368a565b600083815260209020601f19861690835b828110156146475786850135825560209485019460019092019101614627565b50868210156146645760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b6000808335601e1984360301811261468d57600080fd5b83016020810192503590506001600160401b038111156146ac57600080fd5b80360382131561340c57600080fd5b602081528135602082015260006146d56020840184614676565b60c060408501526146ea60e085018284614449565b9150506146f960408501614099565b1515606084015260608401356080840152608084013560a084015261472160a0850185614676565b848303601f190160c0860152614738838284614449565b9695505050505050565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161480c816017850160208801613c43565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161483d816028840160208801613c43565b01602801949350505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b8082028115828204841417610aec57610aec614229565b6000816148c1576148c1614229565b506000190190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061473890830184613c67565b60006020828403121561490e57600080fd5b8151611ea381613bf7565b634e487b7160e01b600052603160045260246000fdfec333ad7c59d0314e06cdfc5ceb07dfd5c920357439ea113d519954117258ede2a264697066735822122078cf00f694bd898b8e2c4b69bf249a514ddb98d91afca9c8fcd43d80993400d264736f6c63430008130033000000000000000000000000000000000000000000000000000000000000008000000000000000000000000075550541fc0f9f8601ec21bf14bab7b8f5e2bdb3000000000000000000000000f12cd914a5e1c74408014b83022ba16f8e95711a000000000000000000000000b4a2994802c46d7bd3d3ea2eda50a583610e2757000000000000000000000000000000000000000000000000000000000000004568747470733a2f2f636f646573656b61692d6172742d61737365742e73332e61702d736f757468656173742d312e616d617a6f6e6177732e636f6d2f6d657461646174612f000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106103505760003560e01c80635b46c0e2116101c6578063b88d4fde116100f7578063dfb955fb11610095578063f2fde38b1161006f578063f2fde38b14610a36578063f5633ba214610a56578063fa6ad33514610a76578063ff3fc2da14610ace57600080fd5b8063dfb955fb14610998578063e3faad94146109b8578063e985e9c5146109ed57600080fd5b8063cc33c875116100d1578063cc33c87514610900578063d53913931461092f578063d547741f14610963578063d547cfb71461098357600080fd5b8063b88d4fde146108a0578063bdacb303146108c0578063c87b56dd146108e057600080fd5b8063902d55a511610164578063a217fddf1161013e578063a217fddf1461081c578063a22cb46514610831578063a319e93314610851578063a41572961461087357600080fd5b8063902d55a5146107d157806391d14854146107e757806395d89b411461080757600080fd5b806370a08231116101a057806370a0823114610756578063715018a61461077657806384b0196e1461078b5780638da5cb5b146107b357600080fd5b80635b46c0e2146106f65780636352211e146107165780636a4b88831461073657600080fd5b8063319c2e24116102a05780634bc66f321161023e5780634f6ccce7116102185780634f6ccce7146106745780635301b9aa1461069457806355f804b3146106c157806356189236146106e157600080fd5b80634bc66f32146106065780634ce74859146106265780634de4c9b31461064657600080fd5b806336b19cd71161027a57806336b19cd71461059057806342842e0e146105b057806342966c68146105d0578063488cacbd146105f057600080fd5b8063319c2e2414610530578063350829331461055057806336568abe1461057057600080fd5b80631e1b4c441161030d57806328444381116102e757806328444381146104b0578063288234d5146104d05780632f2ff15d146104f05780632f745c591461051057600080fd5b80631e1b4c441461044557806323b872dd14610460578063248a9ca31461048057600080fd5b806301ffc9a714610355578063028ad8961461038a57806306fdde03146103b7578063081812fc146103cc578063095ea7b31461040457806318160ddd14610426575b600080fd5b34801561036157600080fd5b50610375610370366004613c0d565b610ae1565b60405190151581526020015b60405180910390f35b34801561039657600080fd5b506103aa6103a5366004613c2a565b610af2565b6040516103819190613c93565b3480156103c357600080fd5b506103aa610b9e565b3480156103d857600080fd5b506103ec6103e7366004613c2a565b610c30565b6040516001600160a01b039091168152602001610381565b34801561041057600080fd5b5061042461041f366004613cc2565b610c57565b005b34801561043257600080fd5b50600a545b604051908152602001610381565b34801561045157600080fd5b506104376605543df729c00081565b34801561046c57600080fd5b5061042461047b366004613cec565b610d71565b34801561048c57600080fd5b5061043761049b366004613c2a565b6000908152600c602052604090206001015490565b3480156104bc57600080fd5b506104246104cb366004613d28565b610da1565b3480156104dc57600080fd5b506104246104eb366004613d6b565b610f56565b3480156104fc57600080fd5b5061042461050b366004613d86565b61100a565b34801561051c57600080fd5b5061043761052b366004613cc2565b61102c565b34801561053c57600080fd5b5061042461054b366004613c2a565b6110c2565b34801561055c57600080fd5b5061042461056b366004613d6b565b611162565b34801561057c57600080fd5b5061042461058b366004613d86565b61120c565b34801561059c57600080fd5b506010546103ec906001600160a01b031681565b3480156105bc57600080fd5b506104246105cb366004613cec565b611298565b3480156105dc57600080fd5b506104246105eb366004613c2a565b6112c8565b3480156105fc57600080fd5b5061043760155481565b34801561061257600080fd5b506013546103ec906001600160a01b031681565b34801561063257600080fd5b506011546103ec906001600160a01b031681565b34801561065257600080fd5b50610666610661366004613db2565b611326565b604051610381929190613de5565b34801561068057600080fd5b5061043761068f366004613c2a565b6115bd565b3480156106a057600080fd5b506104376106af366004613d6b565b601c6020526000908152604090205481565b3480156106cd57600080fd5b506104246106dc366004613f36565b611650565b3480156106ed57600080fd5b506104376117aa565b34801561070257600080fd5b50610424610711366004613d6b565b6117ba565b34801561072257600080fd5b506103ec610731366004613c2a565b61186d565b34801561074257600080fd5b50610424610751366004613f6a565b6118cd565b34801561076257600080fd5b50610437610771366004613d6b565b611b97565b34801561078257600080fd5b50610424611c1d565b34801561079757600080fd5b506107a0611c31565b6040516103819796959493929190614003565b3480156107bf57600080fd5b50600d546001600160a01b03166103ec565b3480156107dd57600080fd5b506104376115b381565b3480156107f357600080fd5b50610375610802366004613d86565b611cba565b34801561081357600080fd5b506103aa611ce5565b34801561082857600080fd5b50610437600081565b34801561083d57600080fd5b5061042461084c3660046140a9565b611cf4565b34801561085d57600080fd5b5061043760008051602061493083398151915281565b34801561087f57600080fd5b506103aa604051806040016040528060018152602001603160f81b81525081565b3480156108ac57600080fd5b506104246108bb3660046140d3565b611cff565b3480156108cc57600080fd5b506104246108db366004613d6b565b611d36565b3480156108ec57600080fd5b506103aa6108fb366004613c2a565b611e43565b34801561090c57600080fd5b5061092061091b366004613c2a565b611eaa565b6040516103819392919061413a565b34801561093b57600080fd5b506104377f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b34801561096f57600080fd5b5061042461097e366004613d86565b611f59565b34801561098f57600080fd5b506103aa611f7b565b3480156109a457600080fd5b506012546103ec906001600160a01b031681565b3480156109c457600080fd5b506103aa60405180604001604052806009815260200168434f444553454b414960b81b81525081565b3480156109f957600080fd5b50610375610a08366004614164565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b348015610a4257600080fd5b50610424610a51366004613d6b565b612009565b348015610a6257600080fd5b50610375610a71366004613c2a565b61207f565b348015610a8257600080fd5b50601654601754601854601954601a54601b54610aa195949392919086565b604080519687526020870195909552938501929092526060840152608083015260a082015260c001610381565b610424610adc36600461418e565b6120a3565b6000610aec826123f2565b92915050565b6060610afd82612417565b6000828152601d602052604090206002018054610b19906141c8565b80601f0160208091040260200160405190810160405280929190818152602001828054610b45906141c8565b8015610b925780601f10610b6757610100808354040283529160200191610b92565b820191906000526020600020905b815481529060010190602001808311610b7557829003601f168201915b50505050509050919050565b606060008054610bad906141c8565b80601f0160208091040260200160405190810160405280929190818152602001828054610bd9906141c8565b8015610c265780601f10610bfb57610100808354040283529160200191610c26565b820191906000526020600020905b815481529060010190602001808311610c0957829003601f168201915b5050505050905090565b6000610c3b82612417565b506000908152600460205260409020546001600160a01b031690565b6000610c628261186d565b9050806001600160a01b0316836001600160a01b031603610cd45760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b0382161480610cf05750610cf08133610a08565b610d625760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610ccb565b610d6c8383612476565b505050565b610d7a8161207f565b610d965760405162461bcd60e51b8152600401610ccb90614202565b610d6c8383836124e4565b600080516020614930833981519152610db981612516565b868611610e015760405162461bcd60e51b8152602060048201526016602482015275696e76616c69642077686974656c6973742074696d6560501b6044820152606401610ccb565b848411610e485760405162461bcd60e51b8152602060048201526015602482015274696e76616c696420776169746c6973742074696d6560581b6044820152606401610ccb565b828211610e8b5760405162461bcd60e51b8152602060048201526011602482015270696e76616c6964206d696e742074696d6560781b6044820152606401610ccb565b8486108015610e9957508284105b610ed75760405162461bcd60e51b815260206004820152600f60248201526e696e76616c696420706572696f647360881b6044820152606401610ccb565b6016879055601786905560188590556019849055601a839055601b8290556040805188815260208101889052808201879052606081018690526080810185905260a08101849052905133917f797278196c2f78691eb428a138fbee4296c7a0612a1581bc95b37de41a7130a3919081900360c00190a250505050505050565b600080516020614930833981519152610f6e81612516565b6001600160a01b038216610fb65760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b6044820152606401610ccb565b601180546001600160a01b038481166001600160a01b031983168117909355604051911691339183907f99d2e723b48ee50423bb3b0401cd4432d2fa651b5afce731a39107fef09621c490600090a4505050565b60008051602061493083398151915261102281612516565b610d6c8383612520565b600061103783611b97565b82106110995760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610ccb565b506001600160a01b03919091166000908152600860209081526040808320938352929052205490565b6000805160206149308339815191526110da81612516565b6605543df729c0008211156111285760405162461bcd60e51b8152602060048201526014602482015273696e76616c696420706f7274616c20707269636560601b6044820152606401610ccb565b6015805490839055604051839082907fba3984dee41c532cd8fc4063e920d18f683f7bde96a041bb6dec6aacd3d40b4290600090a3505050565b600061116d81612516565b6001600160a01b0382166111b95760405162461bcd60e51b8152602060048201526013602482015272125b9d985b1a590818591b5a5b95d85b1b195d606a1b6044820152606401610ccb565b601080546001600160a01b038481166001600160a01b0319831681179093556040519116919082907f9f0ac88be9159761bacf6c9e7c294c397ebf594607f6b3f2f70e7e0841ea68e890600090a3505050565b611217600082611cba565b1561128a5760405162461bcd60e51b815260206004820152603d60248201527f416363657373436f6e74726f6c3a2063616e6e6f742072656e6f756e6365207460448201527f68652044454641554c545f41444d494e5f524f4c45206163636f756e740000006064820152608401610ccb565b61129482826125a6565b5050565b6112a18161207f565b6112bd5760405162461bcd60e51b8152600401610ccb90614202565b610d6c838383612620565b6112d18161207f565b6112ed5760405162461bcd60e51b8152600401610ccb90614202565b6000818152601d6020526040812081815560018101805460ff19169055906113186002830182613ba9565b50506113238161263b565b50565b606060008061133486611b97565b90508085111561137f5760405162461bcd60e51b8152602060048201526016602482015275637572736f72206973206f7574206f662072616e676560501b6044820152606401610ccb565b600084116113cf5760405162461bcd60e51b815260206004820152601a60248201527f726573756c7473506572506167652063616e6e6f7420626520300000000000006044820152606401610ccb565b836113da868361423f565b8111156113ee576113eb868361423f565b90505b806001600160401b0381111561140657611406613e6c565b60405190808252806020026020018201604052801561145357816020015b604080516060808201835260008083526020830152918101919091528152602001906001900390816114245790505b50935060005b818110156115a35760006114718961052b848b614252565b6000818152601d6020526040812060020180549293509091611492906141c8565b80601f01602080910402602001604051908101604052809291908181526020018280546114be906141c8565b801561150b5780601f106114e05761010080835404028352916020019161150b565b820191906000526020600020905b8154815290600101906020018083116114ee57829003601f168201915b50505050509050600061151d8361207f565b90508288858151811061153257611532614265565b602002602001015160000181815250508088858151811061155557611555614265565b602002602001015160200190151590811515815250508188858151811061157e5761157e614265565b602002602001015160400181905250505050808061159b9061427b565b915050611459565b50836115af8288614252565b935093505050935093915050565b60006115c8600a5490565b821061162b5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610ccb565b600a828154811061163e5761163e614265565b90600052602060002001549050919050565b60008051602061493083398151915261166881612516565b81516000036116b15760405162461bcd60e51b8152602060048201526015602482015274496e76616c6964205f62617365546f6b656e55524960581b6044820152606401610ccb565b6000600f80546116c0906141c8565b80601f01602080910402602001604051908101604052809291908181526020018280546116ec906141c8565b80156117395780601f1061170e57610100808354040283529160200191611739565b820191906000526020600020905b81548152906001019060200180831161171c57829003601f168201915b5050505050905082600f908161174f91906142e2565b50600f60405161175f91906143a1565b6040518091039020816040516117759190614417565b604051908190038120907fc73341c723fd9197b17090f0c077cf2bbe4d89f2f7d71969b3a7e5c50d570a3890600090a3505050565b60006117b560145490565b905090565b6000805160206149308339815191526117d281612516565b6001600160a01b03821661181a5760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b6044820152606401610ccb565b601280546001600160a01b038481166001600160a01b0319831681179093556040519116919082907f022bcc736fcce4f2891ebee18957cdaf4834700a089dcca5678fe139be0fdf7690600090a3505050565b6000818152600260205260408120546001600160a01b031680610aec5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610ccb565b6012546001600160a01b0316331461191b5760405162461bcd60e51b81526020600482015260116024820152701c195c9b5a5cdcda5bdb8819195b9a5959607a1b6044820152606401610ccb565b600281600281111561192f5761192f614433565b036119b557601a544210156119755760405162461bcd60e51b815260206004820152600c60248201526b3737ba1039ba30b93a32b21760a11b6044820152606401610ccb565b601b544211156119b05760405162461bcd60e51b815260206004820152600660248201526532b73232b21760d11b6044820152606401610ccb565b611af7565b60008160028111156119c9576119c9614433565b03611a5057601654421015611a125760405162461bcd60e51b815260206004820152600f60248201526e2bb6103737ba1039ba30b93a32b21760891b6044820152606401610ccb565b6017544211156119b05760405162461bcd60e51b81526020600482015260096024820152682bb61032b73232b21760b91b6044820152606401610ccb565b6001816002811115611a6457611a64614433565b03611af757601854421015611ab35760405162461bcd60e51b81526020600482015260156024820152742bb0b4ba3634b9ba103737ba1039ba30b93a32b21760591b6044820152606401610ccb565b601954421115611af75760405162461bcd60e51b815260206004820152600f60248201526e2bb0b4ba3634b9ba1032b73232b21760891b6044820152606401610ccb565b611b378484848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061266992505050565b806002811115611b4957611b49614433565b601454856001600160a01b03167f1d9cc3511fa62c9d237a08f6270194c9a991d958889e2f600b7fa66267a82f21428787604051611b8993929190614472565b60405180910390a450505050565b60006001600160a01b038216611c015760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610ccb565b506001600160a01b031660009081526003602052604090205490565b611c25612734565b611c2f600061278e565b565b600060608082808083611c657f434f444553454b4149000000000000000000000000000000000000000000000960066127e0565b611c907f310000000000000000000000000000000000000000000000000000000000000160076127e0565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b6000918252600c602090815260408084206001600160a01b0393909316845291905290205460ff1690565b606060018054610bad906141c8565b61129433838361288b565b611d088261207f565b611d245760405162461bcd60e51b8152600401610ccb90614202565b611d3084848484612959565b50505050565b600080516020614930833981519152611d4e81612516565b6001600160a01b038216611daf5760405162461bcd60e51b815260206004820152602260248201527f496e76616c6964206e657754696d656c6f636b41646472657373206164647265604482015261737360f01b6064820152608401610ccb565b601380546001600160a01b038481166001600160a01b031983161790925516611de66000805160206149308339815191528261298b565b611dfe60008051602061493083398151915284612520565b826001600160a01b0316816001600160a01b03167f91aa98337922135c1d3ae8654f8d0b938c01a35c402eb21e568af3755e4dcd7960405160405180910390a3505050565b6060611e4e82612417565b6000611e586129f2565b90506000815111611e785760405180602001604052806000815250611ea3565b80611e8284612a01565b604051602001611e9392919061448c565b6040516020818303038152906040525b9392505050565b601d60205260009081526040902080546001820154600283018054929360ff90921692611ed6906141c8565b80601f0160208091040260200160405190810160405280929190818152602001828054611f02906141c8565b8015611f4f5780601f10611f2457610100808354040283529160200191611f4f565b820191906000526020600020905b815481529060010190602001808311611f3257829003601f168201915b5050505050905083565b600080516020614930833981519152611f7181612516565b610d6c838361298b565b600f8054611f88906141c8565b80601f0160208091040260200160405190810160405280929190818152602001828054611fb4906141c8565b80156120015780601f10611fd657610100808354040283529160200191612001565b820191906000526020600020905b815481529060010190602001808311611fe457829003601f168201915b505050505081565b612011612734565b6001600160a01b0381166120765760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610ccb565b6113238161278e565b600061208a82612417565b506000908152601d602052604090206001015460ff1690565b6120ab612a93565b336120b6823561186d565b6001600160a01b0316146120f95760405162461bcd60e51b815260206004820152600a6024820152692737ba1027bbb732b91760b11b6044820152606401610ccb565b61210960608201604083016144bb565b81356000908152601d602052604090206001015490151560ff9091161515036121635760405162461bcd60e51b815260206004820152600c60248201526b29b0b6b29039ba30ba3ab99760a11b6044820152606401610ccb565b806080013542106121a25760405162461bcd60e51b8152602060048201526009602482015268151a5b595cc81bdd5d60ba1b6044820152606401610ccb565b60006121b56121b0836144d6565b612aec565b6011549091506001600160a01b038083169116146122025760405162461bcd60e51b815260206004820152600a6024820152691b9bdd081cda59db995960b21b6044820152606401610ccb565b336000908152601c6020526040812080549161221d8361427b565b919050558260600135146122635760405162461bcd60e51b815260206004820152600d60248201526c496e76616c6964206e6f6e636560981b6044820152606401610ccb565b61227360608301604084016144bb565b1561237a5760155434146122ba5760405162461bcd60e51b815260206004820152600e60248201526d125b9d985b1a5908105b5bdd5b9d60921b6044820152606401610ccb565b6122c76020830183614571565b83356000908152601d60205260409020600201916122e69190836145b7565b506010546040516000916001600160a01b03169034908381818185875af1925050503d8060008114612334576040519150601f19603f3d011682016040523d82523d6000602084013e612339565b606091505b50509050806123785760405162461bcd60e51b815260206004820152600b60248201526a11985a5b1959081cd95b9960aa1b6044820152606401610ccb565b505b61238a60608301604084016144bb565b82356000908152601d602052604090819020600101805460ff1916921515929092179091555133907f50c26df4176583f007fef350b56798e9961ac962ef55bc82d7fddd18468151b0906123df9085906146bb565b60405180910390a2506113236001600e55565b60006001600160e01b03198216637965db0b60e01b1480610aec5750610aec82612b08565b6000818152600260205260409020546001600160a01b03166113235760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610ccb565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906124ab8261186d565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6124ef335b82612b2d565b61250b5760405162461bcd60e51b8152600401610ccb90614742565b610d6c838383612bac565b6113238133612d1d565b61252a8282611cba565b611294576000828152600c602090815260408083206001600160a01b03851684529091529020805460ff191660011790556125623390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6001600160a01b03811633146126165760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610ccb565b611294828261298b565b610d6c83838360405180602001604052806000815250611cff565b612644336124e9565b6126605760405162461bcd60e51b8152600401610ccb90614742565b61132381612d76565b6000612674600a5490565b90506115b381106126b45760405162461bcd60e51b815260206004820152600a6024820152694d617820737570706c7960b01b6044820152606401610ccb565b6126c2601480546001019055565b60006126cd60145490565b60408051606081018252828152600160208083018281528385018981526000878152601d90935294909120835181559051918101805460ff191692151592909217909155915192935091600282019061272690826142e2565b50905050611d308482612e19565b600d546001600160a01b03163314611c2f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ccb565b600d80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b606060ff83146127fa576127f383612e33565b9050610aec565b818054612806906141c8565b80601f0160208091040260200160405190810160405280929190818152602001828054612832906141c8565b801561287f5780601f106128545761010080835404028352916020019161287f565b820191906000526020600020905b81548152906001019060200180831161286257829003601f168201915b50505050509050610aec565b816001600160a01b0316836001600160a01b0316036128ec5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610ccb565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6129633383612b2d565b61297f5760405162461bcd60e51b8152600401610ccb90614742565b611d3084848484612e72565b6129958282611cba565b15611294576000828152600c602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6060600f8054610bad906141c8565b60606000612a0e83612ea5565b60010190506000816001600160401b03811115612a2d57612a2d613e6c565b6040519080825280601f01601f191660200182016040528015612a57576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084612a6157509392505050565b6002600e5403612ae55760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610ccb565b6002600e55565b600080612af883612f7d565b9050611ea3818460a00151613018565b60006001600160e01b0319821663780e9d6360e01b1480610aec5750610aec8261303c565b600080612b398361186d565b9050806001600160a01b0316846001600160a01b03161480612b8057506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b80612ba45750836001600160a01b0316612b9984610c30565b6001600160a01b0316145b949350505050565b826001600160a01b0316612bbf8261186d565b6001600160a01b031614612be55760405162461bcd60e51b8152600401610ccb9061478f565b6001600160a01b038216612c475760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610ccb565b612c54838383600161308c565b826001600160a01b0316612c678261186d565b6001600160a01b031614612c8d5760405162461bcd60e51b8152600401610ccb9061478f565b600081815260046020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260038552838620805460001901905590871680865283862080546001019055868652600290945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b612d278282611cba565b61129457612d3481613098565b612d3f8360206130aa565b604051602001612d509291906147d4565b60408051601f198184030181529082905262461bcd60e51b8252610ccb91600401613c93565b6000612d818261186d565b9050612d9181600084600161308c565b612d9a8261186d565b600083815260046020908152604080832080546001600160a01b03199081169091556001600160a01b0385168085526003845282852080546000190190558785526002909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b611294828260405180602001604052806000815250613245565b60606000612e4083613278565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b612e7d848484612bac565b612e89848484846132a0565b611d305760405162461bcd60e51b8152600401610ccb90614849565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310612ee45772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310612f10576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310612f2e57662386f26fc10000830492506010015b6305f5e1008310612f46576305f5e100830492506008015b6127108310612f5a57612710830492506004015b60648310612f6c576064830492506002015b600a8310610aec5760010192915050565b6000610aec7f1f659cf23b0e6195218a7ba7ae14471abfae0d16ca69b995575f707702723bfb8360000151846020015180519060200120856040015186606001518760800151604051602001612ffd969594939291909586526020860194909452604085019290925215156060840152608083015260a082015260c00190565b604051602081830303815290604052805190602001206133a1565b600080600061302785856133ce565b9150915061303481613413565b509392505050565b60006001600160e01b031982166380ac58cd60e01b148061306d57506001600160e01b03198216635b5e139f60e01b145b80610aec57506301ffc9a760e01b6001600160e01b0319831614610aec565b611d308484848461355d565b6060610aec6001600160a01b03831660145b606060006130b983600261489b565b6130c4906002614252565b6001600160401b038111156130db576130db613e6c565b6040519080825280601f01601f191660200182016040528015613105576020820181803683370190505b509050600360fc1b8160008151811061312057613120614265565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061314f5761314f614265565b60200101906001600160f81b031916908160001a905350600061317384600261489b565b61317e906001614252565b90505b60018111156131f6576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106131b2576131b2614265565b1a60f81b8282815181106131c8576131c8614265565b60200101906001600160f81b031916908160001a90535060049490941c936131ef816148b2565b9050613181565b508315611ea35760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610ccb565b61324f8383613691565b61325c60008484846132a0565b610d6c5760405162461bcd60e51b8152600401610ccb90614849565b600060ff8216601f811115610aec57604051632cd44ac360e21b815260040160405180910390fd5b60006001600160a01b0384163b1561339657604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906132e49033908990889088906004016148c9565b6020604051808303816000875af192505050801561331f575060408051601f3d908101601f1916820190925261331c918101906148fc565b60015b61337c573d80801561334d576040519150601f19603f3d011682016040523d82523d6000602084013e613352565b606091505b5080516000036133745760405162461bcd60e51b8152600401610ccb90614849565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612ba4565b506001949350505050565b6000610aec6133ae61382a565b8360405161190160f01b8152600281019290925260228201526042902090565b60008082516041036134045760208301516040840151606085015160001a6133f887828585613955565b9450945050505061340c565b506000905060025b9250929050565b600081600481111561342757613427614433565b0361342f5750565b600181600481111561344357613443614433565b036134905760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610ccb565b60028160048111156134a4576134a4614433565b036134f15760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610ccb565b600381600481111561350557613505614433565b036113235760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610ccb565b60018111156135cc5760405162461bcd60e51b815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e7365637574697665207472604482015274185b9cd9995c9cc81b9bdd081cdd5c1c1bdc9d1959605a1b6064820152608401610ccb565b816001600160a01b0385166136285761362381600a80546000838152600b60205260408120829055600182018355919091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80155565b61364b565b836001600160a01b0316856001600160a01b03161461364b5761364b8582613a19565b6001600160a01b0384166136675761366281613ab6565b61368a565b846001600160a01b0316846001600160a01b03161461368a5761368a8482613b65565b5050505050565b6001600160a01b0382166136e75760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610ccb565b6000818152600260205260409020546001600160a01b03161561374c5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610ccb565b61375a60008383600161308c565b6000818152600260205260409020546001600160a01b0316156137bf5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610ccb565b6001600160a01b038216600081815260036020908152604080832080546001019055848352600290915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000306001600160a01b037f0000000000000000000000000d7d3a744da812c51b489e0b2e5b88fc38a842561614801561388357507f000000000000000000000000000000000000000000000000000000000000000146145b156138ad57507f03b44d9b4a446148bea0ff5c522273d9d90f25db4ed7cc35f18e7003ac0fd9b690565b6117b5604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f7693a2e17e78f0447d28587fc26d4921d42e5bed8b7f75a9e7bbaa048823e565918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561398c5750600090506003613a10565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156139e0573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116613a0957600060019250925050613a10565b9150600090505b94509492505050565b60006001613a2684611b97565b613a30919061423f565b600083815260096020526040902054909150808214613a83576001600160a01b03841660009081526008602090815260408083208584528252808320548484528184208190558352600990915290208190555b5060009182526009602090815260408084208490556001600160a01b039094168352600881528383209183525290812055565b600a54600090613ac89060019061423f565b6000838152600b6020526040812054600a8054939450909284908110613af057613af0614265565b9060005260206000200154905080600a8381548110613b1157613b11614265565b6000918252602080832090910192909255828152600b9091526040808220849055858252812055600a805480613b4957613b49614919565b6001900381819060005260206000200160009055905550505050565b6000613b7083611b97565b6001600160a01b039093166000908152600860209081526040808320868452825280832085905593825260099052919091209190915550565b508054613bb5906141c8565b6000825580601f10613bc5575050565b601f01602090049060005260206000209081019061132391905b80821115613bf35760008155600101613bdf565b5090565b6001600160e01b03198116811461132357600080fd5b600060208284031215613c1f57600080fd5b8135611ea381613bf7565b600060208284031215613c3c57600080fd5b5035919050565b60005b83811015613c5e578181015183820152602001613c46565b50506000910152565b60008151808452613c7f816020860160208601613c43565b601f01601f19169290920160200192915050565b602081526000611ea36020830184613c67565b80356001600160a01b0381168114613cbd57600080fd5b919050565b60008060408385031215613cd557600080fd5b613cde83613ca6565b946020939093013593505050565b600080600060608486031215613d0157600080fd5b613d0a84613ca6565b9250613d1860208501613ca6565b9150604084013590509250925092565b60008060008060008060c08789031215613d4157600080fd5b505084359660208601359650604086013595606081013595506080810135945060a0013592509050565b600060208284031215613d7d57600080fd5b611ea382613ca6565b60008060408385031215613d9957600080fd5b82359150613da960208401613ca6565b90509250929050565b600080600060608486031215613dc757600080fd5b613dd084613ca6565b95602085013595506040909401359392505050565b60006040808301818452808651808352606092508286019150828160051b8701016020808a0160005b84811015613e5757898403605f1901865281518051855283810151151584860152880151888501889052613e4488860182613c67565b9684019694505090820190600101613e0e565b50509690960196909652509295945050505050565b634e487b7160e01b600052604160045260246000fd5b60405160c081016001600160401b0381118282101715613ea457613ea4613e6c565b60405290565b600082601f830112613ebb57600080fd5b81356001600160401b0380821115613ed557613ed5613e6c565b604051601f8301601f19908116603f01168101908282118183101715613efd57613efd613e6c565b81604052838152866020858801011115613f1657600080fd5b836020870160208301376000602085830101528094505050505092915050565b600060208284031215613f4857600080fd5b81356001600160401b03811115613f5e57600080fd5b612ba484828501613eaa565b60008060008060608587031215613f8057600080fd5b613f8985613ca6565b935060208501356001600160401b0380821115613fa557600080fd5b818701915087601f830112613fb957600080fd5b813581811115613fc857600080fd5b886020828501011115613fda57600080fd5b602083019550809450505050604085013560038110613ff857600080fd5b939692955090935050565b60ff60f81b881681526000602060e08184015261402360e084018a613c67565b8381036040850152614035818a613c67565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825283870192509083019060005b818110156140875783518352928401929184019160010161406b565b50909c9b505050505050505050505050565b80358015158114613cbd57600080fd5b600080604083850312156140bc57600080fd5b6140c583613ca6565b9150613da960208401614099565b600080600080608085870312156140e957600080fd5b6140f285613ca6565b935061410060208601613ca6565b92506040850135915060608501356001600160401b0381111561412257600080fd5b61412e87828801613eaa565b91505092959194509250565b838152821515602082015260606040820152600061415b6060830184613c67565b95945050505050565b6000806040838503121561417757600080fd5b61418083613ca6565b9150613da960208401613ca6565b6000602082840312156141a057600080fd5b81356001600160401b038111156141b657600080fd5b820160c08185031215611ea357600080fd5b600181811c908216806141dc57607f821691505b6020821081036141fc57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252600d908201526c6e6f7420617661696c61626c6560981b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b81810381811115610aec57610aec614229565b80820180821115610aec57610aec614229565b634e487b7160e01b600052603260045260246000fd5b60006001820161428d5761428d614229565b5060010190565b601f821115610d6c57600081815260208120601f850160051c810160208610156142bb5750805b601f850160051c820191505b818110156142da578281556001016142c7565b505050505050565b81516001600160401b038111156142fb576142fb613e6c565b61430f8161430984546141c8565b84614294565b602080601f831160018114614344576000841561432c5750858301515b600019600386901b1c1916600185901b1785556142da565b600085815260208120601f198616915b8281101561437357888601518255948401946001909101908401614354565b50858210156143915787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60008083546143af816141c8565b600182811680156143c757600181146143dc5761440b565b60ff198416875282151583028701945061440b565b8760005260208060002060005b858110156144025781548a8201529084019082016143e9565b50505082870194505b50929695505050505050565b60008251614429818460208701613c43565b9190910192915050565b634e487b7160e01b600052602160045260246000fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b83815260406020820152600061415b604083018486614449565b6000835161449e818460208801613c43565b8351908301906144b2818360208801613c43565b01949350505050565b6000602082840312156144cd57600080fd5b611ea382614099565b600060c082360312156144e857600080fd5b6144f0613e82565b8235815260208301356001600160401b038082111561450e57600080fd5b61451a36838701613eaa565b602084015261452b60408601614099565b6040840152606085013560608401526080850135608084015260a085013591508082111561455857600080fd5b5061456536828601613eaa565b60a08301525092915050565b6000808335601e1984360301811261458857600080fd5b8301803591506001600160401b038211156145a257600080fd5b60200191503681900382131561340c57600080fd5b6001600160401b038311156145ce576145ce613e6c565b6145e2836145dc83546141c8565b83614294565b6000601f84116001811461461657600085156145fe5750838201355b600019600387901b1c1916600186901b17835561368a565b600083815260209020601f19861690835b828110156146475786850135825560209485019460019092019101614627565b50868210156146645760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b6000808335601e1984360301811261468d57600080fd5b83016020810192503590506001600160401b038111156146ac57600080fd5b80360382131561340c57600080fd5b602081528135602082015260006146d56020840184614676565b60c060408501526146ea60e085018284614449565b9150506146f960408501614099565b1515606084015260608401356080840152608084013560a084015261472160a0850185614676565b848303601f190160c0860152614738838284614449565b9695505050505050565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161480c816017850160208801613c43565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161483d816028840160208801613c43565b01602801949350505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b8082028115828204841417610aec57610aec614229565b6000816148c1576148c1614229565b506000190190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061473890830184613c67565b60006020828403121561490e57600080fd5b8151611ea381613bf7565b634e487b7160e01b600052603160045260246000fdfec333ad7c59d0314e06cdfc5ceb07dfd5c920357439ea113d519954117258ede2a264697066735822122078cf00f694bd898b8e2c4b69bf249a514ddb98d91afca9c8fcd43d80993400d264736f6c63430008130033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000008000000000000000000000000075550541fc0f9f8601ec21bf14bab7b8f5e2bdb3000000000000000000000000f12cd914a5e1c74408014b83022ba16f8e95711a000000000000000000000000b4a2994802c46d7bd3d3ea2eda50a583610e2757000000000000000000000000000000000000000000000000000000000000004568747470733a2f2f636f646573656b61692d6172742d61737365742e73332e61702d736f757468656173742d312e616d617a6f6e6177732e636f6d2f6d657461646174612f000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _baseTokenUri (string): https://codesekai-art-asset.s3.ap-southeast-1.amazonaws.com/metadata/
Arg [1] : _adminWallet (address): 0x75550541FC0f9f8601EC21BF14BAB7b8F5e2bDB3
Arg [2] : _signWallet (address): 0xf12cd914a5E1c74408014B83022Ba16f8e95711A
Arg [3] : _timelockAddress (address): 0xB4A2994802c46d7bd3d3eA2Eda50a583610e2757
-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [1] : 00000000000000000000000075550541fc0f9f8601ec21bf14bab7b8f5e2bdb3
Arg [2] : 000000000000000000000000f12cd914a5e1c74408014b83022ba16f8e95711a
Arg [3] : 000000000000000000000000b4a2994802c46d7bd3d3ea2eda50a583610e2757
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000045
Arg [5] : 68747470733a2f2f636f646573656b61692d6172742d61737365742e73332e61
Arg [6] : 702d736f757468656173742d312e616d617a6f6e6177732e636f6d2f6d657461
Arg [7] : 646174612f000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.