Token
ERC-721
Overview
Max Total Supply
5
Holders
1
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract
Balance
0Loading...
Loading
Loading...
Loading
Loading...
Loading
Contract Name:
ERC3525MintableUpgradeable3
Compiler Version
v0.8.15+commit.e14f2714
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol"; import "./ERC3525Upgradeable.sol"; contract ERC3525MintableUpgradeable3 is Initializable, ContextUpgradeable, ERC3525Upgradeable { string baseURI; uint public constant NORMAL = 1; uint public constant SPECIAL = 2; uint public constant UNIT = 10; uint mintTokenNum = 1001; function initialize( string memory name_, string memory symbol_, uint8 decimals_ ) public virtual initializer { __ERC3525Mintable_init(name_, symbol_, decimals_); } function __ERC3525Mintable_init( string memory name_, string memory symbol_, uint8 decimals_ ) internal onlyInitializing{ __ERC3525_init_unchained(name_, symbol_, decimals_); } function __ERC3525Mintable_init_unchained() internal onlyInitializing{ } function mint( address mintTo_, uint256 tokenId_, uint256 slot_, uint256 value_ ) public virtual { ERC3525Upgradeable._mint(mintTo_, tokenId_, slot_, value_); } // from slot1 to slot2 function changefromNormalToSpecial( uint256 fromTokenId_, uint256 value_ ) public{ require(slotOf(fromTokenId_) == NORMAL, "slot ID is different"); require(balanceOf(fromTokenId_) >= value_, "too short"); require(ownerOf(fromTokenId_) == msg.sender, "this is not yours"); uint modValue = value_ % UNIT; uint changeValue = value_ - modValue; _burnValue(fromTokenId_, changeValue); mint(msg.sender, mintTokenNum, SPECIAL, changeValue/UNIT); mintTokenNum++; } // from slot2 to slot1 function changefromSpecialToNormal( uint256 fromTokenId_, uint256 toTokenId_ ) public{ require(slotOf(fromTokenId_) == SPECIAL, "slot ID is different"); require(slotOf(toTokenId_) == NORMAL, "slot ID is different"); require(ownerOf(fromTokenId_) == msg.sender, "this is not yours"); mintValue(toTokenId_, balanceOf(fromTokenId_)*UNIT); _burn(fromTokenId_); } function mintValue( uint256 tokenId_, uint256 value_ ) public virtual { ERC3525Upgradeable._mintValue(tokenId_, value_); } function _baseURI() internal view override returns (string memory) { return baseURI; } function setBaseURI(string calldata baseURI_) public{ baseURI = baseURI_; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ``` * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`. */ modifier initializer() { bool isTopLevelCall = !_initializing; require( (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1), "Initializable: contract is already initialized" ); _initialized = 1; if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original * initialization step. This is essential to configure modules that are added through upgrades and that require * initialization. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. */ modifier reinitializer(uint8 version) { require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); _initialized = version; _initializing = true; _; _initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. */ function _disableInitializers() internal virtual { require(!_initializing, "Initializable: contract is initializing"); if (_initialized < type(uint8).max) { _initialized = type(uint8).max; emit Initialized(type(uint8).max); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "./IERC721.sol"; import "./IERC3525.sol"; import "./IERC721Receiver.sol"; import "./IERC3525Receiver.sol"; import "./extensions/IERC721Enumerable.sol"; import "./extensions/IERC721Metadata.sol"; import "./extensions/IERC3525Metadata.sol"; import "./periphery/interface/IERC3525MetadataDescriptor.sol"; contract ERC3525Upgradeable is Initializable, ContextUpgradeable, IERC3525Metadata, IERC721Enumerable { using Strings for address; using Strings for uint256; using AddressUpgradeable for address; event SetMetadataDescriptor(address indexed metadataDescriptor); struct TokenData { uint256 id; uint256 slot; uint256 balance; address owner; address approved; address[] valueApprovals; } struct AddressData { uint256[] ownedTokens; mapping(uint256 => uint256) ownedTokensIndex; mapping(address => bool) approvals; } string private _name; string private _symbol; uint8 private _decimals; // id => (approval => allowance) // @dev _approvedValues cannot be defined within TokenData, cause struct containing mappings cannot be constructed. mapping(uint256 => mapping(address => uint256)) private _approvedValues; TokenData[] private _allTokens; // key: id mapping(uint256 => uint256) private _allTokensIndex; mapping(address => AddressData) private _addressData; IERC3525MetadataDescriptor public metadataDescriptor; // solhint-disable-next-line function __ERC3525_init(string memory name_, string memory symbol_, uint8 decimals_) internal onlyInitializing { __ERC3525_init_unchained(name_, symbol_, decimals_); } // solhint-disable-next-line function __ERC3525_init_unchained(string memory name_, string memory symbol_, uint8 decimals_) internal onlyInitializing { _name = name_; _symbol = symbol_; _decimals = decimals_; } function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId || interfaceId == type(IERC3525).interfaceId || interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC3525Metadata).interfaceId || interfaceId == type(IERC721Enumerable).interfaceId || interfaceId == type(IERC721Metadata).interfaceId; } /** * @dev Returns the token collection name. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the token collection symbol. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals the token uses for value. */ function valueDecimals() public view virtual override returns (uint8) { return _decimals; } function balanceOf(uint256 tokenId_) public view virtual override returns (uint256) { _requireMinted(tokenId_); return _allTokens[_allTokensIndex[tokenId_]].balance; } function ownerOf(uint256 tokenId_) public view virtual override returns (address owner_) { _requireMinted(tokenId_); owner_ = _allTokens[_allTokensIndex[tokenId_]].owner; require(owner_ != address(0), "ERC3525: invalid token ID"); } function slotOf(uint256 tokenId_) public view virtual override returns (uint256) { _requireMinted(tokenId_); return _allTokens[_allTokensIndex[tokenId_]].slot; } function _baseURI() internal view virtual returns (string memory) { return ""; } function contractURI() public view virtual override returns (string memory) { string memory baseURI = _baseURI(); return address(metadataDescriptor) != address(0) ? metadataDescriptor.constructContractURI() : bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, "contract/", Strings.toHexString(address(this)))) : ""; } function slotURI(uint256 slot_) public view virtual override returns (string memory) { string memory baseURI = _baseURI(); return address(metadataDescriptor) != address(0) ? metadataDescriptor.constructSlotURI(slot_) : bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, "slot/", slot_.toString())) : ""; } /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId_) public view virtual override returns (string memory) { _requireMinted(tokenId_); string memory baseURI = _baseURI(); return address(metadataDescriptor) != address(0) ? metadataDescriptor.constructTokenURI(tokenId_) : bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId_.toString())) : ""; } function approve(uint256 tokenId_, address to_, uint256 value_) public payable virtual override { address owner = ERC3525Upgradeable.ownerOf(tokenId_); require(to_ != owner, "ERC3525: approval to current owner"); require( _msgSender() == owner || ERC3525Upgradeable.isApprovedForAll(owner, _msgSender()), "ERC3525: approve caller is not owner nor approved for all" ); _approveValue(tokenId_, to_, value_); } function allowance(uint256 tokenId_, address operator_) public view virtual override returns (uint256) { _requireMinted(tokenId_); return _approvedValues[tokenId_][operator_]; } function transferFrom( uint256 fromTokenId_, address to_, uint256 value_ ) public payable virtual override returns (uint256) { _spendAllowance(_msgSender(), fromTokenId_, value_); uint256 newTokenId = _createDerivedTokenId(fromTokenId_); _mint(to_, newTokenId, ERC3525Upgradeable.slotOf(fromTokenId_), 0); _transferValue(fromTokenId_, newTokenId, value_); return newTokenId; } function transferFrom( uint256 fromTokenId_, uint256 toTokenId_, uint256 value_ ) public payable virtual override { _spendAllowance(_msgSender(), fromTokenId_, value_); _transferValue(fromTokenId_, toTokenId_, value_); } function balanceOf(address owner_) public view virtual override returns (uint256 balance) { require(owner_ != address(0), "ERC3525: balance query for the zero address"); return _addressData[owner_].ownedTokens.length; } function transferFrom( address from_, address to_, uint256 tokenId_ ) public payable virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId_), "ERC3525: transfer caller is not owner nor approved"); _transferTokenId(from_, to_, tokenId_); } function safeTransferFrom( address from_, address to_, uint256 tokenId_, bytes memory data_ ) public payable virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId_), "ERC3525: transfer caller is not owner nor approved"); _safeTransferTokenId(from_, to_, tokenId_, data_); } function safeTransferFrom( address from_, address to_, uint256 tokenId_ ) public payable virtual override { safeTransferFrom(from_, to_, tokenId_, ""); } function approve(address to_, uint256 tokenId_) public payable virtual override { address owner = ERC3525Upgradeable.ownerOf(tokenId_); require(to_ != owner, "ERC3525: approval to current owner"); require( _msgSender() == owner || ERC3525Upgradeable.isApprovedForAll(owner, _msgSender()), "ERC3525: approve caller is not owner nor approved for all" ); _approve(to_, tokenId_); } function getApproved(uint256 tokenId_) public view virtual override returns (address) { _requireMinted(tokenId_); return _allTokens[_allTokensIndex[tokenId_]].approved; } function setApprovalForAll(address operator_, bool approved_) public virtual override { _setApprovalForAll(_msgSender(), operator_, approved_); } function isApprovedForAll(address owner_, address operator_) public view virtual override returns (bool) { return _addressData[owner_].approvals[operator_]; } function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } function tokenByIndex(uint256 index_) public view virtual override returns (uint256) { require(index_ < ERC3525Upgradeable.totalSupply(), "ERC3525: global index out of bounds"); return _allTokens[index_].id; } function tokenOfOwnerByIndex(address owner_, uint256 index_) public view virtual override returns (uint256) { require(index_ < ERC3525Upgradeable.balanceOf(owner_), "ERC3525: owner index out of bounds"); return _addressData[owner_].ownedTokens[index_]; } function _setApprovalForAll( address owner_, address operator_, bool approved_ ) internal virtual { require(owner_ != operator_, "ERC3525: approve to caller"); _addressData[owner_].approvals[operator_] = approved_; emit ApprovalForAll(owner_, operator_, approved_); } function _isApprovedOrOwner(address operator_, uint256 tokenId_) internal view virtual returns (bool) { _requireMinted(tokenId_); address owner = ERC3525Upgradeable.ownerOf(tokenId_); return ( operator_ == owner || ERC3525Upgradeable.isApprovedForAll(owner, operator_) || ERC3525Upgradeable.getApproved(tokenId_) == operator_ ); } function _spendAllowance(address operator_, uint256 tokenId_, uint256 value_) internal virtual { uint256 currentAllowance = ERC3525Upgradeable.allowance(tokenId_, operator_); if (!_isApprovedOrOwner(operator_, tokenId_) && currentAllowance != type(uint256).max) { require(currentAllowance >= value_, "ERC3525: insufficient allowance"); _approveValue(tokenId_, operator_, currentAllowance - value_); } } function _exists(uint256 tokenId_) internal view virtual returns (bool) { return _allTokens.length != 0 && _allTokens[_allTokensIndex[tokenId_]].id == tokenId_; } function _requireMinted(uint256 tokenId_) internal view virtual { require(_exists(tokenId_), "ERC3525: invalid token ID"); } function _mint(address to_, uint256 slot_, uint256 value_) internal virtual returns (uint256) { uint256 tokenId = _createOriginalTokenId(); _mint(to_, tokenId, slot_, value_); return tokenId; } function _mint(address to_, uint256 tokenId_, uint256 slot_, uint256 value_) internal virtual { require(to_ != address(0), "ERC3525: mint to the zero address"); require(tokenId_ != 0, "ERC3525: cannot mint zero tokenId"); require(!_exists(tokenId_), "ERC3525: token already minted"); _beforeValueTransfer(address(0), to_, 0, tokenId_, slot_, value_); __mintToken(to_, tokenId_, slot_); __mintValue(tokenId_, value_); _afterValueTransfer(address(0), to_, 0, tokenId_, slot_, value_); } function _mintValue(uint256 tokenId_, uint256 value_) internal virtual { _requireMinted(tokenId_); address owner = ERC3525Upgradeable.ownerOf(tokenId_); uint256 slot = ERC3525Upgradeable.slotOf(tokenId_); _beforeValueTransfer(address(0), owner, 0, tokenId_, slot, value_); __mintValue(tokenId_, value_); _afterValueTransfer(address(0), owner, 0, tokenId_, slot, value_); } function __mintValue(uint256 tokenId_, uint256 value_) private { _allTokens[_allTokensIndex[tokenId_]].balance += value_; emit TransferValue(0, tokenId_, value_); } function __mintToken(address to_, uint256 tokenId_, uint256 slot_) private { TokenData memory tokenData = TokenData({ id: tokenId_, slot: slot_, balance: 0, owner: to_, approved: address(0), valueApprovals: new address[](0) }); _addTokenToAllTokensEnumeration(tokenData); _addTokenToOwnerEnumeration(to_, tokenId_); emit Transfer(address(0), to_, tokenId_); emit SlotChanged(tokenId_, 0, slot_); } function _burn(uint256 tokenId_) internal virtual { _requireMinted(tokenId_); TokenData storage tokenData = _allTokens[_allTokensIndex[tokenId_]]; address owner = tokenData.owner; uint256 slot = tokenData.slot; uint256 value = tokenData.balance; _beforeValueTransfer(owner, address(0), tokenId_, 0, slot, value); _clearApprovedValues(tokenId_); _removeTokenFromOwnerEnumeration(owner, tokenId_); _removeTokenFromAllTokensEnumeration(tokenId_); emit TransferValue(tokenId_, 0, value); emit SlotChanged(tokenId_, slot, 0); emit Transfer(owner, address(0), tokenId_); _afterValueTransfer(owner, address(0), tokenId_, 0, slot, value); } function _burnValue(uint256 tokenId_, uint256 burnValue_) internal virtual { _requireMinted(tokenId_); TokenData storage tokenData = _allTokens[_allTokensIndex[tokenId_]]; address owner = tokenData.owner; uint256 slot = tokenData.slot; uint256 value = tokenData.balance; require(value >= burnValue_, "ERC3525: burn value exceeds balance"); _beforeValueTransfer(owner, address(0), tokenId_, 0, slot, burnValue_); tokenData.balance -= burnValue_; emit TransferValue(tokenId_, 0, burnValue_); _afterValueTransfer(owner, address(0), tokenId_, 0, slot, burnValue_); } function _addTokenToOwnerEnumeration(address to_, uint256 tokenId_) private { _allTokens[_allTokensIndex[tokenId_]].owner = to_; _addressData[to_].ownedTokensIndex[tokenId_] = _addressData[to_].ownedTokens.length; _addressData[to_].ownedTokens.push(tokenId_); } function _removeTokenFromOwnerEnumeration(address from_, uint256 tokenId_) private { _allTokens[_allTokensIndex[tokenId_]].owner = address(0); AddressData storage ownerData = _addressData[from_]; uint256 lastTokenIndex = ownerData.ownedTokens.length - 1; uint256 lastTokenId = ownerData.ownedTokens[lastTokenIndex]; uint256 tokenIndex = ownerData.ownedTokensIndex[tokenId_]; ownerData.ownedTokens[tokenIndex] = lastTokenId; ownerData.ownedTokensIndex[lastTokenId] = tokenIndex; delete ownerData.ownedTokensIndex[tokenId_]; ownerData.ownedTokens.pop(); } function _addTokenToAllTokensEnumeration(TokenData memory tokenData_) private { _allTokensIndex[tokenData_.id] = _allTokens.length; _allTokens.push(tokenData_); } 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) TokenData memory lastTokenData = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenData; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenData.id] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId_]; _allTokens.pop(); } function _approve(address to_, uint256 tokenId_) internal virtual { _allTokens[_allTokensIndex[tokenId_]].approved = to_; emit Approval(ERC3525Upgradeable.ownerOf(tokenId_), to_, tokenId_); } function _approveValue( uint256 tokenId_, address to_, uint256 value_ ) internal virtual { require(to_ != address(0), "ERC3525: approve value to the zero address"); if (!_existApproveValue(to_, tokenId_)) { _allTokens[_allTokensIndex[tokenId_]].valueApprovals.push(to_); } _approvedValues[tokenId_][to_] = value_; emit ApprovalValue(tokenId_, to_, value_); } function _clearApprovedValues(uint256 tokenId_) internal virtual { TokenData storage tokenData = _allTokens[_allTokensIndex[tokenId_]]; uint256 length = tokenData.valueApprovals.length; for (uint256 i = 0; i < length; i++) { address approval = tokenData.valueApprovals[i]; delete _approvedValues[tokenId_][approval]; } } function _existApproveValue(address to_, uint256 tokenId_) internal view virtual returns (bool) { uint256 length = _allTokens[_allTokensIndex[tokenId_]].valueApprovals.length; for (uint256 i = 0; i < length; i++) { if (_allTokens[_allTokensIndex[tokenId_]].valueApprovals[i] == to_) { return true; } } return false; } function _transferValue( uint256 fromTokenId_, uint256 toTokenId_, uint256 value_ ) internal virtual { require(_exists(fromTokenId_), "ERC3525: transfer from invalid token ID"); require(_exists(toTokenId_), "ERC3525: transfer to invalid token ID"); TokenData storage fromTokenData = _allTokens[_allTokensIndex[fromTokenId_]]; TokenData storage toTokenData = _allTokens[_allTokensIndex[toTokenId_]]; require(fromTokenData.balance >= value_, "ERC3525: insufficient balance for transfer"); require(fromTokenData.slot == toTokenData.slot, "ERC3525: transfer to token with different slot"); _beforeValueTransfer( fromTokenData.owner, toTokenData.owner, fromTokenId_, toTokenId_, fromTokenData.slot, value_ ); fromTokenData.balance -= value_; toTokenData.balance += value_; emit TransferValue(fromTokenId_, toTokenId_, value_); _afterValueTransfer( fromTokenData.owner, toTokenData.owner, fromTokenId_, toTokenId_, fromTokenData.slot, value_ ); require( _checkOnERC3525Received(fromTokenId_, toTokenId_, value_, ""), "ERC3525: transfer to non ERC3525Receiver" ); } function _transferTokenId( address from_, address to_, uint256 tokenId_ ) internal virtual { require(ERC3525Upgradeable.ownerOf(tokenId_) == from_, "ERC3525: transfer from invalid owner"); require(to_ != address(0), "ERC3525: transfer to the zero address"); uint256 slot = ERC3525Upgradeable.slotOf(tokenId_); uint256 value = ERC3525Upgradeable.balanceOf(tokenId_); _beforeValueTransfer(from_, to_, tokenId_, tokenId_, slot, value); _approve(address(0), tokenId_); _clearApprovedValues(tokenId_); _removeTokenFromOwnerEnumeration(from_, tokenId_); _addTokenToOwnerEnumeration(to_, tokenId_); emit Transfer(from_, to_, tokenId_); _afterValueTransfer(from_, to_, tokenId_, tokenId_, slot, value); } function _safeTransferTokenId( address from_, address to_, uint256 tokenId_, bytes memory data_ ) internal virtual { _transferTokenId(from_, to_, tokenId_); require( _checkOnERC721Received(from_, to_, tokenId_, data_), "ERC3525: transfer to non ERC721Receiver" ); } function _checkOnERC3525Received( uint256 fromTokenId_, uint256 toTokenId_, uint256 value_, bytes memory data_ ) private returns (bool) { address to = ERC3525Upgradeable.ownerOf(toTokenId_); if (to.isContract() && IERC165(to).supportsInterface(type(IERC3525Receiver).interfaceId)) { try IERC3525Receiver(to).onERC3525Received(_msgSender(), fromTokenId_, toTokenId_, value_, data_) returns (bytes4 retval) { return retval == IERC3525Receiver.onERC3525Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert( "ERC3525: transfer to non ERC3525Receiver"); } else { // solhint-disable-next-line assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @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() && IERC165(to_).supportsInterface(type(IERC721Receiver).interfaceId)) { 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"); } else { // solhint-disable-next-line assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /* solhint-disable */ function _beforeValueTransfer( address from_, address to_, uint256 fromTokenId_, uint256 toTokenId_, uint256 slot_, uint256 value_ ) internal virtual {} function _afterValueTransfer( address from_, address to_, uint256 fromTokenId_, uint256 toTokenId_, uint256 slot_, uint256 value_ ) internal virtual {} /* solhint-enable */ function _setMetadataDescriptor(address metadataDescriptor_) internal virtual { metadataDescriptor = IERC3525MetadataDescriptor(metadataDescriptor_); emit SetMetadataDescriptor(metadataDescriptor_); } function _createOriginalTokenId() internal virtual returns (uint256) { return _createDefaultTokenId(); } function _createDerivedTokenId(uint256 fromTokenId_) internal virtual returns (uint256) { fromTokenId_; return _createDefaultTokenId(); } function _createDefaultTokenId() private view returns (uint256) { return ERC3525Upgradeable.totalSupply() + 1; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. */ uint256[42] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @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/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable { function __ERC165_init() internal onlyInitializing { } function __ERC165_init_unchained() internal onlyInitializing { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165Upgradeable).interfaceId; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; /** * @title ERC-721 Non-Fungible Token Standard * @dev See https://eips.ethereum.org/EIPS/eip-721 * Note: the ERC-165 identifier for this interface is 0x80ac58cd. */ interface IERC721 is IERC165 { /** * @dev This emits when ownership of any NFT changes by any mechanism. * This event emits when NFTs are created (`from` == 0) and destroyed * (`to` == 0). Exception: during contract creation, any number of NFTs * may be created and assigned without emitting Transfer. At the time of * any transfer, the approved address for that NFT (if any) is reset to none. */ event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId); /** * @dev This emits when the approved address for an NFT is changed or * reaffirmed. The zero address indicates there is no approved address. * When a Transfer event emits, this also indicates that the approved * address for that NFT (if any) is reset to none. */ event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId); /** * @dev This emits when an operator is enabled or disabled for an owner. * The operator can manage all NFTs of the owner. */ event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved); /** * @notice Count all NFTs assigned to an owner * @dev NFTs assigned to the zero address are considered invalid, and this * function throws for queries about the zero address. * @param _owner An address for whom to query the balance * @return The number of NFTs owned by `_owner`, possibly zero */ function balanceOf(address _owner) external view returns (uint256); /** * @notice Find the owner of an NFT * @dev NFTs assigned to zero address are considered invalid, and queries * about them do throw. * @param _tokenId The identifier for an NFT * @return The address of the owner of the NFT */ function ownerOf(uint256 _tokenId) external view returns (address); /** * @notice Transfers the ownership of an NFT from one address to another address * @dev Throws unless `msg.sender` is the current owner, an authorized * operator, or the approved address for this NFT. Throws if `_from` is * not the current owner. Throws if `_to` is the zero address. Throws if * `_tokenId` is not a valid NFT. When transfer is complete, this function * checks if `_to` is a smart contract (code size > 0). If so, it calls * `onERC721Received` on `_to` and throws if the return value is not * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`. * @param _from The current owner of the NFT * @param _to The new owner * @param _tokenId The NFT to transfer * @param data Additional data with no specified format, sent in call to `_to` */ function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes calldata data) external payable; /** * @notice Transfers the ownership of an NFT from one address to another address * @dev This works identically to the other function with an extra data parameter, * except this function just sets data to "". * @param _from The current owner of the NFT * @param _to The new owner * @param _tokenId The NFT to transfer */ function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable; /** * @notice Transfer ownership of an NFT -- THE CALLER IS RESPONSIBLE * TO CONFIRM THAT `_to` IS CAPABLE OF RECEIVING NFTS OR ELSE * THEY MAY BE PERMANENTLY LOST * @dev Throws unless `msg.sender` is the current owner, an authorized * operator, or the approved address for this NFT. Throws if `_from` is * not the current owner. Throws if `_to` is the zero address. Throws if * `_tokenId` is not a valid NFT. * @param _from The current owner of the NFT * @param _to The new owner * @param _tokenId The NFT to transfer */ function transferFrom(address _from, address _to, uint256 _tokenId) external payable; /** * @notice Change or reaffirm the approved address for an NFT * @dev The zero address indicates there is no approved address. * Throws unless `msg.sender` is the current NFT owner, or an authorized * operator of the current owner. * @param _approved The new approved NFT controller * @param _tokenId The NFT to approve */ function approve(address _approved, uint256 _tokenId) external payable; /** * @notice Enable or disable approval for a third party ("operator") to manage * all of `msg.sender`'s assets * @dev Emits the ApprovalForAll event. The contract MUST allow * multiple operators per owner. * @param _operator Address to add to the set of authorized operators * @param _approved True if the operator is approved, false to revoke approval */ function setApprovalForAll(address _operator, bool _approved) external; /** * @notice Get the approved address for a single NFT * @dev Throws if `_tokenId` is not a valid NFT. * @param _tokenId The NFT to find the approved address for * @return The approved address for this NFT, or the zero address if there is none */ function getApproved(uint256 _tokenId) external view returns (address); /** * @notice Query if an address is an authorized operator for another address * @param _owner The address that owns the NFTs * @param _operator The address that acts on behalf of the owner * @return True if `_operator` is an approved operator for `_owner`, false otherwise */ function isApprovedForAll(address _owner, address _operator) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; import "./IERC721.sol"; /** * @title ERC-3525 Semi-Fungible Token Standard * @dev See https://eips.ethereum.org/EIPS/eip-3525 * Note: the ERC-165 identifier for this interface is 0xc97ae3d5. */ interface IERC3525 is IERC165, IERC721 { /** * @dev MUST emit when value of a token is transferred to another token with the same slot, * including zero value transfers (_value == 0) as well as transfers when tokens are created * (`_fromTokenId` == 0) or destroyed (`_toTokenId` == 0). * @param _fromTokenId The token id to transfer value from * @param _toTokenId The token id to transfer value to * @param _value The transferred value */ event TransferValue(uint256 indexed _fromTokenId, uint256 indexed _toTokenId, uint256 _value); /** * @dev MUST emits when the approval value of a token is set or changed. * @param _tokenId The token to approve * @param _operator The operator to approve for * @param _value The maximum value that `_operator` is allowed to manage */ event ApprovalValue(uint256 indexed _tokenId, address indexed _operator, uint256 _value); /** * @dev MUST emit when the slot of a token is set or changed. * @param _tokenId The token of which slot is set or changed * @param _oldSlot The previous slot of the token * @param _newSlot The updated slot of the token */ event SlotChanged(uint256 indexed _tokenId, uint256 indexed _oldSlot, uint256 indexed _newSlot); /** * @notice Get the number of decimals the token uses for value - e.g. 6, means the user * representation of the value of a token can be calculated by dividing it by 1,000,000. * Considering the compatibility with third-party wallets, this function is defined as * `valueDecimals()` instead of `decimals()` to avoid conflict with ERC20 tokens. * @return The number of decimals for value */ function valueDecimals() external view returns (uint8); /** * @notice Get the value of a token. * @param _tokenId The token for which to query the balance * @return The value of `_tokenId` */ function balanceOf(uint256 _tokenId) external view returns (uint256); /** * @notice Get the slot of a token. * @param _tokenId The identifier for a token * @return The slot of the token */ function slotOf(uint256 _tokenId) external view returns (uint256); /** * @notice Allow an operator to manage the value of a token, up to the `_value` amount. * @dev MUST revert unless caller is the current owner, an authorized operator, or the approved * address for `_tokenId`. * MUST emit ApprovalValue event. * @param _tokenId The token to approve * @param _operator The operator to be approved * @param _value The maximum value of `_toTokenId` that `_operator` is allowed to manage */ function approve( uint256 _tokenId, address _operator, uint256 _value ) external payable; /** * @notice Get the maximum value of a token that an operator is allowed to manage. * @param _tokenId The token for which to query the allowance * @param _operator The address of an operator * @return The current approval value of `_tokenId` that `_operator` is allowed to manage */ function allowance(uint256 _tokenId, address _operator) external view returns (uint256); /** * @notice Transfer value from a specified token to another specified token with the same slot. * @dev Caller MUST be the current owner, an authorized operator or an operator who has been * approved the whole `_fromTokenId` or part of it. * MUST revert if `_fromTokenId` or `_toTokenId` is zero token id or does not exist. * MUST revert if slots of `_fromTokenId` and `_toTokenId` do not match. * MUST revert if `_value` exceeds the balance of `_fromTokenId` or its allowance to the * operator. * MUST emit `TransferValue` event. * @param _fromTokenId The token to transfer value from * @param _toTokenId The token to transfer value to * @param _value The transferred value */ function transferFrom( uint256 _fromTokenId, uint256 _toTokenId, uint256 _value ) external payable; /** * @notice Transfer value from a specified token to an address. The caller should confirm that * `_to` is capable of receiving ERC3525 tokens. * @dev This function MUST create a new ERC3525 token with the same slot for `_to` to receive * the transferred value. * MUST revert if `_fromTokenId` is zero token id or does not exist. * MUST revert if `_to` is zero address. * MUST revert if `_value` exceeds the balance of `_fromTokenId` or its allowance to the * operator. * MUST emit `Transfer` and `TransferValue` events. * @param _fromTokenId The token to transfer value from * @param _to The address to transfer value to * @param _value The transferred value * @return ID of the new token created for `_to` which receives the transferred value */ function transferFrom( uint256 _fromTokenId, address _to, uint256 _value ) external payable returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers from ERC721 asset contracts. * Note: the ERC-165 identifier for this interface is 0x150b7a02. */ interface IERC721Receiver { /** * @notice Handle the receipt of an NFT * @dev The ERC721 smart contract calls this function on the recipient * after a `transfer`. This function MAY throw to revert and reject the * transfer. Return of other than the magic value MUST result in the * transaction being reverted. * Note: the contract address is always the message sender. * @param _operator The address which called `safeTransferFrom` function * @param _from The address which previously owned the token * @param _tokenId The NFT identifier which is being transferred * @param _data Additional data with no specified format * @return `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` * unless throwing */ function onERC721Received( address _operator, address _from, uint256 _tokenId, bytes calldata _data ) external returns(bytes4); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title EIP-3525 token receiver interface * @dev Interface for a smart contract that wants to be informed by EIP-3525 contracts when * receiving values from ANY addresses or EIP-3525 tokens. * Note: the EIP-165 identifier for this interface is 0x009ce20b. */ interface IERC3525Receiver { /** * @notice Handle the receipt of an EIP-3525 token value. * @dev An EIP-3525 smart contract MUST check whether this function is implemented by the * recipient contract, if the recipient contract implements this function, the EIP-3525 * contract MUST call this function after a value transfer (i.e. `transferFrom(uint256, * uint256,uint256,bytes)`). * MUST return 0x009ce20b (i.e. `bytes4(keccak256('onERC3525Received(address,uint256,uint256, * uint256,bytes)'))`) if the transfer is accepted. * MUST revert or return any value other than 0x009ce20b if the transfer is rejected. * @param _operator The address which triggered the transfer * @param _fromTokenId The token id to transfer value from * @param _toTokenId The token id to transfer value to * @param _value The transferred value * @param _data Additional data with no specified format * @return `bytes4(keccak256('onERC3525Received(address,uint256,uint256,uint256,bytes)'))` * unless the transfer is rejected. */ function onERC3525Received(address _operator, uint256 _fromTokenId, uint256 _toTokenId, uint256 _value, bytes calldata _data) external returns (bytes4); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 * Note: the ERC-165 identifier for this interface is 0x780e9d63. */ interface IERC721Enumerable is IERC721 { /** * @notice Count NFTs tracked by this contract * @return A count of valid NFTs tracked by this contract, where each one of * them has an assigned and queryable owner not equal to the zero address */ function totalSupply() external view returns (uint256); /** * @notice Enumerate valid NFTs * @dev Throws if `_index` >= `totalSupply()`. * @param _index A counter less than `totalSupply()` * @return The token identifier for the `_index`th NFT, * (sort order not specified) */ function tokenByIndex(uint256 _index) external view returns (uint256); /** * @notice Enumerate NFTs assigned to an owner * @dev Throws if `_index` >= `balanceOf(_owner)` or if * `_owner` is the zero address, representing invalid NFTs. * @param _owner An address where we are interested in NFTs owned by them * @param _index A counter less than `balanceOf(_owner)` * @return The token identifier for the `_index`th NFT assigned to `_owner`, * (sort order not specified) */ function tokenOfOwnerByIndex(address _owner, uint256 _index) external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 * Note: the ERC-165 identifier for this interface is 0x5b5e139f. */ interface IERC721Metadata is IERC721 { /** * @notice A descriptive name for a collection of NFTs in this contract */ function name() external view returns (string memory); /** * @notice An abbreviated name for NFTs in this contract */ function symbol() external view returns (string memory); /** * @notice A distinct Uniform Resource Identifier (URI) for a given asset. * @dev Throws if `_tokenId` is not a valid NFT. URIs are defined in RFC * 3986. The URI may point to a JSON file that conforms to the "ERC721 * Metadata JSON Schema". */ function tokenURI(uint256 _tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC3525.sol"; import "./IERC721Metadata.sol"; /** * @title ERC-3525 Semi-Fungible Token Standard, optional extension for metadata * @dev Interfaces for any contract that wants to support query of the Uniform Resource Identifier * (URI) for the ERC3525 contract as well as a specified slot. * Because of the higher reliability of data stored in smart contracts compared to data stored in * centralized systems, it is recommended that metadata, including `contractURI`, `slotURI` and * `tokenURI`, be directly returned in JSON format, instead of being returned with a url pointing * to any resource stored in a centralized system. * See https://eips.ethereum.org/EIPS/eip-3525 * Note: the ERC-165 identifier for this interface is 0xe1600902. */ interface IERC3525Metadata is IERC3525, IERC721Metadata { /** * @notice Returns the Uniform Resource Identifier (URI) for the current ERC3525 contract. * @dev This function SHOULD return the URI for this contract in JSON format, starting with * header `data:application/json;`. * See https://eips.ethereum.org/EIPS/eip-3525 for the JSON schema for contract URI. * @return The JSON formatted URI of the current ERC3525 contract */ function contractURI() external view returns (string memory); /** * @notice Returns the Uniform Resource Identifier (URI) for the specified slot. * @dev This function SHOULD return the URI for `_slot` in JSON format, starting with header * `data:application/json;`. * See https://eips.ethereum.org/EIPS/eip-3525 for the JSON schema for slot URI. * @return The JSON formatted URI of `_slot` */ function slotURI(uint256 _slot) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IERC3525MetadataDescriptor { function constructContractURI() external view returns (string memory); function constructSlotURI(uint256 slot) external view returns (string memory); function constructTokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165Upgradeable { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // 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); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
[{"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":"uint256","name":"_tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"_operator","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"ApprovalValue","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"metadataDescriptor","type":"address"}],"name":"SetMetadataDescriptor","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"_oldSlot","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"_newSlot","type":"uint256"}],"name":"SlotChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_fromTokenId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"_toTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"TransferValue","type":"event"},{"inputs":[],"name":"NORMAL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SPECIAL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UNIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId_","type":"uint256"},{"internalType":"address","name":"operator_","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"tokenId_","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId_","type":"uint256"},{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"value_","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner_","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"balance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId_","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"fromTokenId_","type":"uint256"},{"internalType":"uint256","name":"value_","type":"uint256"}],"name":"changefromNormalToSpecial","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"fromTokenId_","type":"uint256"},{"internalType":"uint256","name":"toTokenId_","type":"uint256"}],"name":"changefromSpecialToNormal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId_","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"uint8","name":"decimals_","type":"uint8"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner_","type":"address"},{"internalType":"address","name":"operator_","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"metadataDescriptor","outputs":[{"internalType":"contract IERC3525MetadataDescriptor","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"mintTo_","type":"address"},{"internalType":"uint256","name":"tokenId_","type":"uint256"},{"internalType":"uint256","name":"slot_","type":"uint256"},{"internalType":"uint256","name":"value_","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId_","type":"uint256"},{"internalType":"uint256","name":"value_","type":"uint256"}],"name":"mintValue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId_","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"owner_","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from_","type":"address"},{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"tokenId_","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","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":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"operator_","type":"address"},{"internalType":"bool","name":"approved_","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI_","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId_","type":"uint256"}],"name":"slotOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"slot_","type":"uint256"}],"name":"slotURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index_","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner_","type":"address"},{"internalType":"uint256","name":"index_","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId_","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"fromTokenId_","type":"uint256"},{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"value_","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","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":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"fromTokenId_","type":"uint256"},{"internalType":"uint256","name":"toTokenId_","type":"uint256"},{"internalType":"uint256","name":"value_","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"valueDecimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040526103e960665534801561001657600080fd5b506138fd806100266000396000f3fe6080604052600436106102045760003560e01c806355f804b311610118578063a22cb465116100a0578063c87b56dd1161006f578063c87b56dd14610578578063e345e0bc14610598578063e8a3d485146105b8578063e985e9c5146105cd578063f0e88e7f1461061a57600080fd5b8063a22cb46514610510578063a647e8ec14610530578063ae24595c14610550578063b88d4fde1461056557600080fd5b8063840f7113116100e7578063840f7113146104935780638cb0a511146104b357806395d89b41146104c65780639cc7f708146104db5780639d8e2177146104fb57600080fd5b806355f804b3146104135780635ec56a48146104335780636352211e1461045357806370a082311461047357600080fd5b806318160ddd1161019b578063310ed7f01161016a578063310ed7f01461038b5780633e7e86691461039e57806342842e0e146103c05780634c8207c3146103d35780634f6ccce7146103f357600080fd5b806318160ddd1461032357806323b872dd14610338578063263f3e7e1461034b5780632f745c591461036b57600080fd5b8063095ea7b3116101d7578063095ea7b3146102bb57806309c3dd87146102d05780630f485c02146102f05780631624f6c61461030357600080fd5b806301ffc9a714610209578063026e71101461023e57806306fdde0314610261578063081812fc14610283575b600080fd5b34801561021557600080fd5b50610229610224366004612d5f565b61063a565b60405190151581526020015b60405180910390f35b34801561024a57600080fd5b50610253600281565b604051908152602001610235565b34801561026d57600080fd5b506102766106dd565b6040516102359190612dd4565b34801561028f57600080fd5b506102a361029e366004612de7565b61076f565b6040516001600160a01b039091168152602001610235565b6102ce6102c9366004612e17565b6107c1565b005b3480156102dc57600080fd5b506102766102eb366004612de7565b61084f565b6102536102fe366004612e41565b610934565b34801561030f57600080fd5b506102ce61031e366004612f43565b610976565b34801561032f57600080fd5b50603754610253565b6102ce610346366004612fc1565b610a8d565b34801561035757600080fd5b50610253610366366004612de7565b610abe565b34801561037757600080fd5b50610253610386366004612e17565b610b06565b6102ce610399366004612fed565b610ba7565b3480156103aa57600080fd5b5060355460405160ff9091168152602001610235565b6102ce6103ce366004612fc1565b610bbd565b3480156103df57600080fd5b506102ce6103ee366004613019565b610bd8565b3480156103ff57600080fd5b5061025361040e366004612de7565b610cf0565b34801561041f57600080fd5b506102ce61042e36600461303b565b610d81565b34801561043f57600080fd5b506102ce61044e366004613019565b610d8e565b34801561045f57600080fd5b506102a361046e366004612de7565b610e58565b34801561047f57600080fd5b5061025361048e3660046130ad565b610ef4565b34801561049f57600080fd5b50603a546102a3906001600160a01b031681565b6102ce6104c1366004612e41565b610f7c565b3480156104d257600080fd5b50610276610ffd565b3480156104e757600080fd5b506102536104f6366004612de7565b61100c565b34801561050757600080fd5b50610253600a81565b34801561051c57600080fd5b506102ce61052b3660046130d6565b611054565b34801561053c57600080fd5b506102ce61054b36600461310d565b61105f565b34801561055c57600080fd5b50610253600181565b6102ce610573366004613146565b61106b565b34801561058457600080fd5b50610276610593366004612de7565b61109d565b3480156105a457600080fd5b506102536105b33660046131c2565b61112f565b3480156105c457600080fd5b50610276611163565b3480156105d957600080fd5b506102296105e83660046131ee565b6001600160a01b0391821660009081526039602090815260408083209390941682526002909201909152205460ff1690565b34801561062657600080fd5b506102ce610635366004613019565b611250565b60006001600160e01b031982166301ffc9a760e01b148061066b57506001600160e01b03198216630354d60560e61b145b8061068657506001600160e01b031982166380ac58cd60e01b145b806106a157506001600160e01b031982166370b0048160e11b145b806106bc57506001600160e01b0319821663780e9d6360e01b145b806106d757506001600160e01b03198216635b5e139f60e01b145b92915050565b6060603380546106ec90613218565b80601f016020809104026020016040519081016040528092919081815260200182805461071890613218565b80156107655780601f1061073a57610100808354040283529160200191610765565b820191906000526020600020905b81548152906001019060200180831161074857829003601f168201915b5050505050905090565b600061077a8261125a565b60008281526038602052604090205460378054909190811061079e5761079e613252565b60009182526020909120600460069092020101546001600160a01b031692915050565b60006107cc82610e58565b9050806001600160a01b0316836001600160a01b0316036108085760405162461bcd60e51b81526004016107ff90613268565b60405180910390fd5b336001600160a01b0382161480610824575061082481336105e8565b6108405760405162461bcd60e51b81526004016107ff906132aa565b61084a83836112ae565b505050565b6060600061085b611345565b603a549091506001600160a01b03166108bb57600081511161088c576040518060200160405280600081525061092d565b8061089684611354565b6040516020016108a7929190613307565b60405160208183030381529060405261092d565b603a54604051633601bfc560e11b8152600481018590526001600160a01b0390911690636c037f8a906024015b600060405180830381865afa158015610905573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261092d9190810190613347565b9392505050565b6000610941338584611455565b600061094c856114e5565b9050610963848261095c88610abe565b60006114ef565b61096e858285611619565b949350505050565b600054610100900460ff16158080156109965750600054600160ff909116105b806109b05750303b1580156109b0575060005460ff166001145b610a135760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016107ff565b6000805460ff191660011790558015610a36576000805461ff0019166101001790555b610a418484846118b9565b8015610a87576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b610a9733826118eb565b610ab35760405162461bcd60e51b81526004016107ff906133be565b61084a838383611953565b6000610ac98261125a565b600082815260386020526040902054603780549091908110610aed57610aed613252565b9060005260206000209060060201600101549050919050565b6000610b1183610ef4565b8210610b6a5760405162461bcd60e51b815260206004820152602260248201527f455243333532353a206f776e657220696e646578206f7574206f6620626f756e604482015261647360f01b60648201526084016107ff565b6001600160a01b0383166000908152603960205260409020805483908110610b9457610b94613252565b9060005260206000200154905092915050565b610bb2338483611455565b61084a838383611619565b61084a8383836040518060200160405280600081525061106b565b6001610be383610abe565b14610c005760405162461bcd60e51b81526004016107ff90613410565b80610c0a8361100c565b1015610c445760405162461bcd60e51b81526020600482015260096024820152681d1bdbc81cda1bdc9d60ba1b60448201526064016107ff565b33610c4e83610e58565b6001600160a01b031614610c985760405162461bcd60e51b815260206004820152601160248201527074686973206973206e6f7420796f75727360781b60448201526064016107ff565b6000610ca5600a83613454565b90506000610cb3828461347e565b9050610cbf8482611ab4565b610cd5336066546002600a8561054b9190613495565b60668054906000610ce5836134a9565b919050555050505050565b6000610cfb60375490565b8210610d555760405162461bcd60e51b815260206004820152602360248201527f455243333532353a20676c6f62616c20696e646578206f7574206f6620626f756044820152626e647360e81b60648201526084016107ff565b60378281548110610d6857610d68613252565b9060005260206000209060060201600001549050919050565b606561084a828483613508565b6002610d9983610abe565b14610db65760405162461bcd60e51b81526004016107ff90613410565b6001610dc182610abe565b14610dde5760405162461bcd60e51b81526004016107ff90613410565b33610de883610e58565b6001600160a01b031614610e325760405162461bcd60e51b815260206004820152601160248201527074686973206973206e6f7420796f75727360781b60448201526064016107ff565b610e4b81600a610e418561100c565b61063591906135c8565b610e5482611bb3565b5050565b6000610e638261125a565b600082815260386020526040902054603780549091908110610e8757610e87613252565b60009182526020909120600360069092020101546001600160a01b0316905080610eef5760405162461bcd60e51b8152602060048201526019602482015278115490cccd4c8d4e881a5b9d985b1a59081d1bdad95b881251603a1b60448201526064016107ff565b919050565b60006001600160a01b038216610f605760405162461bcd60e51b815260206004820152602b60248201527f455243333532353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084016107ff565b506001600160a01b031660009081526039602052604090205490565b6000610f8784610e58565b9050806001600160a01b0316836001600160a01b031603610fba5760405162461bcd60e51b81526004016107ff90613268565b336001600160a01b0382161480610fd65750610fd681336105e8565b610ff25760405162461bcd60e51b81526004016107ff906132aa565b610a87848484611cc2565b6060603480546106ec90613218565b60006110178261125a565b60008281526038602052604090205460378054909190811061103b5761103b613252565b9060005260206000209060060201600201549050919050565b610e54338383611dfa565b610a87848484846114ef565b61107533836118eb565b6110915760405162461bcd60e51b81526004016107ff906133be565b610a8784848484611ec4565b60606110a88261125a565b60006110b2611345565b603a549091506001600160a01b03166110fe5760008151116110e3576040518060200160405280600081525061092d565b806110ed84611354565b6040516020016108a79291906135e7565b603a546040516344a5a61760e11b8152600481018590526001600160a01b039091169063894b4c2e906024016108e8565b600061113a8361125a565b5060009182526036602090815260408084206001600160a01b0393909316845291905290205490565b6060600061116f611345565b603a549091506001600160a01b03166111cf5760008151116111a0576040518060200160405280600081525061124a565b806111aa30611f37565b6040516020016111bb929190613616565b60405160208183030381529060405261124a565b603a60009054906101000a90046001600160a01b03166001600160a01b031663725fa09c6040518163ffffffff1660e01b8152600401600060405180830381865afa158015611222573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261124a9190810190613347565b91505090565b610e548282611f4d565b61126381611f7a565b6112ab5760405162461bcd60e51b8152602060048201526019602482015278115490cccd4c8d4e881a5b9d985b1a59081d1bdad95b881251603a1b60448201526064016107ff565b50565b6000818152603860205260409020546037805484929081106112d2576112d2613252565b6000918252602090912060069091020160040180546001600160a01b0319166001600160a01b039283161790558190831661130c82610e58565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6060606580546106ec90613218565b60608160000361137b5750506040805180820190915260018152600360fc1b602082015290565b8160005b81156113a5578061138f816134a9565b915061139e9050600a83613495565b915061137f565b60008167ffffffffffffffff8111156113c0576113c0612e76565b6040519080825280601f01601f1916602001820160405280156113ea576020820181803683370190505b5090505b841561096e576113ff60018361347e565b915061140c600a86613454565b61141790603061365a565b60f81b81838151811061142c5761142c613252565b60200101906001600160f81b031916908160001a90535061144e600a86613495565b94506113ee565b6000611461838561112f565b905061146d84846118eb565b15801561147c57506000198114155b15610a8757818110156114d15760405162461bcd60e51b815260206004820152601f60248201527f455243333532353a20696e73756666696369656e7420616c6c6f77616e63650060448201526064016107ff565b610a8783856114e0858561347e565b611cc2565b60006106d7611fc6565b6001600160a01b03841661154f5760405162461bcd60e51b815260206004820152602160248201527f455243333532353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b60648201526084016107ff565b826000036115a95760405162461bcd60e51b815260206004820152602160248201527f455243333532353a2063616e6e6f74206d696e74207a65726f20746f6b656e496044820152601960fa1b60648201526084016107ff565b6115b283611f7a565b156115ff5760405162461bcd60e51b815260206004820152601d60248201527f455243333532353a20746f6b656e20616c7265616479206d696e74656400000060448201526064016107ff565b61160a848484611fe1565b61161483826120a7565b610a87565b61162283611f7a565b61167e5760405162461bcd60e51b815260206004820152602760248201527f455243333532353a207472616e736665722066726f6d20696e76616c696420746044820152661bdad95b88125160ca1b60648201526084016107ff565b61168782611f7a565b6116e15760405162461bcd60e51b815260206004820152602560248201527f455243333532353a207472616e7366657220746f20696e76616c696420746f6b604482015264195b88125160da1b60648201526084016107ff565b60008381526038602052604081205460378054909190811061170557611705613252565b906000526020600020906006020190506000603760386000868152602001908152602001600020548154811061173d5761173d613252565b9060005260206000209060060201905082826002015410156117b45760405162461bcd60e51b815260206004820152602a60248201527f455243333532353a20696e73756666696369656e742062616c616e636520666f60448201526939103a3930b739b332b960b11b60648201526084016107ff565b80600101548260010154146118225760405162461bcd60e51b815260206004820152602e60248201527f455243333532353a207472616e7366657220746f20746f6b656e20776974682060448201526d191a5999995c995b9d081cdb1bdd60921b60648201526084016107ff565b82826002016000828254611836919061347e565b9250508190555082816002016000828254611851919061365a565b9091555050604051838152849086906000805160206138a88339815191529060200160405180910390a36118968585856040518060200160405280600081525061211a565b6118b25760405162461bcd60e51b81526004016107ff90613672565b5050505050565b600054610100900460ff166118e05760405162461bcd60e51b81526004016107ff906136ba565b61084a83838361229e565b60006118f68261125a565b600061190183610e58565b9050806001600160a01b0316846001600160a01b03161480611928575061192881856105e8565b8061096e5750836001600160a01b03166119418461076f565b6001600160a01b031614949350505050565b826001600160a01b031661196682610e58565b6001600160a01b0316146119c85760405162461bcd60e51b8152602060048201526024808201527f455243333532353a207472616e736665722066726f6d20696e76616c6964206f6044820152633bb732b960e11b60648201526084016107ff565b6001600160a01b038216611a2c5760405162461bcd60e51b815260206004820152602560248201527f455243333532353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b60648201526084016107ff565b6000611a3782610abe565b90506000611a448361100c565b9050611a516000846112ae565b611a5a836122f7565b611a648584612393565b611a6e84846124b4565b82846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46118b2565b611abd8261125a565b600082815260386020526040812054603780549091908110611ae157611ae1613252565b600091825260209091206006909102016003810154600182015460028301549293506001600160a01b039091169184811015611b6b5760405162461bcd60e51b815260206004820152602360248201527f455243333532353a206275726e2076616c756520657863656564732062616c616044820152626e636560e81b60648201526084016107ff565b84846002016000828254611b7f919061347e565b909155505060405185815260009087906000805160206138a88339815191529060200160405180910390a35b505050505050565b611bbc8161125a565b600081815260386020526040812054603780549091908110611be057611be0613252565b60009182526020909120600691909102016003810154600182015460028301549293506001600160a01b0390911691611c18856122f7565b611c228386612393565b611c2b8561253d565b6000856000805160206138a883398151915283604051611c4d91815260200190565b60405180910390a3600082867fe4f48c240d3b994948aa54f3e2f5fca59263dfe1d52b6e4cf39a5d249b5ccb6560405160405180910390a460405185906000906001600160a01b038616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a46118b2565b6001600160a01b038216611d2b5760405162461bcd60e51b815260206004820152602a60248201527f455243333532353a20617070726f76652076616c756520746f20746865207a65604482015269726f206164647265737360b01b60648201526084016107ff565b611d35828461274b565b611d9b57600083815260386020526040902054603780549091908110611d5d57611d5d613252565b60009182526020808320600692909202909101600501805460018101825590835291200180546001600160a01b0319166001600160a01b0384161790555b60008381526036602090815260408083206001600160a01b038616808552908352928190208490555183815285917f621b050de0ad08b51d19b48b3e6df75348c4de6bdd93e81b252ca62e28265b1b91015b60405180910390a3505050565b816001600160a01b0316836001600160a01b031603611e5b5760405162461bcd60e51b815260206004820152601a60248201527f455243333532353a20617070726f766520746f2063616c6c657200000000000060448201526064016107ff565b6001600160a01b0383811660008181526039602090815260408083209487168084526002909501825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319101611ded565b611ecf848484611953565b611edb8484848461281e565b610a875760405162461bcd60e51b815260206004820152602760248201527f455243333532353a207472616e7366657220746f206e6f6e204552433732315260448201526632b1b2b4bb32b960c91b60648201526084016107ff565b60606106d76001600160a01b03831660146129cb565b611f568261125a565b6000611f6183610e58565b90506000611f6e84610abe565b905061161484846120a7565b603754600090158015906106d75750600082815260386020526040902054603780548492908110611fad57611fad613252565b9060005260206000209060060201600001541492915050565b6000611fd160375490565b611fdc90600161365a565b905090565b6040805160c081018252838152602080820184905260008284018190526001600160a01b038716606084015260808301819052835181815291820190935260a0820152905061202f81612b67565b61203984846124b4565b60405183906001600160a01b038616906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4816000847fe4f48c240d3b994948aa54f3e2f5fca59263dfe1d52b6e4cf39a5d249b5ccb6560405160405180910390a450505050565b6000828152603860205260409020546037805483929081106120cb576120cb613252565b906000526020600020906006020160020160008282546120eb919061365a565b909155505060405181815282906000906000805160206138a88339815191529060200160405180910390a35050565b60008061212685610e58565b90506001600160a01b0381163b151580156121aa57506040516301ffc9a760e01b8152629ce20b60e01b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa158015612186573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121aa9190613705565b1561229457604051629ce20b60e01b81526001600160a01b03821690629ce20b906121e19033908a908a908a908a90600401613722565b6020604051808303816000875af192505050801561221c575060408051601f3d908101601f1916820190925261221991810190613760565b60015b612279573d80801561224a576040519150601f19603f3d011682016040523d82523d6000602084013e61224f565b606091505b5080516000036122715760405162461bcd60e51b81526004016107ff90613672565b805181602001fd5b6001600160e01b031916629ce20b60e01b14915061096e9050565b600191505061096e565b600054610100900460ff166122c55760405162461bcd60e51b81526004016107ff906136ba565b60336122d1848261377d565b5060346122de838261377d565b506035805460ff191660ff929092169190911790555050565b60008181526038602052604081205460378054909190811061231b5761231b613252565b600091825260208220600560069092020190810154909250905b81811015610a8757600083600501828154811061235457612354613252565b60009182526020808320909101548783526036825260408084206001600160a01b0390921684529152812055508061238b816134a9565b915050612335565b6000818152603860205260408120546037805490919081106123b7576123b7613252565b6000918252602080832060069290920290910160030180546001600160a01b0319166001600160a01b03948516179055918416815260399091526040812080549091906124069060019061347e565b9050600082600001828154811061241f5761241f613252565b9060005260206000200154905060008360010160008681526020019081526020016000205490508184600001828154811061245c5761245c613252565b600091825260208083209091019290925583815260018601909152604080822083905586825281205583548490806124965761249661383d565b60019003818190600052602060002001600090559055505050505050565b6000818152603860205260409020546037805484929081106124d8576124d8613252565b6000918252602080832060069290920290910160030180546001600160a01b0319166001600160a01b03948516179055939091168152603980845260408083208054858552600182810188529285208190559286529082018155825292902090910155565b60375460009061254f9060019061347e565b6000838152603860205260408120546037805493945090928490811061257757612577613252565b60009182526020918290206040805160c08101825260069093029091018054835260018101548385015260028101548383015260038101546001600160a01b03908116606085015260048201541660808401526005810180548351818702810187019094528084529394919360a08601939283018282801561262257602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612604575b5050505050815250509050806037838154811061264157612641613252565b600091825260209182902083516006909202019081558282015160018201556040830151600282015560608301516003820180546001600160a01b039283166001600160a01b031991821617909155608085015160048401805491909316911617905560a0830151805191926126bf92600585019290910190612cb5565b505081516000908152603860205260408082208590558682528120555060378054806126ed576126ed61383d565b60008281526020812060066000199093019283020181815560018101829055600281018290556003810180546001600160a01b03199081169091556004820180549091169055906127416005830182612d1a565b5050905550505050565b60008181526038602052604081205460378054839290811061276f5761276f613252565b6000918252602082206005600690920201015491505b8181101561281357600084815260386020526040902054603780546001600160a01b038816929081106127ba576127ba613252565b906000526020600020906006020160050182815481106127dc576127dc613252565b6000918252602090912001546001600160a01b031603612801576001925050506106d7565b8061280b816134a9565b915050612785565b506000949350505050565b60006001600160a01b0384163b151580156128a357506040516301ffc9a760e01b8152630a85bd0160e11b60048201526001600160a01b038516906301ffc9a790602401602060405180830381865afa15801561287f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128a39190613705565b156129c357604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906128da903390899088908890600401613853565b6020604051808303816000875af1925050508015612915575060408051601f3d908101601f1916820190925261291291810190613760565b60015b6129a9573d808015612943576040519150601f19603f3d011682016040523d82523d6000602084013e612948565b606091505b5080516000036122715760405162461bcd60e51b815260206004820152602660248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201526531b2b4bb32b960d11b60648201526084016107ff565b6001600160e01b031916630a85bd0160e11b14905061096e565b50600161096e565b606060006129da8360026135c8565b6129e590600261365a565b67ffffffffffffffff8111156129fd576129fd612e76565b6040519080825280601f01601f191660200182016040528015612a27576020820181803683370190505b509050600360fc1b81600081518110612a4257612a42613252565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612a7157612a71613252565b60200101906001600160f81b031916908160001a9053506000612a958460026135c8565b612aa090600161365a565b90505b6001811115612b18576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612ad457612ad4613252565b1a60f81b828281518110612aea57612aea613252565b60200101906001600160f81b031916908160001a90535060049490941c93612b1181613890565b9050612aa3565b50831561092d5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016107ff565b603780548251600090815260386020908152604080832084905560018401855593909152835160069092027f42a7b7dd785cd69714a189dffb3fd7d7174edc9ece837694ce50f7078f7c31ae8101928355818501517f42a7b7dd785cd69714a189dffb3fd7d7174edc9ece837694ce50f7078f7c31af820155928401517f42a7b7dd785cd69714a189dffb3fd7d7174edc9ece837694ce50f7078f7c31b084015560608401517f42a7b7dd785cd69714a189dffb3fd7d7174edc9ece837694ce50f7078f7c31b1840180546001600160a01b039283166001600160a01b03199182161790915560808601517f42a7b7dd785cd69714a189dffb3fd7d7174edc9ece837694ce50f7078f7c31b28601805491909316911617905560a084015180518594610a87937f42a7b7dd785cd69714a189dffb3fd7d7174edc9ece837694ce50f7078f7c31b39091019201905b828054828255906000526020600020908101928215612d0a579160200282015b82811115612d0a57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190612cd5565b50612d16929150612d34565b5090565b50805460008255906000526020600020908101906112ab91905b5b80821115612d165760008155600101612d35565b6001600160e01b0319811681146112ab57600080fd5b600060208284031215612d7157600080fd5b813561092d81612d49565b60005b83811015612d97578181015183820152602001612d7f565b83811115610a875750506000910152565b60008151808452612dc0816020860160208601612d7c565b601f01601f19169290920160200192915050565b60208152600061092d6020830184612da8565b600060208284031215612df957600080fd5b5035919050565b80356001600160a01b0381168114610eef57600080fd5b60008060408385031215612e2a57600080fd5b612e3383612e00565b946020939093013593505050565b600080600060608486031215612e5657600080fd5b83359250612e6660208501612e00565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612eb557612eb5612e76565b604052919050565b600067ffffffffffffffff821115612ed757612ed7612e76565b50601f01601f191660200190565b6000612ef8612ef384612ebd565b612e8c565b9050828152838383011115612f0c57600080fd5b828260208301376000602084830101529392505050565b600082601f830112612f3457600080fd5b61092d83833560208501612ee5565b600080600060608486031215612f5857600080fd5b833567ffffffffffffffff80821115612f7057600080fd5b612f7c87838801612f23565b94506020860135915080821115612f9257600080fd5b50612f9f86828701612f23565b925050604084013560ff81168114612fb657600080fd5b809150509250925092565b600080600060608486031215612fd657600080fd5b612fdf84612e00565b9250612e6660208501612e00565b60008060006060848603121561300257600080fd5b505081359360208301359350604090920135919050565b6000806040838503121561302c57600080fd5b50508035926020909101359150565b6000806020838503121561304e57600080fd5b823567ffffffffffffffff8082111561306657600080fd5b818501915085601f83011261307a57600080fd5b81358181111561308957600080fd5b86602082850101111561309b57600080fd5b60209290920196919550909350505050565b6000602082840312156130bf57600080fd5b61092d82612e00565b80151581146112ab57600080fd5b600080604083850312156130e957600080fd5b6130f283612e00565b91506020830135613102816130c8565b809150509250929050565b6000806000806080858703121561312357600080fd5b61312c85612e00565b966020860135965060408601359560600135945092505050565b6000806000806080858703121561315c57600080fd5b61316585612e00565b935061317360208601612e00565b925060408501359150606085013567ffffffffffffffff81111561319657600080fd5b8501601f810187136131a757600080fd5b6131b687823560208401612ee5565b91505092959194509250565b600080604083850312156131d557600080fd5b823591506131e560208401612e00565b90509250929050565b6000806040838503121561320157600080fd5b61320a83612e00565b91506131e560208401612e00565b600181811c9082168061322c57607f821691505b60208210810361324c57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b60208082526022908201527f455243333532353a20617070726f76616c20746f2063757272656e74206f776e60408201526132b960f11b606082015260800190565b60208082526039908201527f455243333532353a20617070726f76652063616c6c6572206973206e6f74206f60408201527f776e6572206e6f7220617070726f76656420666f7220616c6c00000000000000606082015260800190565b60008351613319818460208801612d7c565b64736c6f742f60d81b908301908152835161333b816005840160208801612d7c565b01600501949350505050565b60006020828403121561335957600080fd5b815167ffffffffffffffff81111561337057600080fd5b8201601f8101841361338157600080fd5b805161338f612ef382612ebd565b8181528560208385010111156133a457600080fd5b6133b5826020830160208601612d7c565b95945050505050565b60208082526032908201527f455243333532353a207472616e736665722063616c6c6572206973206e6f74206040820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b606082015260800190565b6020808252601490820152731cdb1bdd081251081a5cc8191a5999995c995b9d60621b604082015260600190565b634e487b7160e01b600052601260045260246000fd5b6000826134635761346361343e565b500690565b634e487b7160e01b600052601160045260246000fd5b60008282101561349057613490613468565b500390565b6000826134a4576134a461343e565b500490565b6000600182016134bb576134bb613468565b5060010190565b601f82111561084a57600081815260208120601f850160051c810160208610156134e95750805b601f850160051c820191505b81811015611bab578281556001016134f5565b67ffffffffffffffff83111561352057613520612e76565b6135348361352e8354613218565b836134c2565b6000601f84116001811461356857600085156135505750838201355b600019600387901b1c1916600186901b1783556118b2565b600083815260209020601f19861690835b828110156135995786850135825560209485019460019092019101613579565b50868210156135b65760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b60008160001904831182151516156135e2576135e2613468565b500290565b600083516135f9818460208801612d7c565b83519083019061360d818360208801612d7c565b01949350505050565b60008351613628818460208801612d7c565b68636f6e74726163742f60b81b908301908152835161364e816009840160208801612d7c565b01600901949350505050565b6000821982111561366d5761366d613468565b500190565b60208082526028908201527f455243333532353a207472616e7366657220746f206e6f6e20455243333532356040820152672932b1b2b4bb32b960c11b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60006020828403121561371757600080fd5b815161092d816130c8565b60018060a01b038616815284602082015283604082015282606082015260a06080820152600061375560a0830184612da8565b979650505050505050565b60006020828403121561377257600080fd5b815161092d81612d49565b815167ffffffffffffffff81111561379757613797612e76565b6137ab816137a58454613218565b846134c2565b602080601f8311600181146137e057600084156137c85750858301515b600019600386901b1c1916600185901b178555611bab565b600085815260208120601f198616915b8281101561380f578886015182559484019460019091019084016137f0565b508582101561382d5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603160045260246000fd5b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061388690830184612da8565b9695505050505050565b60008161389f5761389f613468565b50600019019056fe0b2aac84f3ec956911fd78eae5311062972ff949f38412e8da39069d9f068cc6a2646970667358221220d45b86f819fc00d0d5e271d21aaca92e1e340881ce88448178e49617bb560f3e64736f6c634300080f0033
Deployed Bytecode
0x6080604052600436106102045760003560e01c806355f804b311610118578063a22cb465116100a0578063c87b56dd1161006f578063c87b56dd14610578578063e345e0bc14610598578063e8a3d485146105b8578063e985e9c5146105cd578063f0e88e7f1461061a57600080fd5b8063a22cb46514610510578063a647e8ec14610530578063ae24595c14610550578063b88d4fde1461056557600080fd5b8063840f7113116100e7578063840f7113146104935780638cb0a511146104b357806395d89b41146104c65780639cc7f708146104db5780639d8e2177146104fb57600080fd5b806355f804b3146104135780635ec56a48146104335780636352211e1461045357806370a082311461047357600080fd5b806318160ddd1161019b578063310ed7f01161016a578063310ed7f01461038b5780633e7e86691461039e57806342842e0e146103c05780634c8207c3146103d35780634f6ccce7146103f357600080fd5b806318160ddd1461032357806323b872dd14610338578063263f3e7e1461034b5780632f745c591461036b57600080fd5b8063095ea7b3116101d7578063095ea7b3146102bb57806309c3dd87146102d05780630f485c02146102f05780631624f6c61461030357600080fd5b806301ffc9a714610209578063026e71101461023e57806306fdde0314610261578063081812fc14610283575b600080fd5b34801561021557600080fd5b50610229610224366004612d5f565b61063a565b60405190151581526020015b60405180910390f35b34801561024a57600080fd5b50610253600281565b604051908152602001610235565b34801561026d57600080fd5b506102766106dd565b6040516102359190612dd4565b34801561028f57600080fd5b506102a361029e366004612de7565b61076f565b6040516001600160a01b039091168152602001610235565b6102ce6102c9366004612e17565b6107c1565b005b3480156102dc57600080fd5b506102766102eb366004612de7565b61084f565b6102536102fe366004612e41565b610934565b34801561030f57600080fd5b506102ce61031e366004612f43565b610976565b34801561032f57600080fd5b50603754610253565b6102ce610346366004612fc1565b610a8d565b34801561035757600080fd5b50610253610366366004612de7565b610abe565b34801561037757600080fd5b50610253610386366004612e17565b610b06565b6102ce610399366004612fed565b610ba7565b3480156103aa57600080fd5b5060355460405160ff9091168152602001610235565b6102ce6103ce366004612fc1565b610bbd565b3480156103df57600080fd5b506102ce6103ee366004613019565b610bd8565b3480156103ff57600080fd5b5061025361040e366004612de7565b610cf0565b34801561041f57600080fd5b506102ce61042e36600461303b565b610d81565b34801561043f57600080fd5b506102ce61044e366004613019565b610d8e565b34801561045f57600080fd5b506102a361046e366004612de7565b610e58565b34801561047f57600080fd5b5061025361048e3660046130ad565b610ef4565b34801561049f57600080fd5b50603a546102a3906001600160a01b031681565b6102ce6104c1366004612e41565b610f7c565b3480156104d257600080fd5b50610276610ffd565b3480156104e757600080fd5b506102536104f6366004612de7565b61100c565b34801561050757600080fd5b50610253600a81565b34801561051c57600080fd5b506102ce61052b3660046130d6565b611054565b34801561053c57600080fd5b506102ce61054b36600461310d565b61105f565b34801561055c57600080fd5b50610253600181565b6102ce610573366004613146565b61106b565b34801561058457600080fd5b50610276610593366004612de7565b61109d565b3480156105a457600080fd5b506102536105b33660046131c2565b61112f565b3480156105c457600080fd5b50610276611163565b3480156105d957600080fd5b506102296105e83660046131ee565b6001600160a01b0391821660009081526039602090815260408083209390941682526002909201909152205460ff1690565b34801561062657600080fd5b506102ce610635366004613019565b611250565b60006001600160e01b031982166301ffc9a760e01b148061066b57506001600160e01b03198216630354d60560e61b145b8061068657506001600160e01b031982166380ac58cd60e01b145b806106a157506001600160e01b031982166370b0048160e11b145b806106bc57506001600160e01b0319821663780e9d6360e01b145b806106d757506001600160e01b03198216635b5e139f60e01b145b92915050565b6060603380546106ec90613218565b80601f016020809104026020016040519081016040528092919081815260200182805461071890613218565b80156107655780601f1061073a57610100808354040283529160200191610765565b820191906000526020600020905b81548152906001019060200180831161074857829003601f168201915b5050505050905090565b600061077a8261125a565b60008281526038602052604090205460378054909190811061079e5761079e613252565b60009182526020909120600460069092020101546001600160a01b031692915050565b60006107cc82610e58565b9050806001600160a01b0316836001600160a01b0316036108085760405162461bcd60e51b81526004016107ff90613268565b60405180910390fd5b336001600160a01b0382161480610824575061082481336105e8565b6108405760405162461bcd60e51b81526004016107ff906132aa565b61084a83836112ae565b505050565b6060600061085b611345565b603a549091506001600160a01b03166108bb57600081511161088c576040518060200160405280600081525061092d565b8061089684611354565b6040516020016108a7929190613307565b60405160208183030381529060405261092d565b603a54604051633601bfc560e11b8152600481018590526001600160a01b0390911690636c037f8a906024015b600060405180830381865afa158015610905573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261092d9190810190613347565b9392505050565b6000610941338584611455565b600061094c856114e5565b9050610963848261095c88610abe565b60006114ef565b61096e858285611619565b949350505050565b600054610100900460ff16158080156109965750600054600160ff909116105b806109b05750303b1580156109b0575060005460ff166001145b610a135760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016107ff565b6000805460ff191660011790558015610a36576000805461ff0019166101001790555b610a418484846118b9565b8015610a87576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b610a9733826118eb565b610ab35760405162461bcd60e51b81526004016107ff906133be565b61084a838383611953565b6000610ac98261125a565b600082815260386020526040902054603780549091908110610aed57610aed613252565b9060005260206000209060060201600101549050919050565b6000610b1183610ef4565b8210610b6a5760405162461bcd60e51b815260206004820152602260248201527f455243333532353a206f776e657220696e646578206f7574206f6620626f756e604482015261647360f01b60648201526084016107ff565b6001600160a01b0383166000908152603960205260409020805483908110610b9457610b94613252565b9060005260206000200154905092915050565b610bb2338483611455565b61084a838383611619565b61084a8383836040518060200160405280600081525061106b565b6001610be383610abe565b14610c005760405162461bcd60e51b81526004016107ff90613410565b80610c0a8361100c565b1015610c445760405162461bcd60e51b81526020600482015260096024820152681d1bdbc81cda1bdc9d60ba1b60448201526064016107ff565b33610c4e83610e58565b6001600160a01b031614610c985760405162461bcd60e51b815260206004820152601160248201527074686973206973206e6f7420796f75727360781b60448201526064016107ff565b6000610ca5600a83613454565b90506000610cb3828461347e565b9050610cbf8482611ab4565b610cd5336066546002600a8561054b9190613495565b60668054906000610ce5836134a9565b919050555050505050565b6000610cfb60375490565b8210610d555760405162461bcd60e51b815260206004820152602360248201527f455243333532353a20676c6f62616c20696e646578206f7574206f6620626f756044820152626e647360e81b60648201526084016107ff565b60378281548110610d6857610d68613252565b9060005260206000209060060201600001549050919050565b606561084a828483613508565b6002610d9983610abe565b14610db65760405162461bcd60e51b81526004016107ff90613410565b6001610dc182610abe565b14610dde5760405162461bcd60e51b81526004016107ff90613410565b33610de883610e58565b6001600160a01b031614610e325760405162461bcd60e51b815260206004820152601160248201527074686973206973206e6f7420796f75727360781b60448201526064016107ff565b610e4b81600a610e418561100c565b61063591906135c8565b610e5482611bb3565b5050565b6000610e638261125a565b600082815260386020526040902054603780549091908110610e8757610e87613252565b60009182526020909120600360069092020101546001600160a01b0316905080610eef5760405162461bcd60e51b8152602060048201526019602482015278115490cccd4c8d4e881a5b9d985b1a59081d1bdad95b881251603a1b60448201526064016107ff565b919050565b60006001600160a01b038216610f605760405162461bcd60e51b815260206004820152602b60248201527f455243333532353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084016107ff565b506001600160a01b031660009081526039602052604090205490565b6000610f8784610e58565b9050806001600160a01b0316836001600160a01b031603610fba5760405162461bcd60e51b81526004016107ff90613268565b336001600160a01b0382161480610fd65750610fd681336105e8565b610ff25760405162461bcd60e51b81526004016107ff906132aa565b610a87848484611cc2565b6060603480546106ec90613218565b60006110178261125a565b60008281526038602052604090205460378054909190811061103b5761103b613252565b9060005260206000209060060201600201549050919050565b610e54338383611dfa565b610a87848484846114ef565b61107533836118eb565b6110915760405162461bcd60e51b81526004016107ff906133be565b610a8784848484611ec4565b60606110a88261125a565b60006110b2611345565b603a549091506001600160a01b03166110fe5760008151116110e3576040518060200160405280600081525061092d565b806110ed84611354565b6040516020016108a79291906135e7565b603a546040516344a5a61760e11b8152600481018590526001600160a01b039091169063894b4c2e906024016108e8565b600061113a8361125a565b5060009182526036602090815260408084206001600160a01b0393909316845291905290205490565b6060600061116f611345565b603a549091506001600160a01b03166111cf5760008151116111a0576040518060200160405280600081525061124a565b806111aa30611f37565b6040516020016111bb929190613616565b60405160208183030381529060405261124a565b603a60009054906101000a90046001600160a01b03166001600160a01b031663725fa09c6040518163ffffffff1660e01b8152600401600060405180830381865afa158015611222573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261124a9190810190613347565b91505090565b610e548282611f4d565b61126381611f7a565b6112ab5760405162461bcd60e51b8152602060048201526019602482015278115490cccd4c8d4e881a5b9d985b1a59081d1bdad95b881251603a1b60448201526064016107ff565b50565b6000818152603860205260409020546037805484929081106112d2576112d2613252565b6000918252602090912060069091020160040180546001600160a01b0319166001600160a01b039283161790558190831661130c82610e58565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6060606580546106ec90613218565b60608160000361137b5750506040805180820190915260018152600360fc1b602082015290565b8160005b81156113a5578061138f816134a9565b915061139e9050600a83613495565b915061137f565b60008167ffffffffffffffff8111156113c0576113c0612e76565b6040519080825280601f01601f1916602001820160405280156113ea576020820181803683370190505b5090505b841561096e576113ff60018361347e565b915061140c600a86613454565b61141790603061365a565b60f81b81838151811061142c5761142c613252565b60200101906001600160f81b031916908160001a90535061144e600a86613495565b94506113ee565b6000611461838561112f565b905061146d84846118eb565b15801561147c57506000198114155b15610a8757818110156114d15760405162461bcd60e51b815260206004820152601f60248201527f455243333532353a20696e73756666696369656e7420616c6c6f77616e63650060448201526064016107ff565b610a8783856114e0858561347e565b611cc2565b60006106d7611fc6565b6001600160a01b03841661154f5760405162461bcd60e51b815260206004820152602160248201527f455243333532353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b60648201526084016107ff565b826000036115a95760405162461bcd60e51b815260206004820152602160248201527f455243333532353a2063616e6e6f74206d696e74207a65726f20746f6b656e496044820152601960fa1b60648201526084016107ff565b6115b283611f7a565b156115ff5760405162461bcd60e51b815260206004820152601d60248201527f455243333532353a20746f6b656e20616c7265616479206d696e74656400000060448201526064016107ff565b61160a848484611fe1565b61161483826120a7565b610a87565b61162283611f7a565b61167e5760405162461bcd60e51b815260206004820152602760248201527f455243333532353a207472616e736665722066726f6d20696e76616c696420746044820152661bdad95b88125160ca1b60648201526084016107ff565b61168782611f7a565b6116e15760405162461bcd60e51b815260206004820152602560248201527f455243333532353a207472616e7366657220746f20696e76616c696420746f6b604482015264195b88125160da1b60648201526084016107ff565b60008381526038602052604081205460378054909190811061170557611705613252565b906000526020600020906006020190506000603760386000868152602001908152602001600020548154811061173d5761173d613252565b9060005260206000209060060201905082826002015410156117b45760405162461bcd60e51b815260206004820152602a60248201527f455243333532353a20696e73756666696369656e742062616c616e636520666f60448201526939103a3930b739b332b960b11b60648201526084016107ff565b80600101548260010154146118225760405162461bcd60e51b815260206004820152602e60248201527f455243333532353a207472616e7366657220746f20746f6b656e20776974682060448201526d191a5999995c995b9d081cdb1bdd60921b60648201526084016107ff565b82826002016000828254611836919061347e565b9250508190555082816002016000828254611851919061365a565b9091555050604051838152849086906000805160206138a88339815191529060200160405180910390a36118968585856040518060200160405280600081525061211a565b6118b25760405162461bcd60e51b81526004016107ff90613672565b5050505050565b600054610100900460ff166118e05760405162461bcd60e51b81526004016107ff906136ba565b61084a83838361229e565b60006118f68261125a565b600061190183610e58565b9050806001600160a01b0316846001600160a01b03161480611928575061192881856105e8565b8061096e5750836001600160a01b03166119418461076f565b6001600160a01b031614949350505050565b826001600160a01b031661196682610e58565b6001600160a01b0316146119c85760405162461bcd60e51b8152602060048201526024808201527f455243333532353a207472616e736665722066726f6d20696e76616c6964206f6044820152633bb732b960e11b60648201526084016107ff565b6001600160a01b038216611a2c5760405162461bcd60e51b815260206004820152602560248201527f455243333532353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b60648201526084016107ff565b6000611a3782610abe565b90506000611a448361100c565b9050611a516000846112ae565b611a5a836122f7565b611a648584612393565b611a6e84846124b4565b82846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46118b2565b611abd8261125a565b600082815260386020526040812054603780549091908110611ae157611ae1613252565b600091825260209091206006909102016003810154600182015460028301549293506001600160a01b039091169184811015611b6b5760405162461bcd60e51b815260206004820152602360248201527f455243333532353a206275726e2076616c756520657863656564732062616c616044820152626e636560e81b60648201526084016107ff565b84846002016000828254611b7f919061347e565b909155505060405185815260009087906000805160206138a88339815191529060200160405180910390a35b505050505050565b611bbc8161125a565b600081815260386020526040812054603780549091908110611be057611be0613252565b60009182526020909120600691909102016003810154600182015460028301549293506001600160a01b0390911691611c18856122f7565b611c228386612393565b611c2b8561253d565b6000856000805160206138a883398151915283604051611c4d91815260200190565b60405180910390a3600082867fe4f48c240d3b994948aa54f3e2f5fca59263dfe1d52b6e4cf39a5d249b5ccb6560405160405180910390a460405185906000906001600160a01b038616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a46118b2565b6001600160a01b038216611d2b5760405162461bcd60e51b815260206004820152602a60248201527f455243333532353a20617070726f76652076616c756520746f20746865207a65604482015269726f206164647265737360b01b60648201526084016107ff565b611d35828461274b565b611d9b57600083815260386020526040902054603780549091908110611d5d57611d5d613252565b60009182526020808320600692909202909101600501805460018101825590835291200180546001600160a01b0319166001600160a01b0384161790555b60008381526036602090815260408083206001600160a01b038616808552908352928190208490555183815285917f621b050de0ad08b51d19b48b3e6df75348c4de6bdd93e81b252ca62e28265b1b91015b60405180910390a3505050565b816001600160a01b0316836001600160a01b031603611e5b5760405162461bcd60e51b815260206004820152601a60248201527f455243333532353a20617070726f766520746f2063616c6c657200000000000060448201526064016107ff565b6001600160a01b0383811660008181526039602090815260408083209487168084526002909501825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319101611ded565b611ecf848484611953565b611edb8484848461281e565b610a875760405162461bcd60e51b815260206004820152602760248201527f455243333532353a207472616e7366657220746f206e6f6e204552433732315260448201526632b1b2b4bb32b960c91b60648201526084016107ff565b60606106d76001600160a01b03831660146129cb565b611f568261125a565b6000611f6183610e58565b90506000611f6e84610abe565b905061161484846120a7565b603754600090158015906106d75750600082815260386020526040902054603780548492908110611fad57611fad613252565b9060005260206000209060060201600001541492915050565b6000611fd160375490565b611fdc90600161365a565b905090565b6040805160c081018252838152602080820184905260008284018190526001600160a01b038716606084015260808301819052835181815291820190935260a0820152905061202f81612b67565b61203984846124b4565b60405183906001600160a01b038616906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4816000847fe4f48c240d3b994948aa54f3e2f5fca59263dfe1d52b6e4cf39a5d249b5ccb6560405160405180910390a450505050565b6000828152603860205260409020546037805483929081106120cb576120cb613252565b906000526020600020906006020160020160008282546120eb919061365a565b909155505060405181815282906000906000805160206138a88339815191529060200160405180910390a35050565b60008061212685610e58565b90506001600160a01b0381163b151580156121aa57506040516301ffc9a760e01b8152629ce20b60e01b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa158015612186573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121aa9190613705565b1561229457604051629ce20b60e01b81526001600160a01b03821690629ce20b906121e19033908a908a908a908a90600401613722565b6020604051808303816000875af192505050801561221c575060408051601f3d908101601f1916820190925261221991810190613760565b60015b612279573d80801561224a576040519150601f19603f3d011682016040523d82523d6000602084013e61224f565b606091505b5080516000036122715760405162461bcd60e51b81526004016107ff90613672565b805181602001fd5b6001600160e01b031916629ce20b60e01b14915061096e9050565b600191505061096e565b600054610100900460ff166122c55760405162461bcd60e51b81526004016107ff906136ba565b60336122d1848261377d565b5060346122de838261377d565b506035805460ff191660ff929092169190911790555050565b60008181526038602052604081205460378054909190811061231b5761231b613252565b600091825260208220600560069092020190810154909250905b81811015610a8757600083600501828154811061235457612354613252565b60009182526020808320909101548783526036825260408084206001600160a01b0390921684529152812055508061238b816134a9565b915050612335565b6000818152603860205260408120546037805490919081106123b7576123b7613252565b6000918252602080832060069290920290910160030180546001600160a01b0319166001600160a01b03948516179055918416815260399091526040812080549091906124069060019061347e565b9050600082600001828154811061241f5761241f613252565b9060005260206000200154905060008360010160008681526020019081526020016000205490508184600001828154811061245c5761245c613252565b600091825260208083209091019290925583815260018601909152604080822083905586825281205583548490806124965761249661383d565b60019003818190600052602060002001600090559055505050505050565b6000818152603860205260409020546037805484929081106124d8576124d8613252565b6000918252602080832060069290920290910160030180546001600160a01b0319166001600160a01b03948516179055939091168152603980845260408083208054858552600182810188529285208190559286529082018155825292902090910155565b60375460009061254f9060019061347e565b6000838152603860205260408120546037805493945090928490811061257757612577613252565b60009182526020918290206040805160c08101825260069093029091018054835260018101548385015260028101548383015260038101546001600160a01b03908116606085015260048201541660808401526005810180548351818702810187019094528084529394919360a08601939283018282801561262257602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612604575b5050505050815250509050806037838154811061264157612641613252565b600091825260209182902083516006909202019081558282015160018201556040830151600282015560608301516003820180546001600160a01b039283166001600160a01b031991821617909155608085015160048401805491909316911617905560a0830151805191926126bf92600585019290910190612cb5565b505081516000908152603860205260408082208590558682528120555060378054806126ed576126ed61383d565b60008281526020812060066000199093019283020181815560018101829055600281018290556003810180546001600160a01b03199081169091556004820180549091169055906127416005830182612d1a565b5050905550505050565b60008181526038602052604081205460378054839290811061276f5761276f613252565b6000918252602082206005600690920201015491505b8181101561281357600084815260386020526040902054603780546001600160a01b038816929081106127ba576127ba613252565b906000526020600020906006020160050182815481106127dc576127dc613252565b6000918252602090912001546001600160a01b031603612801576001925050506106d7565b8061280b816134a9565b915050612785565b506000949350505050565b60006001600160a01b0384163b151580156128a357506040516301ffc9a760e01b8152630a85bd0160e11b60048201526001600160a01b038516906301ffc9a790602401602060405180830381865afa15801561287f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128a39190613705565b156129c357604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906128da903390899088908890600401613853565b6020604051808303816000875af1925050508015612915575060408051601f3d908101601f1916820190925261291291810190613760565b60015b6129a9573d808015612943576040519150601f19603f3d011682016040523d82523d6000602084013e612948565b606091505b5080516000036122715760405162461bcd60e51b815260206004820152602660248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201526531b2b4bb32b960d11b60648201526084016107ff565b6001600160e01b031916630a85bd0160e11b14905061096e565b50600161096e565b606060006129da8360026135c8565b6129e590600261365a565b67ffffffffffffffff8111156129fd576129fd612e76565b6040519080825280601f01601f191660200182016040528015612a27576020820181803683370190505b509050600360fc1b81600081518110612a4257612a42613252565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612a7157612a71613252565b60200101906001600160f81b031916908160001a9053506000612a958460026135c8565b612aa090600161365a565b90505b6001811115612b18576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612ad457612ad4613252565b1a60f81b828281518110612aea57612aea613252565b60200101906001600160f81b031916908160001a90535060049490941c93612b1181613890565b9050612aa3565b50831561092d5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016107ff565b603780548251600090815260386020908152604080832084905560018401855593909152835160069092027f42a7b7dd785cd69714a189dffb3fd7d7174edc9ece837694ce50f7078f7c31ae8101928355818501517f42a7b7dd785cd69714a189dffb3fd7d7174edc9ece837694ce50f7078f7c31af820155928401517f42a7b7dd785cd69714a189dffb3fd7d7174edc9ece837694ce50f7078f7c31b084015560608401517f42a7b7dd785cd69714a189dffb3fd7d7174edc9ece837694ce50f7078f7c31b1840180546001600160a01b039283166001600160a01b03199182161790915560808601517f42a7b7dd785cd69714a189dffb3fd7d7174edc9ece837694ce50f7078f7c31b28601805491909316911617905560a084015180518594610a87937f42a7b7dd785cd69714a189dffb3fd7d7174edc9ece837694ce50f7078f7c31b39091019201905b828054828255906000526020600020908101928215612d0a579160200282015b82811115612d0a57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190612cd5565b50612d16929150612d34565b5090565b50805460008255906000526020600020908101906112ab91905b5b80821115612d165760008155600101612d35565b6001600160e01b0319811681146112ab57600080fd5b600060208284031215612d7157600080fd5b813561092d81612d49565b60005b83811015612d97578181015183820152602001612d7f565b83811115610a875750506000910152565b60008151808452612dc0816020860160208601612d7c565b601f01601f19169290920160200192915050565b60208152600061092d6020830184612da8565b600060208284031215612df957600080fd5b5035919050565b80356001600160a01b0381168114610eef57600080fd5b60008060408385031215612e2a57600080fd5b612e3383612e00565b946020939093013593505050565b600080600060608486031215612e5657600080fd5b83359250612e6660208501612e00565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612eb557612eb5612e76565b604052919050565b600067ffffffffffffffff821115612ed757612ed7612e76565b50601f01601f191660200190565b6000612ef8612ef384612ebd565b612e8c565b9050828152838383011115612f0c57600080fd5b828260208301376000602084830101529392505050565b600082601f830112612f3457600080fd5b61092d83833560208501612ee5565b600080600060608486031215612f5857600080fd5b833567ffffffffffffffff80821115612f7057600080fd5b612f7c87838801612f23565b94506020860135915080821115612f9257600080fd5b50612f9f86828701612f23565b925050604084013560ff81168114612fb657600080fd5b809150509250925092565b600080600060608486031215612fd657600080fd5b612fdf84612e00565b9250612e6660208501612e00565b60008060006060848603121561300257600080fd5b505081359360208301359350604090920135919050565b6000806040838503121561302c57600080fd5b50508035926020909101359150565b6000806020838503121561304e57600080fd5b823567ffffffffffffffff8082111561306657600080fd5b818501915085601f83011261307a57600080fd5b81358181111561308957600080fd5b86602082850101111561309b57600080fd5b60209290920196919550909350505050565b6000602082840312156130bf57600080fd5b61092d82612e00565b80151581146112ab57600080fd5b600080604083850312156130e957600080fd5b6130f283612e00565b91506020830135613102816130c8565b809150509250929050565b6000806000806080858703121561312357600080fd5b61312c85612e00565b966020860135965060408601359560600135945092505050565b6000806000806080858703121561315c57600080fd5b61316585612e00565b935061317360208601612e00565b925060408501359150606085013567ffffffffffffffff81111561319657600080fd5b8501601f810187136131a757600080fd5b6131b687823560208401612ee5565b91505092959194509250565b600080604083850312156131d557600080fd5b823591506131e560208401612e00565b90509250929050565b6000806040838503121561320157600080fd5b61320a83612e00565b91506131e560208401612e00565b600181811c9082168061322c57607f821691505b60208210810361324c57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b60208082526022908201527f455243333532353a20617070726f76616c20746f2063757272656e74206f776e60408201526132b960f11b606082015260800190565b60208082526039908201527f455243333532353a20617070726f76652063616c6c6572206973206e6f74206f60408201527f776e6572206e6f7220617070726f76656420666f7220616c6c00000000000000606082015260800190565b60008351613319818460208801612d7c565b64736c6f742f60d81b908301908152835161333b816005840160208801612d7c565b01600501949350505050565b60006020828403121561335957600080fd5b815167ffffffffffffffff81111561337057600080fd5b8201601f8101841361338157600080fd5b805161338f612ef382612ebd565b8181528560208385010111156133a457600080fd5b6133b5826020830160208601612d7c565b95945050505050565b60208082526032908201527f455243333532353a207472616e736665722063616c6c6572206973206e6f74206040820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b606082015260800190565b6020808252601490820152731cdb1bdd081251081a5cc8191a5999995c995b9d60621b604082015260600190565b634e487b7160e01b600052601260045260246000fd5b6000826134635761346361343e565b500690565b634e487b7160e01b600052601160045260246000fd5b60008282101561349057613490613468565b500390565b6000826134a4576134a461343e565b500490565b6000600182016134bb576134bb613468565b5060010190565b601f82111561084a57600081815260208120601f850160051c810160208610156134e95750805b601f850160051c820191505b81811015611bab578281556001016134f5565b67ffffffffffffffff83111561352057613520612e76565b6135348361352e8354613218565b836134c2565b6000601f84116001811461356857600085156135505750838201355b600019600387901b1c1916600186901b1783556118b2565b600083815260209020601f19861690835b828110156135995786850135825560209485019460019092019101613579565b50868210156135b65760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b60008160001904831182151516156135e2576135e2613468565b500290565b600083516135f9818460208801612d7c565b83519083019061360d818360208801612d7c565b01949350505050565b60008351613628818460208801612d7c565b68636f6e74726163742f60b81b908301908152835161364e816009840160208801612d7c565b01600901949350505050565b6000821982111561366d5761366d613468565b500190565b60208082526028908201527f455243333532353a207472616e7366657220746f206e6f6e20455243333532356040820152672932b1b2b4bb32b960c11b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60006020828403121561371757600080fd5b815161092d816130c8565b60018060a01b038616815284602082015283604082015282606082015260a06080820152600061375560a0830184612da8565b979650505050505050565b60006020828403121561377257600080fd5b815161092d81612d49565b815167ffffffffffffffff81111561379757613797612e76565b6137ab816137a58454613218565b846134c2565b602080601f8311600181146137e057600084156137c85750858301515b600019600386901b1c1916600185901b178555611bab565b600085815260208120601f198616915b8281101561380f578886015182559484019460019091019084016137f0565b508582101561382d5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603160045260246000fd5b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061388690830184612da8565b9695505050505050565b60008161389f5761389f613468565b50600019019056fe0b2aac84f3ec956911fd78eae5311062972ff949f38412e8da39069d9f068cc6a2646970667358221220d45b86f819fc00d0d5e271d21aaca92e1e340881ce88448178e49617bb560f3e64736f6c634300080f0033
[ 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.