Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
RevaLiveArtXV2
Compiler Version
v0.8.2+commit.661d1103
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity ^0.8.2; // SPDX-License-Identifier: MIT import "./LiveArtX.sol"; //|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\// //|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\// //|_/\// //|_/\// //|_/\// //|_/\// //|_/\// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@/@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@, @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@. %@@@@@@@@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@, &@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@% /@@@@@@@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@, #@@@@@@@@@@@@@@@@@@@@@@@@@@@@( .@@@@@@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@, /@@@@@@@@@@@@@@@@@@@@@@@@@@* @@@@@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@, ,@@@@@@@@@@@@@@@@@@@@@@@@. &@@@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@, &@@@@@@@@@@@@@@@@@@@@& (@@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@, #@@@@@@@@@@@@@@@@@@( ,@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@, /@@@@@@@@@@@@@@@@. &@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@, ,@@@@@@@@@@@@@@ %@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@, @@@@@@@@@@@@ (@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@, #@@@@@@@@# *@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@, *@@@@@@* @@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@, .@@@@. %@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@, @& (@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// //|_/\// //|_/\// //|_/\// //|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\// //|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\// contract RevaLiveArtXV2 is RevaLiveArtX { address public membershipContractV2; /** * @dev Destroys `tokenId`. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function burnMembership(uint256 tokenId) external nonReentrant { require( _exists(tokenId), "LiveArtMember: operator query for nonexistent token" ); require( ownerOf(tokenId) == msg.sender || msg.sender == membershipContractV2, "LiveArtMember: not owner or membershipContractV2" ); _burn(tokenId); } /** * @dev sets membershipContractV2 address. * * Requirements: * * - `msg.sender` must be owner. * */ function setMembershipContractV2( address _membershipContractV2 ) external onlyOwner { membershipContractV2 = _membershipContractV2; } function getMembershipLevelById( uint256 tokenId ) external view returns (uint256) { Member storage membership = tokenExtend[tokenId]; return membership.level; } }
pragma solidity ^0.8.2; // SPDX-License-Identifier: MIT import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/cryptography/MerkleProofUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol"; //|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\// //|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\// //|_/\// //|_/\// //|_/\// //|_/\// //|_/\// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@/@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@, @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@. %@@@@@@@@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@, &@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@% /@@@@@@@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@, #@@@@@@@@@@@@@@@@@@@@@@@@@@@@( .@@@@@@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@, /@@@@@@@@@@@@@@@@@@@@@@@@@@* @@@@@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@, ,@@@@@@@@@@@@@@@@@@@@@@@@. &@@@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@, &@@@@@@@@@@@@@@@@@@@@& (@@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@, #@@@@@@@@@@@@@@@@@@( ,@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@, /@@@@@@@@@@@@@@@@. &@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@, ,@@@@@@@@@@@@@@ %@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@, @@@@@@@@@@@@ (@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@, #@@@@@@@@# *@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@, *@@@@@@* @@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@, .@@@@. %@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@, @& (@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //|_/\// //|_/\// //|_/\// //|_/\// //|_/\// //|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\// //|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\|_/\// contract RevaLiveArtX is OwnableUpgradeable, ERC721EnumerableUpgradeable, ReentrancyGuardUpgradeable { using SafeERC20Upgradeable for IERC20Upgradeable; using SafeMathUpgradeable for uint256; using StringsUpgradeable for uint256; bool private tempRecursion; uint256 private preSeed; // Base URI string private baseURI; struct Member { uint256 id; uint256 level; uint256 createdTime; uint256 lockTime; uint256 amount; bool decompose; } uint256 public unLockTimestamp; mapping(uint256 => Member) internal tokenExtend; mapping(address => bool) public claimed; // claim start time uint256 public claimStartTime; // claim end time uint256 public claimEndTime; // claim count mapping(uint256 => uint256) public claimCount; // total number of members uint256 public memberID; uint256[] public claimAmount; uint256[] public claimValue; uint256[] public levelProbability; uint256[] public retainMemberValue; IERC20Upgradeable public artToken; event ReceiveMember( address indexed owner, uint256 indexed tokenId, uint256 indexed level, uint256 lockTime, uint256 amount ); event DecomposeMember( address indexed owner, uint256 indexed tokenId, uint256 receiveAmount, bool retain ); event eveClaimData(uint256 indexed startTime, uint256 endTime); event eveUnLockTimestamp(uint256 indexed timestamp); event eveARTToken(address indexed art); event eveWithdraw(uint256 indexed amount, address indexed addr); event eveSeize( address indexed token, address indexed addr, uint256 indexed amount ); event eveURIPrefix(string indexed baseURI); // --- Init --- function initialize( IERC20Upgradeable _artToken, uint256 _claimStartTime, uint256 _claimEndTime, uint256 _unLockTimestamp, uint256[] calldata _claimAmount, uint256[] calldata _claimValue, uint256[] calldata _levelProbability, uint256[] calldata _retainMemberValue ) external initializer { __Ownable_init(); __ERC721_init( "Reva x LiveArt Memberships", "REVA.LIVEARTX.MEMBERSHIPS" ); __ReentrancyGuard_init(); preSeed = 10000; artToken = _artToken; claimStartTime = _claimStartTime; claimEndTime = _claimEndTime; unLockTimestamp = _unLockTimestamp; claimAmount = _claimAmount; claimValue = _claimValue; levelProbability = _levelProbability; retainMemberValue = _retainMemberValue; baseURI = "https://api.liveartx.com/v1/magic-box-reva/"; memberID = 0; emit eveUnLockTimestamp(_unLockTimestamp); } function claim() external nonReentrant returns (uint256) { require( !AddressUpgradeable.isContract(msg.sender), "Reva x LiveArt: can't call" ); require(block.timestamp >= claimStartTime, "Reva x LiveArt: not start"); require(claimEndTime > block.timestamp, "Reva x LiveArt: end"); address account = msg.sender; require(!claimed[account], "Reva x LiveArt: already claimed."); memberID++; _mint(account, memberID); claimed[account] = true; uint256 lockTime = getLockTime(); // level uint256 seed = computerSeed(); preSeed = seed % 10000; uint256 _base = 1000; uint256 levelRandom = seed % _base; uint256 level = getLevel(levelRandom); claimCount[level]++; Member memory member; member.id = memberID; member.level = level; member.createdTime = block.timestamp; member.lockTime = lockTime; member.amount = claimValue[level - 1]; member.decompose = false; tokenExtend[memberID] = member; emit ReceiveMember(account, memberID, level, lockTime, member.amount); return memberID; } // _retain: // true => Retain membership // false => burn function decomposeMember( uint256 tokenId, bool _retain ) external nonReentrant { require( _exists(tokenId), "Reva x LiveArt: operator query for nonexistent token" ); Member storage member = tokenExtend[tokenId]; uint256 lockTime = member.lockTime; require( (unLockTimestamp != 0) && (block.timestamp >= lockTime.add(unLockTimestamp)), "Reva x LiveArt: Lock" ); require(!member.decompose, "Reva x LiveArt: has decompose"); uint256 amount_ = member.amount; require(ownerOf(tokenId) == msg.sender, "Reva x LiveArt: not owner"); if (_retain) { uint256 retainValue = retainMemberValue[member.level - 1]; member.amount = retainValue; member.decompose = true; amount_ = amount_.sub(retainValue); } else { _burn(tokenId); } artToken.safeTransfer(msg.sender, amount_); emit DecomposeMember(msg.sender, tokenId, amount_, _retain); } function getLockTime() private view returns (uint256) { // random uint256 seed = computerSeed(); uint256 _yearTime = 365; uint256 lockDays = seed % _yearTime; uint256 lockTime = lockDays.mul(1 days).add(1 days); return lockTime; } function getLevel(uint256 v) private returns (uint256) { uint256 level = 1; for (uint256 index = 0; index < levelProbability.length; index++) { if (v <= levelProbability[index]) { level = index + 1; break; } } tempRecursion = false; return getCurrentLevel(level); } function getCurrentLevel(uint256 level) private returns (uint256) { require(level > 0, "Reva x LiveArt: level over"); require(level < 7, "Reva x LiveArt: have over"); uint256 currentLevel = level; uint256 claimCount_ = claimCount[currentLevel]; uint256 amount_ = claimAmount[currentLevel - 1]; if (claimCount_ < amount_) { return currentLevel; } else { if (currentLevel > 1 && tempRecursion == false) { currentLevel--; } else { tempRecursion = true; currentLevel++; } return getCurrentLevel(currentLevel); } } function computerSeed() private view returns (uint256) { uint256 seed = uint256( keccak256( abi.encodePacked( (block.timestamp) + (block.difficulty) + (( uint256(keccak256(abi.encodePacked(block.coinbase))) ) / (block.timestamp)) + (block.gaslimit) + ((uint256(keccak256(abi.encodePacked(msg.sender)))) / (block.timestamp)) + (block.number).add(preSeed) ) ) ); return seed; } function setClaimData( uint256 _claimStartTime, uint256 _claimEndTime, uint256[] calldata _claimAmount, uint256[] calldata _claimValue, uint256[] calldata _levelProbability ) external onlyOwner { claimStartTime = _claimStartTime; claimEndTime = _claimEndTime; claimAmount = _claimAmount; claimValue = _claimValue; levelProbability = _levelProbability; emit eveClaimData(_claimStartTime, _claimEndTime); } function setUnLockTimestamp(uint256 _unLockTimestamp) external onlyOwner { unLockTimestamp = _unLockTimestamp; emit eveUnLockTimestamp(_unLockTimestamp); } function setRetainValue( uint256[] calldata _retainMemberValue ) external onlyOwner { retainMemberValue = _retainMemberValue; } function setARTToken(IERC20Upgradeable _artToken) external onlyOwner { artToken = _artToken; emit eveARTToken(address(artToken)); } function withdraw(uint256 amount, address payable addr) external onlyOwner { addr.transfer(amount); emit eveWithdraw(amount, addr); } function seize( IERC20Upgradeable token, address addr, uint256 amount ) external onlyOwner { token.safeTransfer(addr, amount); emit eveSeize(address(token), addr, amount); } function setURIPrefix(string memory baseURI_) external onlyOwner { baseURI = baseURI_; emit eveURIPrefix(baseURI); } function getMember( uint256 tokenId ) external view returns ( uint256 level, uint256 createdTime, uint256 lockTime, uint256 amount, bool decompose ) { require( _exists(tokenId), "Reva x LiveArt: operator query for nonexistent token" ); Member memory member = tokenExtend[tokenId]; require(member.id > 0, "Reva x LiveArt: nonexistent token"); level = member.level; createdTime = member.createdTime; lockTime = member.lockTime; amount = member.amount; decompose = member.decompose; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual override returns (string memory) { return baseURI; } /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI( uint256 tokenId ) public view override returns (string memory) { require( _exists(tokenId), "Reva x LiveArt: URI query for nonexistent token" ); string memory baseURI_ = _baseURI(); return string(abi.encodePacked(baseURI_, tokenId.toString())); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuardUpgradeable is Initializable { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; function __ReentrancyGuard_init() internal onlyInitializing { __ReentrancyGuard_init_unchained(); } function __ReentrancyGuard_init_unchained() internal onlyInitializing { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal onlyInitializing { __Ownable_init_unchained(); } function __Ownable_init_unchained() internal onlyInitializing { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.0; import "../ERC721Upgradeable.sol"; import "./IERC721EnumerableUpgradeable.sol"; import "../../../proxy/utils/Initializable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721EnumerableUpgradeable is Initializable, ERC721Upgradeable, IERC721EnumerableUpgradeable { function __ERC721Enumerable_init() internal onlyInitializing { } function __ERC721Enumerable_init_unchained() internal onlyInitializing { } // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165Upgradeable, ERC721Upgradeable) returns (bool) { return interfaceId == type(IERC721EnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721Upgradeable.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721EnumerableUpgradeable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721Upgradeable.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721Upgradeable.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } /** * @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[46] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library StringsUpgradeable { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ library SafeMathUpgradeable { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20Upgradeable.sol"; import "../../../utils/AddressUpgradeable.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20Upgradeable { using AddressUpgradeable for address; function safeTransfer( IERC20Upgradeable token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20Upgradeable token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20Upgradeable token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20Upgradeable token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20Upgradeable token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20Upgradeable token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Trees proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. */ library MerkleProofUpgradeable { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merklee tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { bytes32 proofElement = proof[i]; if (computedHash <= proofElement) { // Hash(current computed hash + current element of the proof) computedHash = _efficientHash(computedHash, proofElement); } else { // Hash(current element of the proof + current computed hash) computedHash = _efficientHash(proofElement, computedHash); } } return computedHash; } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.0; import "../../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() initializer {} * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { // If the contract is initializing we ignore whether _initialized is set in order to support multiple // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the // contract may have been reentered. require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} modifier, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } function _isConstructor() private view returns (bool) { return !AddressUpgradeable.isContract(address(this)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721Upgradeable.sol"; import "./IERC721ReceiverUpgradeable.sol"; import "./extensions/IERC721MetadataUpgradeable.sol"; import "../../utils/AddressUpgradeable.sol"; import "../../utils/ContextUpgradeable.sol"; import "../../utils/StringsUpgradeable.sol"; import "../../utils/introspection/ERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable { using AddressUpgradeable for address; using StringsUpgradeable for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ function __ERC721_init(string memory name_, string memory symbol_) internal onlyInitializing { __ERC721_init_unchained(name_, symbol_); } function __ERC721_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) { return interfaceId == type(IERC721Upgradeable).interfaceId || interfaceId == type(IERC721MetadataUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721Upgradeable.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721Upgradeable.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721Upgradeable.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721Upgradeable.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721Upgradeable.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721ReceiverUpgradeable.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @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[44] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721Upgradeable.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721EnumerableUpgradeable is IERC721Upgradeable { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165Upgradeable.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721Upgradeable is IERC165Upgradeable { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721ReceiverUpgradeable { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721Upgradeable.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721MetadataUpgradeable is IERC721Upgradeable { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable { function __ERC165_init() internal onlyInitializing { } function __ERC165_init_unchained() internal onlyInitializing { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165Upgradeable).interfaceId; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165Upgradeable { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20Upgradeable { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"receiveAmount","type":"uint256"},{"indexed":false,"internalType":"bool","name":"retain","type":"bool"}],"name":"DecomposeMember","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"level","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lockTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ReceiveMember","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"art","type":"address"}],"name":"eveARTToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"startTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endTime","type":"uint256"}],"name":"eveClaimData","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"addr","type":"address"},{"indexed":true,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"eveSeize","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"string","name":"baseURI","type":"string"}],"name":"eveURIPrefix","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"eveUnLockTimestamp","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"address","name":"addr","type":"address"}],"name":"eveWithdraw","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"artToken","outputs":[{"internalType":"contract IERC20Upgradeable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burnMembership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claim","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"claimAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"claimCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimEndTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"claimValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bool","name":"_retain","type":"bool"}],"name":"decomposeMember","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getMember","outputs":[{"internalType":"uint256","name":"level","type":"uint256"},{"internalType":"uint256","name":"createdTime","type":"uint256"},{"internalType":"uint256","name":"lockTime","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bool","name":"decompose","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getMembershipLevelById","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20Upgradeable","name":"_artToken","type":"address"},{"internalType":"uint256","name":"_claimStartTime","type":"uint256"},{"internalType":"uint256","name":"_claimEndTime","type":"uint256"},{"internalType":"uint256","name":"_unLockTimestamp","type":"uint256"},{"internalType":"uint256[]","name":"_claimAmount","type":"uint256[]"},{"internalType":"uint256[]","name":"_claimValue","type":"uint256[]"},{"internalType":"uint256[]","name":"_levelProbability","type":"uint256[]"},{"internalType":"uint256[]","name":"_retainMemberValue","type":"uint256[]"}],"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":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"levelProbability","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"memberID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"membershipContractV2","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"retainMemberValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20Upgradeable","name":"token","type":"address"},{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"seize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20Upgradeable","name":"_artToken","type":"address"}],"name":"setARTToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_claimStartTime","type":"uint256"},{"internalType":"uint256","name":"_claimEndTime","type":"uint256"},{"internalType":"uint256[]","name":"_claimAmount","type":"uint256[]"},{"internalType":"uint256[]","name":"_claimValue","type":"uint256[]"},{"internalType":"uint256[]","name":"_levelProbability","type":"uint256[]"}],"name":"setClaimData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_membershipContractV2","type":"address"}],"name":"setMembershipContractV2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_retainMemberValue","type":"uint256[]"}],"name":"setRetainValue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI_","type":"string"}],"name":"setURIPrefix","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_unLockTimestamp","type":"uint256"}],"name":"setUnLockTimestamp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unLockTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address payable","name":"addr","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50613830806100206000396000f3fe608060405234801561001057600080fd5b506004361061027e5760003560e01c8063715018a61161015c578063b2a02ff1116100ce578063c884ef8311610087578063c884ef831461058b578063cc70d866146105af578063e5961754146105d3578063e82f71e2146105e6578063e985e9c5146105f9578063f2fde38b146106355761027e565b8063b2a02ff114610518578063b88d4fde1461052b578063bae1562a1461053e578063bd4cc0f514610551578063c0fc371214610565578063c87b56dd146105785761027e565b8063a22cb46511610120578063a22cb4651461048e578063a6a11bb1146104a1578063aa746f67146104ab578063ab3545e5146104b5578063acbc2fd5146104f2578063ae0be210146105055761027e565b8063715018a61461045057806385a36dfe146104585780638da5cb5b1461046b57806391e8fcd21461047c57806395d89b41146104865761027e565b806342842e0e116101f557806354d59675116101b957806354d59675146103cf5780635618a6e9146103f05780636352211e146104045780636b3a6cd3146104175780636bff2c241461042a57806370a082311461043d5761027e565b806342842e0e1461037b578063448f2f891461038e5780634bd619bb146103a15780634e71d92d146103b45780634f6ccce7146103bc5761027e565b806318160ddd1161024757806318160ddd146103135780631cc259d91461032557806323b221a01461033857806323b872dd1461034b5780632f745c591461035e57806340d1d255146103715761027e565b8062f714ce1461028357806301ffc9a71461029857806306fdde03146102c0578063081812fc146102d5578063095ea7b314610300575b600080fd5b610296610291366004613244565b610648565b005b6102ab6102a6366004613091565b6106ec565b60405190151581526020015b60405180910390f35b6102c8610719565b6040516102b79190613484565b6102e86102e336600461322c565b6107ab565b6040516001600160a01b0390911681526020016102b7565b61029661030e36600461300a565b610833565b60cb545b6040519081526020016102b7565b61031761033336600461322c565b610949565b61031761034636600461322c565b61096b565b610296610359366004612f20565b61097c565b61031761036c36600461300a565b6109ad565b6103176101345481565b610296610389366004612f20565b610a43565b61029661039c36600461328c565b610a5e565b6102966103af36600461322c565b610b02565b610317610b60565b6103176103ca36600461322c565b610ece565b6103176103dd36600461322c565b6101356020526000908152604090205481565b61013c546102e8906001600160a01b031681565b6102e861041236600461322c565b610f6f565b61031761042536600461322c565b610fe6565b6102966104383660046131e6565b610ff7565b61031761044b366004612ecc565b611079565b610296611100565b6102966104663660046130dd565b611136565b6033546001600160a01b03166102e8565b6103176101365481565b6102c8611354565b61029661049c366004612fdd565b611363565b6103176101335481565b6103176101305481565b6104c86104c336600461322c565b611372565b6040805195865260208601949094529284019190915260608301521515608082015260a0016102b7565b610296610500366004613035565b61147a565b61031761051336600461322c565b6114b1565b6102966105263660046130c9565b6114c2565b610296610539366004612f60565b611546565b61029661054c366004612ecc565b61157e565b61013b546102e8906001600160a01b031681565b610296610573366004612ecc565b6115f9565b6102c861058636600461322c565b611646565b6102ab610599366004612ecc565b6101326020526000908152604090205460ff1681565b6103176105bd36600461322c565b6000908152610131602052604090206001015490565b6102966105e136600461322c565b6116f3565b6102966105f4366004613268565b61182c565b6102ab610607366004612ee8565b6001600160a01b039182166000908152609c6020908152604080832093909416825291909152205460ff1690565b610296610643366004612ecc565b611a85565b6033546001600160a01b0316331461067b5760405162461bcd60e51b8152600401610672906134e9565b60405180910390fd5b6040516001600160a01b0382169083156108fc029084906000818181858888f193505050501580156106b1573d6000803e3d6000fd5b506040516001600160a01b0382169083907f036becee67bbe1c5cc0cd1ca3e94e0fa8fc3751900c53b98d8347133029754b690600090a35050565b60006001600160e01b0319821663780e9d6360e01b1480610711575061071182611b20565b90505b919050565b606060978054610728906136ea565b80601f0160208091040260200160405190810160405280929190818152602001828054610754906136ea565b80156107a15780601f10610776576101008083540402835291602001916107a1565b820191906000526020600020905b81548152906001019060200180831161078457829003601f168201915b5050505050905090565b60006107b682611b70565b6108175760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610672565b506000908152609b60205260409020546001600160a01b031690565b600061083e82610f6f565b9050806001600160a01b0316836001600160a01b031614156108ac5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610672565b336001600160a01b03821614806108c857506108c88133610607565b61093a5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610672565b6109448383611b8d565b505050565b610138818154811061095a57600080fd5b600091825260209091200154905081565b610137818154811061095a57600080fd5b6109863382611bfb565b6109a25760405162461bcd60e51b81526004016106729061351e565b610944838383611ce5565b60006109b883611079565b8210610a1a5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610672565b506001600160a01b0391909116600090815260c960209081526040808320938352929052205490565b61094483838360405180602001604052806000815250611546565b6033546001600160a01b03163314610a885760405162461bcd60e51b8152600401610672906134e9565b610133889055610134879055610aa16101378787612d2e565b50610aaf6101388585612d2e565b50610abd6101398383612d2e565b50877f94c861fcad56156f3692fec43a6f205b0d5fd0f79eb317ab094b5d1eeb02531988604051610af091815260200190565b60405180910390a25050505050505050565b6033546001600160a01b03163314610b2c5760405162461bcd60e51b8152600401610672906134e9565b61013081905560405181907f171373155f7743cefbbb5770a42fec4e5729ac2ad6e02c4f328cc913b4dcb80390600090a250565b6000600260fb541415610b855760405162461bcd60e51b81526004016106729061360e565b600260fb55333b15610bd95760405162461bcd60e51b815260206004820152601a60248201527f526576612078204c6976654172743a2063616e27742063616c6c0000000000006044820152606401610672565b61013354421015610c2c5760405162461bcd60e51b815260206004820152601960248201527f526576612078204c6976654172743a206e6f74207374617274000000000000006044820152606401610672565b426101345411610c745760405162461bcd60e51b815260206004820152601360248201527214995d98481e08131a5d99505c9d0e88195b99606a1b6044820152606401610672565b336000818152610132602052604090205460ff1615610cd55760405162461bcd60e51b815260206004820181905260248201527f526576612078204c6976654172743a20616c726561647920636c61696d65642e6044820152606401610672565b6101368054906000610ce683613725565b9190505550610cf88161013654611e8c565b6001600160a01b038116600090815261013260205260408120805460ff19166001179055610d24611fcc565b90506000610d3061200c565b9050610d3e61271082613740565b61012e556103e86000610d518284613740565b90506000610d5e8261210f565b600081815261013560205260408120805492935090610d7c83613725565b9190505550610dbc6040518060c0016040528060008152602001600081526020016000815260200160008152602001600081526020016000151581525090565b6101365481526020810182905242604082015260608101869052610138610de4600184613690565b81548110610e0257634e487b7160e01b600052603260045260246000fd5b6000918252602080832091909101546080840190815260a08401838152610136805485526101318452604094859020865181558685015160018201558587015160028201556060870151600382015592516004840181905591516005909301805460ff191693151593909317909255905483518a815292830191909152849290916001600160a01b038b16917f486ca58159cbac0628606aa1787f9cc7649ebf9313304ddd4980044db7a40e23910160405180910390a461013654975050505050505050600160fb5590565b6000610ed960cb5490565b8210610f3c5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610672565b60cb8281548110610f5d57634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b6000818152609960205260408120546001600160a01b0316806107115760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610672565b61013a818154811061095a57600080fd5b6033546001600160a01b031633146110215760405162461bcd60e51b8152600401610672906134e9565b80516110359061012f906020840190612d79565b5061012f60405161104691906133ac565b604051908190038120907f2c6b1110182cf23cf4129aca9ea29e8f4c651348b38a67766fd67f5a6db1d05190600090a250565b60006001600160a01b0382166110e45760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610672565b506001600160a01b03166000908152609a602052604090205490565b6033546001600160a01b0316331461112a5760405162461bcd60e51b8152600401610672906134e9565b6111346000612193565b565b600054610100900460ff166111515760005460ff1615611155565b303b155b6111b85760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610672565b600054610100900460ff161580156111e3576000805460ff1961ff0019909116610100171660011790555b6111eb6121e5565b61125f6040518060400160405280601a81526020017f526576612078204c697665417274204d656d62657273686970730000000000008152506040518060400160405280601981526020017f524556412e4c495645415254582e4d454d424552534849505300000000000000815250612214565b611267612245565b61271061012e5561013b80546001600160a01b0319166001600160a01b038f161790556101338c90556101348b90556101308a90556112a96101378a8a612d2e565b506112b76101388888612d2e565b506112c56101398686612d2e565b506112d361013a8484612d2e565b506040518060600160405280602b81526020016137d0602b913980516113029161012f91602090910190612d79565b5060006101368190556040518b917f171373155f7743cefbbb5770a42fec4e5729ac2ad6e02c4f328cc913b4dcb80391a28015611345576000805461ff00191690555b50505050505050505050505050565b606060988054610728906136ea565b61136e338383612274565b5050565b600080600080600061138386611b70565b61139f5760405162461bcd60e51b8152600401610672906135ba565b60008681526101316020908152604091829020825160c081018452815480825260018301549382019390935260028201549381019390935260038101546060840152600481015460808401526005015460ff16151560a083015261144f5760405162461bcd60e51b815260206004820152602160248201527f526576612078204c6976654172743a206e6f6e6578697374656e7420746f6b656044820152603760f91b6064820152608401610672565b602081015160408201516060830151608084015160a090940151929a91995097509195509350915050565b6033546001600160a01b031633146114a45760405162461bcd60e51b8152600401610672906134e9565b61094461013a8383612d2e565b610139818154811061095a57600080fd5b6033546001600160a01b031633146114ec5760405162461bcd60e51b8152600401610672906134e9565b6115006001600160a01b0384168383612343565b80826001600160a01b0316846001600160a01b03167ff928cf0eb6cb0b006af7b8d3975408815f806f2e9110c53d00ea53dcae790ff060405160405180910390a4505050565b6115503383611bfb565b61156c5760405162461bcd60e51b81526004016106729061351e565b61157884848484612395565b50505050565b6033546001600160a01b031633146115a85760405162461bcd60e51b8152600401610672906134e9565b61013b80546001600160a01b0319166001600160a01b0383811691909117918290556040519116907f043853279d36e1b91a19a2d217f1e45cd4c244215ec0252db0ce996e93df080a90600090a250565b6033546001600160a01b031633146116235760405162461bcd60e51b8152600401610672906134e9565b61013c80546001600160a01b0319166001600160a01b0392909216919091179055565b606061165182611b70565b6116b55760405162461bcd60e51b815260206004820152602f60248201527f526576612078204c6976654172743a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610672565b60006116bf6123c8565b9050806116cb846123d8565b6040516020016116dc92919061337d565b604051602081830303815290604052915050919050565b600260fb5414156117165760405162461bcd60e51b81526004016106729061360e565b600260fb5561172481611b70565b61178c5760405162461bcd60e51b815260206004820152603360248201527f4c6976654172744d656d6265723a206f70657261746f7220717565727920666f60448201527239103737b732bc34b9ba32b73a103a37b5b2b760691b6064820152608401610672565b3361179682610f6f565b6001600160a01b031614806117b6575061013c546001600160a01b031633145b61181b5760405162461bcd60e51b815260206004820152603060248201527f4c6976654172744d656d6265723a206e6f74206f776e6572206f72206d656d6260448201526f32b939b434b821b7b73a3930b1ba2b1960811b6064820152608401610672565b611824816124f3565b50600160fb55565b600260fb54141561184f5760405162461bcd60e51b81526004016106729061360e565b600260fb5561185d82611b70565b6118795760405162461bcd60e51b8152600401610672906135ba565b600082815261013160205260409020600381015461013054158015906118ad5750610130546118a990829061259b565b4210155b6118f05760405162461bcd60e51b8152602060048201526014602482015273526576612078204c6976654172743a204c6f636b60601b6044820152606401610672565b600582015460ff16156119455760405162461bcd60e51b815260206004820152601d60248201527f526576612078204c6976654172743a20686173206465636f6d706f73650000006044820152606401610672565b60048201543361195486610f6f565b6001600160a01b0316146119aa5760405162461bcd60e51b815260206004820152601960248201527f526576612078204c6976654172743a206e6f74206f776e6572000000000000006044820152606401610672565b8315611a1a57600061013a600185600101546119c69190613690565b815481106119e457634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546004850181905560058501805460ff191660011790559050611a1282826125a7565b915050611a23565b611a23856124f3565b61013b54611a3b906001600160a01b03163383612343565b604080518281528515156020820152869133917f6777b3b80c2151c5d01a15c43d7a0acce9bcf3ed04384f06f347d3ce2dfea901910160405180910390a35050600160fb55505050565b6033546001600160a01b03163314611aaf5760405162461bcd60e51b8152600401610672906134e9565b6001600160a01b038116611b145760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610672565b611b1d81612193565b50565b60006001600160e01b031982166380ac58cd60e01b1480611b5157506001600160e01b03198216635b5e139f60e01b145b8061071157506301ffc9a760e01b6001600160e01b0319831614610711565b6000908152609960205260409020546001600160a01b0316151590565b6000818152609b6020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611bc282610f6f565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000611c0682611b70565b611c675760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610672565b6000611c7283610f6f565b9050806001600160a01b0316846001600160a01b03161480611cad5750836001600160a01b0316611ca2846107ab565b6001600160a01b0316145b80611cdd57506001600160a01b038082166000908152609c602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316611cf882610f6f565b6001600160a01b031614611d5c5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610672565b6001600160a01b038216611dbe5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610672565b611dc98383836125b3565b611dd4600082611b8d565b6001600160a01b0383166000908152609a60205260408120805460019290611dfd908490613690565b90915550506001600160a01b0382166000908152609a60205260408120805460019290611e2b908490613645565b909155505060008181526099602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4610944565b6001600160a01b038216611ee25760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610672565b611eeb81611b70565b15611f385760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610672565b611f44600083836125b3565b6001600160a01b0382166000908152609a60205260408120805460019290611f6d908490613645565b909155505060008181526099602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a461136e565b600080611fd761200c565b905061016d6000611fe88284613740565b9050600061200362015180611ffd8482612670565b9061259b565b94505050505090565b60008061202561012e544361259b90919063ffffffff16565b6040516bffffffffffffffffffffffff193360601b16602082015242906034016040516020818303038152906040528051906020012060001c612068919061365d565b6040516bffffffffffffffffffffffff194160601b166020820152459042906034016040516020818303038152906040528051906020012060001c6120ad919061365d565b6120b74442613645565b6120c19190613645565b6120cb9190613645565b6120d59190613645565b6120df9190613645565b6040516020016120f191815260200190565b60408051601f19818403018152919052805160209091012091505090565b60006001815b6101395481101561217757610139818154811061214257634e487b7160e01b600052603260045260246000fd5b906000526020600020015484116121655761215e816001613645565b9150612177565b8061216f81613725565b915050612115565b5061012d805460ff1916905561218c8161267c565b9392505050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff1661220c5760405162461bcd60e51b81526004016106729061356f565b6111346127d5565b600054610100900460ff1661223b5760405162461bcd60e51b81526004016106729061356f565b61136e8282612805565b600054610100900460ff1661226c5760405162461bcd60e51b81526004016106729061356f565b611134612853565b816001600160a01b0316836001600160a01b031614156122d65760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610672565b6001600160a01b038381166000818152609c6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610944908490612881565b6123a0848484611ce5565b6123ac84848484612953565b6115785760405162461bcd60e51b815260040161067290613497565b606061012f8054610728906136ea565b6060816123fd57506040805180820190915260018152600360fc1b6020820152610714565b8160005b8115612427578061241181613725565b91506124209050600a8361365d565b9150612401565b60008167ffffffffffffffff81111561245057634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f19166020018201604052801561247a576020820181803683370190505b5090505b8415611cdd5761248f600183613690565b915061249c600a86613740565b6124a7906030613645565b60f81b8183815181106124ca57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506124ec600a8661365d565b945061247e565b60006124fe82610f6f565b905061250c816000846125b3565b612517600083611b8d565b6001600160a01b0381166000908152609a60205260408120805460019290612540908490613690565b909155505060008281526099602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a461136e565b600061218c8284613645565b600061218c8284613690565b6001600160a01b03831661260e576126098160cb8054600083815260cc60205260408120829055600182018355919091527fa7ce836d032b2bf62b7e2097a8e0a6d8aeb35405ad15271e96d3b0188a1d06fb0155565b612631565b816001600160a01b0316836001600160a01b031614612631576126318382612a60565b6001600160a01b03821661264d5761264881612afd565b610944565b826001600160a01b0316826001600160a01b031614610944576109448282612bd6565b600061218c8284613671565b60008082116126cd5760405162461bcd60e51b815260206004820152601a60248201527f526576612078204c6976654172743a206c6576656c206f7665720000000000006044820152606401610672565b6007821061271d5760405162461bcd60e51b815260206004820152601960248201527f526576612078204c6976654172743a2068617665206f766572000000000000006044820152606401610672565b60008281526101356020526040812054839161013761273d600185613690565b8154811061275b57634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508082101561277b57829350505050610714565b60018311801561278f575061012d5460ff16155b156127a6578261279e816136d3565b9350506127c2565b61012d805460ff19166001179055826127be81613725565b9350505b6127cb8361267c565b9350505050610714565b600054610100900460ff166127fc5760405162461bcd60e51b81526004016106729061356f565b61113433612193565b600054610100900460ff1661282c5760405162461bcd60e51b81526004016106729061356f565b815161283f906097906020850190612d79565b508051610944906098906020840190612d79565b600054610100900460ff1661287a5760405162461bcd60e51b81526004016106729061356f565b600160fb55565b60006128d6826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612c1a9092919063ffffffff16565b80519091501561094457808060200190518101906128f49190613075565b6109445760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610672565b60006001600160a01b0384163b15612a5557604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612997903390899088908890600401613447565b602060405180830381600087803b1580156129b157600080fd5b505af19250505080156129e1575060408051601f3d908101601f191682019092526129de918101906130ad565b60015b612a3b573d808015612a0f576040519150601f19603f3d011682016040523d82523d6000602084013e612a14565b606091505b508051612a335760405162461bcd60e51b815260040161067290613497565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611cdd565b506001949350505050565b60006001612a6d84611079565b612a779190613690565b600083815260ca6020526040902054909150808214612aca576001600160a01b038416600090815260c960209081526040808320858452825280832054848452818420819055835260ca90915290208190555b50600091825260ca602090815260408084208490556001600160a01b03909416835260c981528383209183525290812055565b60cb54600090612b0f90600190613690565b600083815260cc602052604081205460cb8054939450909284908110612b4557634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508060cb8381548110612b7457634e487b7160e01b600052603260045260246000fd5b600091825260208083209091019290925582815260cc909152604080822084905585825281205560cb805480612bba57634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b6000612be183611079565b6001600160a01b03909316600090815260c960209081526040808320868452825280832085905593825260ca9052919091209190915550565b6060611cdd8484600085856001600160a01b0385163b612c7c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610672565b600080866001600160a01b03168587604051612c989190613361565b60006040518083038185875af1925050503d8060008114612cd5576040519150601f19603f3d011682016040523d82523d6000602084013e612cda565b606091505b5091509150612cea828286612cf5565b979650505050505050565b60608315612d0457508161218c565b825115612d145782518084602001fd5b8160405162461bcd60e51b81526004016106729190613484565b828054828255906000526020600020908101928215612d69579160200282015b82811115612d69578235825591602001919060010190612d4e565b50612d75929150612ded565b5090565b828054612d85906136ea565b90600052602060002090601f016020900481019282612da75760008555612d69565b82601f10612dc057805160ff1916838001178555612d69565b82800160010185558215612d69579182015b82811115612d69578251825591602001919060010190612dd2565b5b80821115612d755760008155600101612dee565b600067ffffffffffffffff80841115612e1d57612e1d613780565b604051601f8501601f19908116603f01168101908282118183101715612e4557612e45613780565b81604052809350858152868686011115612e5e57600080fd5b858560208301376000602087830101525050509392505050565b60008083601f840112612e89578182fd5b50813567ffffffffffffffff811115612ea0578182fd5b6020830191508360208083028501011115612eba57600080fd5b9250929050565b803561071481613796565b600060208284031215612edd578081fd5b813561218c81613796565b60008060408385031215612efa578081fd5b8235612f0581613796565b91506020830135612f1581613796565b809150509250929050565b600080600060608486031215612f34578081fd5b8335612f3f81613796565b92506020840135612f4f81613796565b929592945050506040919091013590565b60008060008060808587031215612f75578081fd5b8435612f8081613796565b93506020850135612f9081613796565b925060408501359150606085013567ffffffffffffffff811115612fb2578182fd5b8501601f81018713612fc2578182fd5b612fd187823560208401612e02565b91505092959194509250565b60008060408385031215612fef578182fd5b8235612ffa81613796565b91506020830135612f15816137ab565b6000806040838503121561301c578182fd5b823561302781613796565b946020939093013593505050565b60008060208385031215613047578182fd5b823567ffffffffffffffff81111561305d578283fd5b61306985828601612e78565b90969095509350505050565b600060208284031215613086578081fd5b815161218c816137ab565b6000602082840312156130a2578081fd5b813561218c816137b9565b6000602082840312156130be578081fd5b815161218c816137b9565b600080600060608486031215612f34578283fd5b6000806000806000806000806000806000806101008d8f0312156130ff57898afd5b6131088d612ec1565b9b5060208d01359a5060408d0135995060608d0135985067ffffffffffffffff60808e01351115613137578788fd5b6131478e60808f01358f01612e78565b909850965067ffffffffffffffff60a08e01351115613164578586fd5b6131748e60a08f01358f01612e78565b909650945067ffffffffffffffff60c08e01351115613191578384fd5b6131a18e60c08f01358f01612e78565b909450925067ffffffffffffffff60e08e013511156131be578081fd5b6131ce8e60e08f01358f01612e78565b81935080925050509295989b509295989b509295989b565b6000602082840312156131f7578081fd5b813567ffffffffffffffff81111561320d578182fd5b8201601f8101841361321d578182fd5b611cdd84823560208401612e02565b60006020828403121561323d578081fd5b5035919050565b60008060408385031215613256578182fd5b823591506020830135612f1581613796565b6000806040838503121561327a578182fd5b823591506020830135612f15816137ab565b60008060008060008060008060a0898b0312156132a7578182fd5b8835975060208901359650604089013567ffffffffffffffff808211156132cc578384fd5b6132d88c838d01612e78565b909850965060608b01359150808211156132f0578384fd5b6132fc8c838d01612e78565b909650945060808b0135915080821115613314578384fd5b506133218b828c01612e78565b999c989b5096995094979396929594505050565b6000815180845261334d8160208601602086016136a7565b601f01601f19169290920160200192915050565b600082516133738184602087016136a7565b9190910192915050565b6000835161338f8184602088016136a7565b8351908301906133a38183602088016136a7565b01949350505050565b81546000908190600281046001808316806133c857607f831692505b60208084108214156133e857634e487b7160e01b87526022600452602487fd5b8180156133fc576001811461340d57613439565b60ff19861689528489019650613439565b60008a815260209020885b868110156134315781548b820152908501908301613418565b505084890196505b509498975050505050505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061347a90830184613335565b9695505050505050565b60006020825261218c6020830184613335565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60208082526034908201527f526576612078204c6976654172743a206f70657261746f72207175657279206660408201527337b9103737b732bc34b9ba32b73a103a37b5b2b760611b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6000821982111561365857613658613754565b500190565b60008261366c5761366c61376a565b500490565b600081600019048311821515161561368b5761368b613754565b500290565b6000828210156136a2576136a2613754565b500390565b60005b838110156136c25781810151838201526020016136aa565b838111156115785750506000910152565b6000816136e2576136e2613754565b506000190190565b6002810460018216806136fe57607f821691505b6020821081141561371f57634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141561373957613739613754565b5060010190565b60008261374f5761374f61376a565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114611b1d57600080fd5b8015158114611b1d57600080fd5b6001600160e01b031981168114611b1d57600080fdfe68747470733a2f2f6170692e6c697665617274782e636f6d2f76312f6d616769632d626f782d726576612fa2646970667358221220563af332efc371b1d096c2692c4be7465dbc391d1aa3a1874854ebea2cdc3d2464736f6c63430008020033
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061027e5760003560e01c8063715018a61161015c578063b2a02ff1116100ce578063c884ef8311610087578063c884ef831461058b578063cc70d866146105af578063e5961754146105d3578063e82f71e2146105e6578063e985e9c5146105f9578063f2fde38b146106355761027e565b8063b2a02ff114610518578063b88d4fde1461052b578063bae1562a1461053e578063bd4cc0f514610551578063c0fc371214610565578063c87b56dd146105785761027e565b8063a22cb46511610120578063a22cb4651461048e578063a6a11bb1146104a1578063aa746f67146104ab578063ab3545e5146104b5578063acbc2fd5146104f2578063ae0be210146105055761027e565b8063715018a61461045057806385a36dfe146104585780638da5cb5b1461046b57806391e8fcd21461047c57806395d89b41146104865761027e565b806342842e0e116101f557806354d59675116101b957806354d59675146103cf5780635618a6e9146103f05780636352211e146104045780636b3a6cd3146104175780636bff2c241461042a57806370a082311461043d5761027e565b806342842e0e1461037b578063448f2f891461038e5780634bd619bb146103a15780634e71d92d146103b45780634f6ccce7146103bc5761027e565b806318160ddd1161024757806318160ddd146103135780631cc259d91461032557806323b221a01461033857806323b872dd1461034b5780632f745c591461035e57806340d1d255146103715761027e565b8062f714ce1461028357806301ffc9a71461029857806306fdde03146102c0578063081812fc146102d5578063095ea7b314610300575b600080fd5b610296610291366004613244565b610648565b005b6102ab6102a6366004613091565b6106ec565b60405190151581526020015b60405180910390f35b6102c8610719565b6040516102b79190613484565b6102e86102e336600461322c565b6107ab565b6040516001600160a01b0390911681526020016102b7565b61029661030e36600461300a565b610833565b60cb545b6040519081526020016102b7565b61031761033336600461322c565b610949565b61031761034636600461322c565b61096b565b610296610359366004612f20565b61097c565b61031761036c36600461300a565b6109ad565b6103176101345481565b610296610389366004612f20565b610a43565b61029661039c36600461328c565b610a5e565b6102966103af36600461322c565b610b02565b610317610b60565b6103176103ca36600461322c565b610ece565b6103176103dd36600461322c565b6101356020526000908152604090205481565b61013c546102e8906001600160a01b031681565b6102e861041236600461322c565b610f6f565b61031761042536600461322c565b610fe6565b6102966104383660046131e6565b610ff7565b61031761044b366004612ecc565b611079565b610296611100565b6102966104663660046130dd565b611136565b6033546001600160a01b03166102e8565b6103176101365481565b6102c8611354565b61029661049c366004612fdd565b611363565b6103176101335481565b6103176101305481565b6104c86104c336600461322c565b611372565b6040805195865260208601949094529284019190915260608301521515608082015260a0016102b7565b610296610500366004613035565b61147a565b61031761051336600461322c565b6114b1565b6102966105263660046130c9565b6114c2565b610296610539366004612f60565b611546565b61029661054c366004612ecc565b61157e565b61013b546102e8906001600160a01b031681565b610296610573366004612ecc565b6115f9565b6102c861058636600461322c565b611646565b6102ab610599366004612ecc565b6101326020526000908152604090205460ff1681565b6103176105bd36600461322c565b6000908152610131602052604090206001015490565b6102966105e136600461322c565b6116f3565b6102966105f4366004613268565b61182c565b6102ab610607366004612ee8565b6001600160a01b039182166000908152609c6020908152604080832093909416825291909152205460ff1690565b610296610643366004612ecc565b611a85565b6033546001600160a01b0316331461067b5760405162461bcd60e51b8152600401610672906134e9565b60405180910390fd5b6040516001600160a01b0382169083156108fc029084906000818181858888f193505050501580156106b1573d6000803e3d6000fd5b506040516001600160a01b0382169083907f036becee67bbe1c5cc0cd1ca3e94e0fa8fc3751900c53b98d8347133029754b690600090a35050565b60006001600160e01b0319821663780e9d6360e01b1480610711575061071182611b20565b90505b919050565b606060978054610728906136ea565b80601f0160208091040260200160405190810160405280929190818152602001828054610754906136ea565b80156107a15780601f10610776576101008083540402835291602001916107a1565b820191906000526020600020905b81548152906001019060200180831161078457829003601f168201915b5050505050905090565b60006107b682611b70565b6108175760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610672565b506000908152609b60205260409020546001600160a01b031690565b600061083e82610f6f565b9050806001600160a01b0316836001600160a01b031614156108ac5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610672565b336001600160a01b03821614806108c857506108c88133610607565b61093a5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610672565b6109448383611b8d565b505050565b610138818154811061095a57600080fd5b600091825260209091200154905081565b610137818154811061095a57600080fd5b6109863382611bfb565b6109a25760405162461bcd60e51b81526004016106729061351e565b610944838383611ce5565b60006109b883611079565b8210610a1a5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610672565b506001600160a01b0391909116600090815260c960209081526040808320938352929052205490565b61094483838360405180602001604052806000815250611546565b6033546001600160a01b03163314610a885760405162461bcd60e51b8152600401610672906134e9565b610133889055610134879055610aa16101378787612d2e565b50610aaf6101388585612d2e565b50610abd6101398383612d2e565b50877f94c861fcad56156f3692fec43a6f205b0d5fd0f79eb317ab094b5d1eeb02531988604051610af091815260200190565b60405180910390a25050505050505050565b6033546001600160a01b03163314610b2c5760405162461bcd60e51b8152600401610672906134e9565b61013081905560405181907f171373155f7743cefbbb5770a42fec4e5729ac2ad6e02c4f328cc913b4dcb80390600090a250565b6000600260fb541415610b855760405162461bcd60e51b81526004016106729061360e565b600260fb55333b15610bd95760405162461bcd60e51b815260206004820152601a60248201527f526576612078204c6976654172743a2063616e27742063616c6c0000000000006044820152606401610672565b61013354421015610c2c5760405162461bcd60e51b815260206004820152601960248201527f526576612078204c6976654172743a206e6f74207374617274000000000000006044820152606401610672565b426101345411610c745760405162461bcd60e51b815260206004820152601360248201527214995d98481e08131a5d99505c9d0e88195b99606a1b6044820152606401610672565b336000818152610132602052604090205460ff1615610cd55760405162461bcd60e51b815260206004820181905260248201527f526576612078204c6976654172743a20616c726561647920636c61696d65642e6044820152606401610672565b6101368054906000610ce683613725565b9190505550610cf88161013654611e8c565b6001600160a01b038116600090815261013260205260408120805460ff19166001179055610d24611fcc565b90506000610d3061200c565b9050610d3e61271082613740565b61012e556103e86000610d518284613740565b90506000610d5e8261210f565b600081815261013560205260408120805492935090610d7c83613725565b9190505550610dbc6040518060c0016040528060008152602001600081526020016000815260200160008152602001600081526020016000151581525090565b6101365481526020810182905242604082015260608101869052610138610de4600184613690565b81548110610e0257634e487b7160e01b600052603260045260246000fd5b6000918252602080832091909101546080840190815260a08401838152610136805485526101318452604094859020865181558685015160018201558587015160028201556060870151600382015592516004840181905591516005909301805460ff191693151593909317909255905483518a815292830191909152849290916001600160a01b038b16917f486ca58159cbac0628606aa1787f9cc7649ebf9313304ddd4980044db7a40e23910160405180910390a461013654975050505050505050600160fb5590565b6000610ed960cb5490565b8210610f3c5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610672565b60cb8281548110610f5d57634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b6000818152609960205260408120546001600160a01b0316806107115760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610672565b61013a818154811061095a57600080fd5b6033546001600160a01b031633146110215760405162461bcd60e51b8152600401610672906134e9565b80516110359061012f906020840190612d79565b5061012f60405161104691906133ac565b604051908190038120907f2c6b1110182cf23cf4129aca9ea29e8f4c651348b38a67766fd67f5a6db1d05190600090a250565b60006001600160a01b0382166110e45760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610672565b506001600160a01b03166000908152609a602052604090205490565b6033546001600160a01b0316331461112a5760405162461bcd60e51b8152600401610672906134e9565b6111346000612193565b565b600054610100900460ff166111515760005460ff1615611155565b303b155b6111b85760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610672565b600054610100900460ff161580156111e3576000805460ff1961ff0019909116610100171660011790555b6111eb6121e5565b61125f6040518060400160405280601a81526020017f526576612078204c697665417274204d656d62657273686970730000000000008152506040518060400160405280601981526020017f524556412e4c495645415254582e4d454d424552534849505300000000000000815250612214565b611267612245565b61271061012e5561013b80546001600160a01b0319166001600160a01b038f161790556101338c90556101348b90556101308a90556112a96101378a8a612d2e565b506112b76101388888612d2e565b506112c56101398686612d2e565b506112d361013a8484612d2e565b506040518060600160405280602b81526020016137d0602b913980516113029161012f91602090910190612d79565b5060006101368190556040518b917f171373155f7743cefbbb5770a42fec4e5729ac2ad6e02c4f328cc913b4dcb80391a28015611345576000805461ff00191690555b50505050505050505050505050565b606060988054610728906136ea565b61136e338383612274565b5050565b600080600080600061138386611b70565b61139f5760405162461bcd60e51b8152600401610672906135ba565b60008681526101316020908152604091829020825160c081018452815480825260018301549382019390935260028201549381019390935260038101546060840152600481015460808401526005015460ff16151560a083015261144f5760405162461bcd60e51b815260206004820152602160248201527f526576612078204c6976654172743a206e6f6e6578697374656e7420746f6b656044820152603760f91b6064820152608401610672565b602081015160408201516060830151608084015160a090940151929a91995097509195509350915050565b6033546001600160a01b031633146114a45760405162461bcd60e51b8152600401610672906134e9565b61094461013a8383612d2e565b610139818154811061095a57600080fd5b6033546001600160a01b031633146114ec5760405162461bcd60e51b8152600401610672906134e9565b6115006001600160a01b0384168383612343565b80826001600160a01b0316846001600160a01b03167ff928cf0eb6cb0b006af7b8d3975408815f806f2e9110c53d00ea53dcae790ff060405160405180910390a4505050565b6115503383611bfb565b61156c5760405162461bcd60e51b81526004016106729061351e565b61157884848484612395565b50505050565b6033546001600160a01b031633146115a85760405162461bcd60e51b8152600401610672906134e9565b61013b80546001600160a01b0319166001600160a01b0383811691909117918290556040519116907f043853279d36e1b91a19a2d217f1e45cd4c244215ec0252db0ce996e93df080a90600090a250565b6033546001600160a01b031633146116235760405162461bcd60e51b8152600401610672906134e9565b61013c80546001600160a01b0319166001600160a01b0392909216919091179055565b606061165182611b70565b6116b55760405162461bcd60e51b815260206004820152602f60248201527f526576612078204c6976654172743a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610672565b60006116bf6123c8565b9050806116cb846123d8565b6040516020016116dc92919061337d565b604051602081830303815290604052915050919050565b600260fb5414156117165760405162461bcd60e51b81526004016106729061360e565b600260fb5561172481611b70565b61178c5760405162461bcd60e51b815260206004820152603360248201527f4c6976654172744d656d6265723a206f70657261746f7220717565727920666f60448201527239103737b732bc34b9ba32b73a103a37b5b2b760691b6064820152608401610672565b3361179682610f6f565b6001600160a01b031614806117b6575061013c546001600160a01b031633145b61181b5760405162461bcd60e51b815260206004820152603060248201527f4c6976654172744d656d6265723a206e6f74206f776e6572206f72206d656d6260448201526f32b939b434b821b7b73a3930b1ba2b1960811b6064820152608401610672565b611824816124f3565b50600160fb55565b600260fb54141561184f5760405162461bcd60e51b81526004016106729061360e565b600260fb5561185d82611b70565b6118795760405162461bcd60e51b8152600401610672906135ba565b600082815261013160205260409020600381015461013054158015906118ad5750610130546118a990829061259b565b4210155b6118f05760405162461bcd60e51b8152602060048201526014602482015273526576612078204c6976654172743a204c6f636b60601b6044820152606401610672565b600582015460ff16156119455760405162461bcd60e51b815260206004820152601d60248201527f526576612078204c6976654172743a20686173206465636f6d706f73650000006044820152606401610672565b60048201543361195486610f6f565b6001600160a01b0316146119aa5760405162461bcd60e51b815260206004820152601960248201527f526576612078204c6976654172743a206e6f74206f776e6572000000000000006044820152606401610672565b8315611a1a57600061013a600185600101546119c69190613690565b815481106119e457634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546004850181905560058501805460ff191660011790559050611a1282826125a7565b915050611a23565b611a23856124f3565b61013b54611a3b906001600160a01b03163383612343565b604080518281528515156020820152869133917f6777b3b80c2151c5d01a15c43d7a0acce9bcf3ed04384f06f347d3ce2dfea901910160405180910390a35050600160fb55505050565b6033546001600160a01b03163314611aaf5760405162461bcd60e51b8152600401610672906134e9565b6001600160a01b038116611b145760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610672565b611b1d81612193565b50565b60006001600160e01b031982166380ac58cd60e01b1480611b5157506001600160e01b03198216635b5e139f60e01b145b8061071157506301ffc9a760e01b6001600160e01b0319831614610711565b6000908152609960205260409020546001600160a01b0316151590565b6000818152609b6020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611bc282610f6f565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000611c0682611b70565b611c675760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610672565b6000611c7283610f6f565b9050806001600160a01b0316846001600160a01b03161480611cad5750836001600160a01b0316611ca2846107ab565b6001600160a01b0316145b80611cdd57506001600160a01b038082166000908152609c602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316611cf882610f6f565b6001600160a01b031614611d5c5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610672565b6001600160a01b038216611dbe5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610672565b611dc98383836125b3565b611dd4600082611b8d565b6001600160a01b0383166000908152609a60205260408120805460019290611dfd908490613690565b90915550506001600160a01b0382166000908152609a60205260408120805460019290611e2b908490613645565b909155505060008181526099602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4610944565b6001600160a01b038216611ee25760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610672565b611eeb81611b70565b15611f385760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610672565b611f44600083836125b3565b6001600160a01b0382166000908152609a60205260408120805460019290611f6d908490613645565b909155505060008181526099602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a461136e565b600080611fd761200c565b905061016d6000611fe88284613740565b9050600061200362015180611ffd8482612670565b9061259b565b94505050505090565b60008061202561012e544361259b90919063ffffffff16565b6040516bffffffffffffffffffffffff193360601b16602082015242906034016040516020818303038152906040528051906020012060001c612068919061365d565b6040516bffffffffffffffffffffffff194160601b166020820152459042906034016040516020818303038152906040528051906020012060001c6120ad919061365d565b6120b74442613645565b6120c19190613645565b6120cb9190613645565b6120d59190613645565b6120df9190613645565b6040516020016120f191815260200190565b60408051601f19818403018152919052805160209091012091505090565b60006001815b6101395481101561217757610139818154811061214257634e487b7160e01b600052603260045260246000fd5b906000526020600020015484116121655761215e816001613645565b9150612177565b8061216f81613725565b915050612115565b5061012d805460ff1916905561218c8161267c565b9392505050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff1661220c5760405162461bcd60e51b81526004016106729061356f565b6111346127d5565b600054610100900460ff1661223b5760405162461bcd60e51b81526004016106729061356f565b61136e8282612805565b600054610100900460ff1661226c5760405162461bcd60e51b81526004016106729061356f565b611134612853565b816001600160a01b0316836001600160a01b031614156122d65760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610672565b6001600160a01b038381166000818152609c6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610944908490612881565b6123a0848484611ce5565b6123ac84848484612953565b6115785760405162461bcd60e51b815260040161067290613497565b606061012f8054610728906136ea565b6060816123fd57506040805180820190915260018152600360fc1b6020820152610714565b8160005b8115612427578061241181613725565b91506124209050600a8361365d565b9150612401565b60008167ffffffffffffffff81111561245057634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f19166020018201604052801561247a576020820181803683370190505b5090505b8415611cdd5761248f600183613690565b915061249c600a86613740565b6124a7906030613645565b60f81b8183815181106124ca57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506124ec600a8661365d565b945061247e565b60006124fe82610f6f565b905061250c816000846125b3565b612517600083611b8d565b6001600160a01b0381166000908152609a60205260408120805460019290612540908490613690565b909155505060008281526099602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a461136e565b600061218c8284613645565b600061218c8284613690565b6001600160a01b03831661260e576126098160cb8054600083815260cc60205260408120829055600182018355919091527fa7ce836d032b2bf62b7e2097a8e0a6d8aeb35405ad15271e96d3b0188a1d06fb0155565b612631565b816001600160a01b0316836001600160a01b031614612631576126318382612a60565b6001600160a01b03821661264d5761264881612afd565b610944565b826001600160a01b0316826001600160a01b031614610944576109448282612bd6565b600061218c8284613671565b60008082116126cd5760405162461bcd60e51b815260206004820152601a60248201527f526576612078204c6976654172743a206c6576656c206f7665720000000000006044820152606401610672565b6007821061271d5760405162461bcd60e51b815260206004820152601960248201527f526576612078204c6976654172743a2068617665206f766572000000000000006044820152606401610672565b60008281526101356020526040812054839161013761273d600185613690565b8154811061275b57634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508082101561277b57829350505050610714565b60018311801561278f575061012d5460ff16155b156127a6578261279e816136d3565b9350506127c2565b61012d805460ff19166001179055826127be81613725565b9350505b6127cb8361267c565b9350505050610714565b600054610100900460ff166127fc5760405162461bcd60e51b81526004016106729061356f565b61113433612193565b600054610100900460ff1661282c5760405162461bcd60e51b81526004016106729061356f565b815161283f906097906020850190612d79565b508051610944906098906020840190612d79565b600054610100900460ff1661287a5760405162461bcd60e51b81526004016106729061356f565b600160fb55565b60006128d6826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612c1a9092919063ffffffff16565b80519091501561094457808060200190518101906128f49190613075565b6109445760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610672565b60006001600160a01b0384163b15612a5557604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612997903390899088908890600401613447565b602060405180830381600087803b1580156129b157600080fd5b505af19250505080156129e1575060408051601f3d908101601f191682019092526129de918101906130ad565b60015b612a3b573d808015612a0f576040519150601f19603f3d011682016040523d82523d6000602084013e612a14565b606091505b508051612a335760405162461bcd60e51b815260040161067290613497565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611cdd565b506001949350505050565b60006001612a6d84611079565b612a779190613690565b600083815260ca6020526040902054909150808214612aca576001600160a01b038416600090815260c960209081526040808320858452825280832054848452818420819055835260ca90915290208190555b50600091825260ca602090815260408084208490556001600160a01b03909416835260c981528383209183525290812055565b60cb54600090612b0f90600190613690565b600083815260cc602052604081205460cb8054939450909284908110612b4557634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508060cb8381548110612b7457634e487b7160e01b600052603260045260246000fd5b600091825260208083209091019290925582815260cc909152604080822084905585825281205560cb805480612bba57634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b6000612be183611079565b6001600160a01b03909316600090815260c960209081526040808320868452825280832085905593825260ca9052919091209190915550565b6060611cdd8484600085856001600160a01b0385163b612c7c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610672565b600080866001600160a01b03168587604051612c989190613361565b60006040518083038185875af1925050503d8060008114612cd5576040519150601f19603f3d011682016040523d82523d6000602084013e612cda565b606091505b5091509150612cea828286612cf5565b979650505050505050565b60608315612d0457508161218c565b825115612d145782518084602001fd5b8160405162461bcd60e51b81526004016106729190613484565b828054828255906000526020600020908101928215612d69579160200282015b82811115612d69578235825591602001919060010190612d4e565b50612d75929150612ded565b5090565b828054612d85906136ea565b90600052602060002090601f016020900481019282612da75760008555612d69565b82601f10612dc057805160ff1916838001178555612d69565b82800160010185558215612d69579182015b82811115612d69578251825591602001919060010190612dd2565b5b80821115612d755760008155600101612dee565b600067ffffffffffffffff80841115612e1d57612e1d613780565b604051601f8501601f19908116603f01168101908282118183101715612e4557612e45613780565b81604052809350858152868686011115612e5e57600080fd5b858560208301376000602087830101525050509392505050565b60008083601f840112612e89578182fd5b50813567ffffffffffffffff811115612ea0578182fd5b6020830191508360208083028501011115612eba57600080fd5b9250929050565b803561071481613796565b600060208284031215612edd578081fd5b813561218c81613796565b60008060408385031215612efa578081fd5b8235612f0581613796565b91506020830135612f1581613796565b809150509250929050565b600080600060608486031215612f34578081fd5b8335612f3f81613796565b92506020840135612f4f81613796565b929592945050506040919091013590565b60008060008060808587031215612f75578081fd5b8435612f8081613796565b93506020850135612f9081613796565b925060408501359150606085013567ffffffffffffffff811115612fb2578182fd5b8501601f81018713612fc2578182fd5b612fd187823560208401612e02565b91505092959194509250565b60008060408385031215612fef578182fd5b8235612ffa81613796565b91506020830135612f15816137ab565b6000806040838503121561301c578182fd5b823561302781613796565b946020939093013593505050565b60008060208385031215613047578182fd5b823567ffffffffffffffff81111561305d578283fd5b61306985828601612e78565b90969095509350505050565b600060208284031215613086578081fd5b815161218c816137ab565b6000602082840312156130a2578081fd5b813561218c816137b9565b6000602082840312156130be578081fd5b815161218c816137b9565b600080600060608486031215612f34578283fd5b6000806000806000806000806000806000806101008d8f0312156130ff57898afd5b6131088d612ec1565b9b5060208d01359a5060408d0135995060608d0135985067ffffffffffffffff60808e01351115613137578788fd5b6131478e60808f01358f01612e78565b909850965067ffffffffffffffff60a08e01351115613164578586fd5b6131748e60a08f01358f01612e78565b909650945067ffffffffffffffff60c08e01351115613191578384fd5b6131a18e60c08f01358f01612e78565b909450925067ffffffffffffffff60e08e013511156131be578081fd5b6131ce8e60e08f01358f01612e78565b81935080925050509295989b509295989b509295989b565b6000602082840312156131f7578081fd5b813567ffffffffffffffff81111561320d578182fd5b8201601f8101841361321d578182fd5b611cdd84823560208401612e02565b60006020828403121561323d578081fd5b5035919050565b60008060408385031215613256578182fd5b823591506020830135612f1581613796565b6000806040838503121561327a578182fd5b823591506020830135612f15816137ab565b60008060008060008060008060a0898b0312156132a7578182fd5b8835975060208901359650604089013567ffffffffffffffff808211156132cc578384fd5b6132d88c838d01612e78565b909850965060608b01359150808211156132f0578384fd5b6132fc8c838d01612e78565b909650945060808b0135915080821115613314578384fd5b506133218b828c01612e78565b999c989b5096995094979396929594505050565b6000815180845261334d8160208601602086016136a7565b601f01601f19169290920160200192915050565b600082516133738184602087016136a7565b9190910192915050565b6000835161338f8184602088016136a7565b8351908301906133a38183602088016136a7565b01949350505050565b81546000908190600281046001808316806133c857607f831692505b60208084108214156133e857634e487b7160e01b87526022600452602487fd5b8180156133fc576001811461340d57613439565b60ff19861689528489019650613439565b60008a815260209020885b868110156134315781548b820152908501908301613418565b505084890196505b509498975050505050505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061347a90830184613335565b9695505050505050565b60006020825261218c6020830184613335565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60208082526034908201527f526576612078204c6976654172743a206f70657261746f72207175657279206660408201527337b9103737b732bc34b9ba32b73a103a37b5b2b760611b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6000821982111561365857613658613754565b500190565b60008261366c5761366c61376a565b500490565b600081600019048311821515161561368b5761368b613754565b500290565b6000828210156136a2576136a2613754565b500390565b60005b838110156136c25781810151838201526020016136aa565b838111156115785750506000910152565b6000816136e2576136e2613754565b506000190190565b6002810460018216806136fe57607f821691505b6020821081141561371f57634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141561373957613739613754565b5060010190565b60008261374f5761374f61376a565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114611b1d57600080fd5b8015158114611b1d57600080fd5b6001600160e01b031981168114611b1d57600080fdfe68747470733a2f2f6170692e6c697665617274782e636f6d2f76312f6d616769632d626f782d726576612fa2646970667358221220563af332efc371b1d096c2692c4be7465dbc391d1aa3a1874854ebea2cdc3d2464736f6c63430008020033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.