ERC-721
Overview
Max Total Supply
8,633 WULFZ
Holders
1,149
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
2 WULFZLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
WulfzNFT
Compiler Version
v0.8.10+commit.fc410830
Optimization Enabled:
Yes with 1000 runs
Other Settings:
byzantium EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT /* ████ ████ ██████ ██████ ████████ ████████ ██████████████████████ ██████████████████████ ██████ ██████ ██████ ██████ ██ ██ ██████ ██████████████████████████ ██████████ ██████████ ████████ ████████ ██████████████████ ██████████ Wulfz / 2021 */ pragma solidity >=0.4.22 <0.9.0; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "./Profile.sol"; import "./Awoo.sol"; import "./StakingPool.sol"; contract WulfzNFT is Profile, Ownable { enum WulfzType { Genesis, Pupz, Alpha } struct WulfzInfo { WulfzType wType; bool bStaked; uint256 lastBreedTime; } event WulfzMinted( address indexed user, uint256 indexed tokenId, uint256 indexed wType ); event PreSaleTimeChanged(uint256 newTime, uint256 currentTime); event PublicSaleTimeChanged(uint256 newTime, uint256 currentTime); event StakingTimeChanged(uint256 newTime, uint256 currentTime); event EvolveTimeChanged(uint256 newTime, uint256 currentTime); event AdoptionTimeChanged(uint256 newTime, uint256 currentTime); event PoolAddrSet(address from, address addr); event UtilityAddrSet(address from, address addr); uint256 public constant MINT_PRICE = 80000000000000000; // 0.08 ETH uint256 public constant BREED_PRICE = 600; uint256 public constant EVOLVE_PRICE = 1500; uint256[] private COOLDOWN_TIME_FOR_BREED = [14 days, 0, 7 days]; uint256[] private MAX_SUPPLY_BY_TYPE = [5555, 10000, 100]; uint256[] private START_ID_BY_TYPE = [0, 6000, 5600]; uint256[] public totalSupplyByType = [0, 0, 0]; uint256 public startTimeOfPrivateSale; uint256 public startTimeOfPublicSale; uint256 public startTimeOfStaking; uint256 public startTimeOfAdopt; uint256 public startTimeOfEvolve; mapping(uint256 => WulfzInfo) public wulfz; mapping(address => bool) private claimInPresale; mapping(address => uint256) private claimInPublicSale; string public _baseTokenURI = "https://ipfs.io/ipfs/QmQtN81i9eNrD3wxcr67scDpLvZDDXxbmAvNXMaZh3D6tB/"; UtilityToken private _utilityToken; StakingPool private _pool; constructor(string memory _name, string memory _symbol) Profile(_name, _symbol) { startTimeOfPrivateSale = 1640624400; // Mon Dec 27 2021 12:00:00 GMT-0500 (Eastern Standard Time) startTimeOfPublicSale = 1640710800; // Tue Dec 28 2021 12:00:00 GMT-0500 (Eastern Standard Time) startTimeOfStaking = 1641574800; // Fri Jan 07 2022 12:00:00 GMT-0500 (Eastern Standard Time) startTimeOfAdopt = 1646110800; // Tue Mar 01 2022 00:00:00 GMT-0500 (Eastern Standard Time) startTimeOfEvolve = 1654056000; // Wed Jun 01 2022 00:00:00 GMT-0400 (Eastern Daylight Time) // 55 Wulfz will be held in the Vault for Promotional purposes for (uint256 i = 0; i < 55; i++) { mintOne(WulfzType.Genesis); } } /** * @dev return the Base URI of the token */ function _baseURI() internal view override returns (string memory) { return _baseTokenURI; } /** * @dev set the _baseTokenURI * @param _newURI of the _baseTokenURI */ function setBaseURI(string calldata _newURI) external onlyOwner { _baseTokenURI = _newURI; } function withdraw() public onlyOwner { uint256 balance = address(this).balance; require(balance > 0, "Balance is zero"); payable(msg.sender).transfer(balance); } function getWulfzType(uint256 _tokenId) public view returns (uint256) { return uint256(wulfz[_tokenId].wType); } /** * @dev Only whitelisted can mint */ function Presale(bytes32[] calldata _proof) external payable { require(msg.value >= MINT_PRICE, "Minting Price is not enough"); require( block.timestamp > startTimeOfPrivateSale, "Private Sale is not started yet" ); require( block.timestamp < startTimeOfPrivateSale + 86400, "Private Sale is already ended" ); require( !claimInPresale[msg.sender], "You've already minted token. If you want more, you will be able to mint during Public Sale" ); bytes32 merkleTreeRoot = 0x12b1013fe853dea282b3440a70e5d739b7ef75e135122659fe5408bde23a4cc1; bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); require( MerkleProof.verify(_proof, merkleTreeRoot, leaf), "Sorry, you're not whitelisted. Please try Public Sale" ); claimInPresale[msg.sender] = true; mintOne(WulfzType.Genesis); } /** * @dev Mint the _amount of tokens * @param _amount is the token count */ function PublicSale(uint256 _amount) external payable { require( msg.value >= MINT_PRICE * _amount, "Minting Price is not enough" ); require( block.timestamp > startTimeOfPublicSale, "Public Sale is not started yet" ); require( block.timestamp < startTimeOfPublicSale + 86400, "Public Sale is already ended" ); require(_amount < 3, "You can only require at most 2"); require( claimInPublicSale[msg.sender] < 3, "You can only mint at most 2 during Public Sale" ); claimInPublicSale[msg.sender] += _amount; for (uint256 i = 0; i < _amount; i++) { mintOne(WulfzType.Genesis); } } function mintOne(WulfzType _type) private { require(msg.sender == tx.origin); require( totalSupplyByType[uint256(_type)] < MAX_SUPPLY_BY_TYPE[uint256(_type)], "All tokens are minted" ); uint256 tokenId = ++totalSupplyByType[uint256(_type)]; tokenId += START_ID_BY_TYPE[uint256(_type)]; _safeMint(msg.sender, tokenId); wulfz[tokenId].wType = _type; emit WulfzMinted(msg.sender, tokenId, uint256(_type)); } function setUtilitytoken(address _addr) external onlyOwner { _utilityToken = UtilityToken(_addr); emit UtilityAddrSet(address(this), _addr); } function setStakingPool(address _addr) external onlyOwner { _pool = StakingPool(_addr); emit PoolAddrSet(address(this), _addr); } function setStartTimeOfPrivateSale(uint256 _timeStamp) external onlyOwner { startTimeOfPrivateSale = _timeStamp; emit PreSaleTimeChanged(startTimeOfPrivateSale, block.timestamp); } function setStartTimeOfPublicSale(uint256 _timeStamp) external onlyOwner { startTimeOfPublicSale = _timeStamp; emit PublicSaleTimeChanged(startTimeOfPublicSale, block.timestamp); } /******************************************************************************* *** Staking Logic *** ******************************************************************************** */ function setStakingTime(uint256 _timeStamp) external onlyOwner { startTimeOfStaking = _timeStamp; emit StakingTimeChanged(startTimeOfStaking, block.timestamp); } function startStaking(uint256 _tokenId) external { require( block.timestamp > startTimeOfStaking, "Staking Mechanism is not started yet" ); require(ownerOf(_tokenId) == msg.sender, "Staking: owner not matched"); require( !wulfz[_tokenId].bStaked, "This Token is already staked. Please try another token." ); _pool.startStaking(msg.sender, _tokenId); _safeTransfer(msg.sender, address(_pool), _tokenId, ""); wulfz[_tokenId].bStaked = true; } function stopStaking(uint256 _tokenId) external { require( wulfz[_tokenId].bStaked, "This token hasn't ever been staked yet." ); _pool.stopStaking(msg.sender, _tokenId); _safeTransfer(address(_pool), msg.sender, _tokenId, ""); wulfz[_tokenId].bStaked = false; } /******************************************************************************* *** Adopting Logic *** ********************************************************************************/ function setAdoptTime(uint256 _timeStamp) external onlyOwner { startTimeOfAdopt = _timeStamp; emit AdoptionTimeChanged(startTimeOfAdopt, block.timestamp); } function canAdopt(uint256 _tokenId) public view returns (bool) { uint256 wType = uint256(wulfz[_tokenId].wType); require( wulfz[_tokenId].wType != WulfzType.Pupz, "Try adopting with Genesis or Alpha Wulfz" ); uint256 lastBreedTime = wulfz[_tokenId].lastBreedTime; uint256 cooldown = COOLDOWN_TIME_FOR_BREED[wType]; return (block.timestamp - lastBreedTime) > cooldown; } function isAdoptionStart() public view returns (bool) { return block.timestamp > startTimeOfAdopt; } function adopt(uint256 _parent) external { require( canAdopt(_parent), "Already adopt in the past days. Genesis Wulfz can adopt every 14 days and Alpha can do every 7 days." ); require(isAdoptionStart(), "Adopting Pupz is not ready yet"); require( ownerOf(_parent) == msg.sender, "Adopting: You're not owner of this token" ); require( !wulfz[_parent].bStaked, "This Token is already staked. Please try another token." ); _utilityToken.burn( msg.sender, BREED_PRICE * (10**_utilityToken.decimals()) ); mintOne(WulfzType.Pupz); wulfz[_parent].lastBreedTime = block.timestamp; } /******************************************************************************* *** Evolution Logic *** ********************************************************************************/ function setEvolveTime(uint256 _timeStamp) external onlyOwner { startTimeOfEvolve = _timeStamp; emit EvolveTimeChanged(startTimeOfEvolve, block.timestamp); } function isEvolveStart() public view returns (bool) { return block.timestamp > startTimeOfEvolve; } function evolve(uint256 _tokenId) external { require(isEvolveStart(), "Evolving Wulfz is not ready yet"); require( ownerOf(_tokenId) == msg.sender, "Evolve: You're not owner of this token" ); require( wulfz[_tokenId].wType == WulfzType.Genesis, "Genesis can only evolve Alpha" ); require( !wulfz[_tokenId].bStaked, "This Token is already staked. Please try another token." ); _utilityToken.burn( msg.sender, EVOLVE_PRICE * (10**_utilityToken.decimals()) ); _burn(_tokenId); mintOne(WulfzType.Alpha); } /******************************************************************************* *** Profile Change *** ********************************************************************************/ function changeName(uint256 _tokenId, string memory newName) public override { require( ownerOf(_tokenId) == msg.sender, "ChangeName: you're not the owner" ); require( !wulfz[_tokenId].bStaked, "This Token is already staked. Please try another token." ); _utilityToken.burn( msg.sender, NAME_CHANGE_PRICE * (10**_utilityToken.decimals()) ); super.changeName(_tokenId, newName); } function changeBio(uint256 _tokenId, string memory _bio) public override { require( ownerOf(_tokenId) == msg.sender, "ChangeBio: you're not the owner" ); _utilityToken.burn( msg.sender, BIO_CHANGE_PRICE * (10**_utilityToken.decimals()) ); super.changeBio(_tokenId, _bio); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.4.22 <0.9.0; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "./Awoo.sol"; interface IWulfz { function getWulfzType(uint256 _tokenId) external view returns (uint256); } contract StakingPool is IERC721Receiver, Ownable { using EnumerableSet for EnumerableSet.UintSet; event StakeStarted(address indexed user, uint256 indexed tokenId); event StakeStopped(address indexed user, uint256 indexed tokenId); event UtilityAddrSet(address from, address addr); uint256[] private STAKE_REWARD_BY_TYPE = [10, 5, 50]; IWulfz private _wulfzContract; UtilityToken private _utilityToken; struct StakedInfo { uint256 wType; uint256 lastUpdate; } mapping(uint256 => StakedInfo) private tokenInfo; mapping(address => EnumerableSet.UintSet) private stakedWulfz; modifier masterContract() { require( msg.sender == address(_wulfzContract), "Master Contract can only call Staking Contract" ); _; } constructor(address _wulfzAddr) { _wulfzContract = IWulfz(_wulfzAddr); } function setUtilitytoken(address _addr) external onlyOwner { _utilityToken = UtilityToken(_addr); emit UtilityAddrSet(address(this), _addr); } function startStaking(address _user, uint256 _tokenId) external masterContract { require(!stakedWulfz[_user].contains(_tokenId), "Already staked"); tokenInfo[_tokenId].wType = _wulfzContract.getWulfzType(_tokenId); tokenInfo[_tokenId].lastUpdate = block.timestamp; stakedWulfz[_user].add(_tokenId); emit StakeStarted(_user, _tokenId); } function stopStaking(address _user, uint256 _tokenId) external masterContract { require(stakedWulfz[_user].contains(_tokenId), "You're not the owner"); uint256 wType = tokenInfo[_tokenId].wType; uint256 rewardBase = STAKE_REWARD_BY_TYPE[wType]; uint256 interval = block.timestamp - tokenInfo[_tokenId].lastUpdate; uint256 reward = ((rewardBase * interval) * 10**_utilityToken.decimals()) / 86400; _utilityToken.reward(_user, reward); delete tokenInfo[_tokenId]; stakedWulfz[_user].remove(_tokenId); emit StakeStopped(_user, _tokenId); } function stakedTokensOf(address _user) public view returns (uint256[] memory) { uint256[] memory tokens = new uint256[](stakedWulfz[_user].length()); for (uint256 i = 0; i < stakedWulfz[_user].length(); i++) { tokens[i] = stakedWulfz[_user].at(i); } return tokens; } function getClaimableToken(address _user) public view returns (uint256) { uint256[] memory tokens = stakedTokensOf(_user); uint256 totalAmount = 0; for (uint256 i = 0; i < tokens.length; i++) { uint256 wType = tokenInfo[tokens[i]].wType; uint256 rewardBase = STAKE_REWARD_BY_TYPE[wType]; uint256 interval = block.timestamp - tokenInfo[tokens[i]].lastUpdate; uint256 reward = ((rewardBase * interval) * 10**_utilityToken.decimals()) / 86400; totalAmount += reward; } return totalAmount; } function getReward() external { _utilityToken.reward(msg.sender, getClaimableToken(msg.sender)); for (uint256 i = 0; i < stakedWulfz[msg.sender].length(); i++) { uint256 tokenId = stakedWulfz[msg.sender].at(i); tokenInfo[tokenId].lastUpdate = block.timestamp; } } /** * ERC721Receiver hook for single transfer. * @dev Reverts if the caller is not the whitelisted NFT contract. */ function onERC721Received( address, /*operator*/ address, /*from*/ uint256, /* tokenId */ bytes calldata /*data*/ ) external view override returns (bytes4) { require( address(_wulfzContract) == msg.sender, "You can stake only Wulfz" ); return this.onERC721Received.selector; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.4.22 <0.9.0; // import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; contract Profile is ERC721Enumerable { event NameChange(uint256 indexed tokenId, string newName); event BioChange(uint256 indexed tokenId, string bio); uint256 public constant NAME_CHANGE_PRICE = 50; uint256 public constant BIO_CHANGE_PRICE = 100; mapping(uint256 => string) public bio; // Mapping from token ID to name mapping(uint256 => string) private _tokenName; // Mapping if certain name string has already been reserved mapping(string => bool) private _nameReserved; constructor(string memory _name, string memory _symbol) ERC721(_name, _symbol) {} function changeBio(uint256 _tokenId, string memory _bio) public virtual { address owner = ownerOf(_tokenId); require(msg.sender == owner, "ERC721: caller is not the owner"); bio[_tokenId] = _bio; emit BioChange(_tokenId, _bio); } function changeName(uint256 tokenId, string memory newName) public virtual { address owner = ownerOf(tokenId); require(msg.sender == owner, "ERC721: caller is not the owner"); require(validateName(newName) == true, "Not a valid new name"); require( sha256(bytes(newName)) != sha256(bytes(_tokenName[tokenId])), "New name is same as the current one" ); require(isNameReserved(newName) == false, "Name already reserved"); // If already named, dereserve old name if (bytes(_tokenName[tokenId]).length > 0) { toggleReserveName(_tokenName[tokenId], false); } toggleReserveName(newName, true); _tokenName[tokenId] = newName; emit NameChange(tokenId, newName); } /** * @dev Reserves the name if isReserve is set to true, de-reserves if set to false */ function toggleReserveName(string memory str, bool isReserve) internal { _nameReserved[toLower(str)] = isReserve; } /** * @dev Returns name of the NFT at index. */ function tokenNameByIndex(uint256 index) public view returns (string memory) { return _tokenName[index]; } /** * @dev Returns if the name has been reserved. */ function isNameReserved(string memory nameString) public view returns (bool) { return _nameReserved[toLower(nameString)]; } function validateName(string memory str) public pure returns (bool) { bytes memory b = bytes(str); if (b.length < 1) return false; if (b.length > 25) return false; // Cannot be longer than 25 characters if (b[0] == 0x20) return false; // Leading space if (b[b.length - 1] == 0x20) return false; // Trailing space bytes1 lastChar = b[0]; for (uint256 i; i < b.length; i++) { bytes1 char = b[i]; if (char == 0x20 && lastChar == 0x20) return false; // Cannot contain continous spaces if ( !(char >= 0x30 && char <= 0x39) && //9-0 !(char >= 0x41 && char <= 0x5A) && //A-Z !(char >= 0x61 && char <= 0x7A) && //a-z !(char == 0x20) //space ) return false; lastChar = char; } return true; } /** * @dev Converts the string to lowercase */ function toLower(string memory str) public pure returns (string memory) { bytes memory bStr = bytes(str); bytes memory bLower = new bytes(bStr.length); for (uint256 i = 0; i < bStr.length; i++) { // Uppercase character if ((uint8(bStr[i]) >= 65) && (uint8(bStr[i]) <= 90)) { bLower[i] = bytes1(uint8(bStr[i]) + 32); } else { bLower[i] = bStr[i]; } } return string(bLower); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.4.22 <0.9.0; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract UtilityToken is ERC20("Awoo", "AWOO"), Ownable { event AwooBurn(address indexed user, uint256 amount); event AwooRewarded(address indexed user, uint256 amount); uint256 public constant TOTAL_SUPPLY_AWOO = 200000000 * 10**2; address private _wulfzAddr; address private _stakingAddr; constructor(address wulfzAddr_, address stakingAddr_) { _wulfzAddr = wulfzAddr_; _stakingAddr = stakingAddr_; } function decimals() public pure override returns (uint8) { return 2; } function burn(address _from, uint256 _amount) external { require(msg.sender == _wulfzAddr, "Only Wulfz Contract can call"); _burn(_from, _amount); emit AwooBurn(_from, _amount); } function reward(address _to, uint256 _amount) external { require(msg.sender == _stakingAddr, "Only Staking Contract can call"); if (_amount > 0) { require( (totalSupply() + _amount) < TOTAL_SUPPLY_AWOO, "MAX LIMIT SUPPLY EXCEEDED" ); _mint(_to, _amount); emit AwooRewarded(_to, _amount); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableSet.sol) pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { return _values(set._inner); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; assembly { result := store } return result; } }
// 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 SafeMath { /** * @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 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/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 MerkleProof { /** * @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 = keccak256(abi.encodePacked(computedHash, proofElement)); } else { // Hash(current element of the proof + current computed hash) computedHash = keccak256(abi.encodePacked(proofElement, computedHash)); } } return computedHash; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { 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/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "./IERC721Enumerable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `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/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, 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/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: 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 = ERC721.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 = ERC721.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); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); 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); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits 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 IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { 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 {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @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 `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, 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 `sender` to `recipient` 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 sender, address recipient, 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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; import "./IERC20.sol"; import "./extensions/IERC20Metadata.sol"; import "../../utils/Context.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); unchecked { _approve(sender, _msgSender(), currentAllowance - amount); } return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(_msgSender(), spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `sender` to `recipient`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer( address sender, address recipient, uint256 amount ) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[sender] = senderBalance - amount; } _balances[recipient] += amount; emit Transfer(sender, recipient, amount); _afterTokenTransfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; } _totalSupply -= amount; emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens 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 amount ) 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, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been 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 _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev 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); } }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 1000 }, "evmVersion": "byzantium", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"currentTime","type":"uint256"}],"name":"AdoptionTimeChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"bio","type":"string"}],"name":"BioChange","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"currentTime","type":"uint256"}],"name":"EvolveTimeChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"newName","type":"string"}],"name":"NameChange","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"address","name":"addr","type":"address"}],"name":"PoolAddrSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"currentTime","type":"uint256"}],"name":"PreSaleTimeChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"currentTime","type":"uint256"}],"name":"PublicSaleTimeChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"currentTime","type":"uint256"}],"name":"StakingTimeChanged","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":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"address","name":"addr","type":"address"}],"name":"UtilityAddrSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"wType","type":"uint256"}],"name":"WulfzMinted","type":"event"},{"inputs":[],"name":"BIO_CHANGE_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BREED_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"EVOLVE_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINT_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NAME_CHANGE_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"}],"name":"Presale","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"PublicSale","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"_baseTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_parent","type":"uint256"}],"name":"adopt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"bio","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"canAdopt","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"string","name":"_bio","type":"string"}],"name":"changeBio","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"string","name":"newName","type":"string"}],"name":"changeName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"evolve","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":"getWulfzType","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isAdoptionStart","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isEvolveStart","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"nameString","type":"string"}],"name":"isNameReserved","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_timeStamp","type":"uint256"}],"name":"setAdoptTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_timeStamp","type":"uint256"}],"name":"setEvolveTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"setStakingPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_timeStamp","type":"uint256"}],"name":"setStakingTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_timeStamp","type":"uint256"}],"name":"setStartTimeOfPrivateSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_timeStamp","type":"uint256"}],"name":"setStartTimeOfPublicSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"setUtilitytoken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"startStaking","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startTimeOfAdopt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startTimeOfEvolve","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startTimeOfPrivateSale","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startTimeOfPublicSale","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startTimeOfStaking","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"stopStaking","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":"string","name":"str","type":"string"}],"name":"toLower","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenNameByIndex","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"totalSupplyByType","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"str","type":"string"}],"name":"validateName","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"wulfz","outputs":[{"internalType":"enum WulfzNFT.WulfzType","name":"wType","type":"uint8"},{"internalType":"bool","name":"bStaked","type":"bool"},{"internalType":"uint256","name":"lastBreedTime","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60e0604052621275006080908152600060a05262093a8060c0526200002990600e90600362000c2b565b50604080516060810182526115b3815261271060208201526064918101919091526200005a90600f90600362000c82565b50604080516060810182526000815261177060208201526115e0918101919091526200008b90601090600362000c82565b506040805160608101825260008082526020820181905291810191909152620000b990601190600362000cc6565b50604051806080016040528060448152602001620064b8604491398051620000ea91601a9160209091019062000d09565b50348015620000f857600080fd5b50604051620064fc380380620064fc8339810160408190526200011b9162000e90565b8181818181600090805190602001906200013792919062000d09565b5080516200014d90600190602084019062000d09565b50505050506200017e6200016f620001e6640100000000026401000000009004565b640100000000620001ea810204565b6361c9f1106012556361cb42906013556361d8719060145563621da850601555636296e44060165560005b6037811015620001dd57620001c860006401000000006200023c810204565b80620001d48162000f29565b915050620001a9565b50505062001101565b3390565b600d8054600160a060020a03838116600160a060020a0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b3332146200024957600080fd5b600f81600281111562000260576200026062000f47565b8154811062000273576200027362000f76565b9060005260206000200154601182600281111562000295576200029562000f47565b81548110620002a857620002a862000f76565b90600052602060002001541062000320576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f416c6c20746f6b656e7320617265206d696e746564000000000000000000000060448201526064015b60405180910390fd5b6000601182600281111562000339576200033962000f47565b815481106200034c576200034c62000f76565b9060005260206000200160008154620003659062000f29565b91829055509050601082600281111562000383576200038362000f47565b8154811062000396576200039662000f76565b906000526020600020015481620003ae919062000fa5565b9050620003c533826401000000006200043e810204565b6000818152601760205260409020805483919060ff19166001836002811115620003f357620003f362000f47565b02179055508160028111156200040d576200040d62000f47565b604051829033907f3788aa0b63cf0de40ea025fef7bb67d001c7c60cd6e3b1b2804a56e449a39b8d90600090a45050565b620004698282604051806020016040528060008152506200046d640100000000026401000000009004565b5050565b6200048283836401000000006200051c810204565b6200049a6000848484640100000000620006ab810204565b62000517576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201526000805160206200649883398151915260448201527f63656976657220696d706c656d656e7465720000000000000000000000000000606482015260840162000317565b505050565b600160a060020a0382166200058e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640162000317565b620005a2816401000000006200088b810204565b156200060b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640162000317565b6200062260008383640100000000620008a8810204565b600160a060020a03821660009081526003602052604081208054600192906200064d90849062000fa5565b90915550506000818152600260205260408082208054600160a060020a031916600160a060020a03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000620006cf600160a060020a0385166401000000006200342f6200096d82021704565b156200087f57600160a060020a03841663150b7a02620006f7640100000000620001e6810204565b8786866040518563ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040162000737949392919062000fc0565b6020604051808303816000875af192505050801562000775575060408051601f3d908101601f19168201909252620007729181019062001017565b60015b62000833573d808015620007a6576040519150601f19603f3d011682016040523d82523d6000602084013e620007ab565b606091505b5080516200082b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201526000805160206200649883398151915260448201527f63656976657220696d706c656d656e7465720000000000000000000000000000606482015260840162000317565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a020000000000000000000000000000000000000000000000000000000014905062000883565b5060015b949350505050565b600090815260026020526040902054600160a060020a0316151590565b620008c383838364010000000062000d826200051782021704565b600160a060020a038316620008ec57620008e68164010000000062000973810204565b6200091b565b81600160a060020a031683600160a060020a0316146200091b576200091b8382640100000000620009b7810204565b600160a060020a0382166200093e57620005178164010000000062000a67810204565b82600160a060020a031682600160a060020a031614620005175762000517828264010000000062000b21810204565b3b151590565b600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b60006001620009d48464010000000062001eee62000b7582021704565b620009e0919062001062565b60008381526007602052604090205490915080821462000a3457600160a060020a03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b506000918252600760209081526040808420849055600160a060020a039094168352600681528383209183525290812055565b60085460009062000a7b9060019062001062565b6000838152600960205260408120546008805493945090928490811062000aa65762000aa662000f76565b90600052602060002001549050806008838154811062000aca5762000aca62000f76565b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548062000b055762000b056200107c565b6001900381819060005260206000200160009055905550505050565b600062000b3c8364010000000062001eee62000b7582021704565b600160a060020a039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6000600160a060020a03821662000c0f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f206164647265737300000000000000000000000000000000000000000000606482015260840162000317565b50600160a060020a031660009081526003602052604090205490565b82805482825590600052602060002090810192821562000c70579160200282015b8281111562000c70578251829062ffffff1690559160200191906001019062000c4c565b5062000c7e92915062000d86565b5090565b82805482825590600052602060002090810192821562000c70579160200282015b8281111562000c70578251829061ffff1690559160200191906001019062000ca3565b82805482825590600052602060002090810192821562000c70579160200282015b8281111562000c70578251829060ff1690559160200191906001019062000ce7565b82805462000d1790620010ab565b90600052602060002090601f01602090048101928262000d3b576000855562000c70565b82601f1062000d5657805160ff191683800117855562000c70565b8280016001018555821562000c70579182015b8281111562000c7057825182559160200191906001019062000d69565b5b8082111562000c7e576000815560010162000d87565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60005b8381101562000de957818101518382015260200162000dcf565b8381111562000df9576000848401525b50505050565b600082601f83011262000e1157600080fd5b81516001604060020a038082111562000e2e5762000e2e62000d9d565b604051601f8301601f19908116603f0116810190828211818310171562000e595762000e5962000d9d565b8160405283815286602085880101111562000e7357600080fd5b62000e8684602083016020890162000dcc565b9695505050505050565b6000806040838503121562000ea457600080fd5b82516001604060020a038082111562000ebc57600080fd5b62000eca8683870162000dff565b9350602085015191508082111562000ee157600080fd5b5062000ef08582860162000dff565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600060001982141562000f405762000f4062000efa565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000821982111562000fbb5762000fbb62000efa565b500190565b6000600160a060020a038087168352808616602084015250836040830152608060608301528251806080840152620010008160a085016020870162000dcc565b601f01601f19169190910160a00195945050505050565b6000602082840312156200102a57600080fd5b81517fffffffff00000000000000000000000000000000000000000000000000000000811681146200105b57600080fd5b9392505050565b60008282101562001077576200107762000efa565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b600281046001821680620010c057607f821691505b60208210811415620010fb577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b61538780620011116000396000f3fe60806040526004361061039e576000357c01000000000000000000000000000000000000000000000000000000009004806365e64903116101ee578063a4b4a5341161011f578063c87b56dd116100bd578063e985e9c51161008c578063e985e9c514610a0d578063f119f56714610a56578063f2fde38b14610a76578063f376018f14610a9657600080fd5b8063c87b56dd14610972578063ce933ce114610992578063cfc86f7b146109a8578063db912aa4146109bd57600080fd5b8063bd625d09116100f9578063bd625d0914610909578063bf424e7e14610920578063c002d23d14610936578063c39cbef11461095257600080fd5b8063a4b4a534146108b2578063b88d4fde146108c9578063bb31dea2146108e957600080fd5b8063762b1c921161018c5780639416b423116101665780639416b4231461083d57806395d89b411461085d5780639ffdb65a14610872578063a22cb4651461089257600080fd5b8063762b1c92146107df5780638588b2c5146107ff5780638da5cb5b1461081f57600080fd5b806370a08231116101c857806370a082311461077f578063715018a61461079f57806374151be0146107b4578063756059bd146107c957600080fd5b806365e649031461072957806366c0f38f146107495780636d5224181461075f57600080fd5b806323b872dd116102d35780634019a3b81161027157806354b6f1611161024057806354b6f161146106b457806355f804b3146106c95780635a5eff31146106e95780636352211e1461070957600080fd5b80634019a3b81461063457806342842e0e146106545780634d426528146106745780634f6ccce71461069457600080fd5b80633479d5c9116102ad5780633479d5c9146105bf57806336033deb146105df578063386172f3146105ff5780633ccfd60b1461061f57600080fd5b806323b872dd1461055f5780632f745c591461057f5780633028f63a1461059f57600080fd5b80630f51e77411610340578063169926631161031a578063169926631461050157806318160ddd146105145780631c760bdb146105295780631e0cc9a81461054957600080fd5b80630f51e774146104ae57806312616a7b146104c157806315b56d10146104e157600080fd5b8063095ea7b31161037c578063095ea7b3146104325780630a456fed146104545780630b29043a146104785780630d1599471461048e57600080fd5b806301ffc9a7146103a357806306fdde03146103d8578063081812fc146103fa575b600080fd5b3480156103af57600080fd5b506103c36103be366004614a24565b610ab6565b60405190151581526020015b60405180910390f35b3480156103e457600080fd5b506103ed610b0f565b6040516103cf9190614a99565b34801561040657600080fd5b5061041a610415366004614aac565b610ba1565b604051600160a060020a0390911681526020016103cf565b34801561043e57600080fd5b5061045261044d366004614ae1565b610c4f565b005b34801561046057600080fd5b5061046a60135481565b6040519081526020016103cf565b34801561048457600080fd5b5061046a60165481565b34801561049a57600080fd5b5061046a6104a9366004614aac565b610d87565b6104526104bc366004614b0b565b610da8565b3480156104cd57600080fd5b506104526104dc366004614aac565b61109d565b3480156104ed57600080fd5b506103c36104fc366004614c44565b611129565b61045261050f366004614aac565b61115c565b34801561052057600080fd5b5060085461046a565b34801561053557600080fd5b50610452610544366004614aac565b6113a0565b34801561055557600080fd5b5061046a60125481565b34801561056b57600080fd5b5061045261057a366004614c79565b6114ed565b34801561058b57600080fd5b5061046a61059a366004614ae1565b611577565b3480156105ab57600080fd5b506104526105ba366004614cb5565b611622565b3480156105cb57600080fd5b506103c36105da366004614aac565b6116cf565b3480156105eb57600080fd5b506103ed6105fa366004614aac565b6117df565b34801561060b57600080fd5b5061045261061a366004614aac565b611879565b34801561062b57600080fd5b506104526118fe565b34801561064057600080fd5b5061045261064f366004614aac565b6119c8565b34801561066057600080fd5b5061045261066f366004614c79565b611a4d565b34801561068057600080fd5b5061045261068f366004614cd0565b611a68565b3480156106a057600080fd5b5061046a6106af366004614aac565b611bf0565b3480156106c057600080fd5b5061046a603281565b3480156106d557600080fd5b506104526106e4366004614d17565b611c97565b3480156106f557600080fd5b5061046a610704366004614aac565b611cee565b34801561071557600080fd5b5061041a610724366004614aac565b611d11565b34801561073557600080fd5b50610452610744366004614cb5565b611d9f565b34801561075557600080fd5b5061046a60145481565b34801561076b57600080fd5b506103ed61077a366004614aac565b611e4c565b34801561078b57600080fd5b5061046a61079a366004614cb5565b611eee565b3480156107ab57600080fd5b50610452611f8b565b3480156107c057600080fd5b5061046a606481565b3480156107d557600080fd5b5061046a6105dc81565b3480156107eb57600080fd5b506104526107fa366004614aac565b611fe2565b34801561080b57600080fd5b5061045261081a366004614aac565b612210565b34801561082b57600080fd5b50600d54600160a060020a031661041a565b34801561084957600080fd5b506103ed610858366004614c44565b612582565b34801561086957600080fd5b506103ed612752565b34801561087e57600080fd5b506103c361088d366004614c44565b612761565b34801561089e57600080fd5b506104526108ad366004614d77565b612b9f565b3480156108be57600080fd5b5060155442116103c3565b3480156108d557600080fd5b506104526108e4366004614db3565b612baa565b3480156108f557600080fd5b50610452610904366004614aac565b612c35565b34801561091557600080fd5b5060165442116103c3565b34801561092c57600080fd5b5061046a61025881565b34801561094257600080fd5b5061046a67011c37937e08000081565b34801561095e57600080fd5b5061045261096d366004614cd0565b612cba565b34801561097e57600080fd5b506103ed61098d366004614aac565b612ecf565b34801561099e57600080fd5b5061046a60155481565b3480156109b457600080fd5b506103ed612fbb565b3480156109c957600080fd5b506109fe6109d8366004614aac565b6017602052600090815260409020805460019091015460ff808316926101009004169083565b6040516103cf93929190614e5e565b348015610a1957600080fd5b506103c3610a28366004614ead565b600160a060020a03918216600090815260056020908152604080832093909416825291909152205460ff1690565b348015610a6257600080fd5b50610452610a71366004614aac565b612fc8565b348015610a8257600080fd5b50610452610a91366004614cb5565b6132d7565b348015610aa257600080fd5b50610452610ab1366004614aac565b6133aa565b60007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1982167f780e9d63000000000000000000000000000000000000000000000000000000001480610b095750610b0982613435565b92915050565b606060008054610b1e90614ee0565b80601f0160208091040260200160405190810160405280929190818152602001828054610b4a90614ee0565b8015610b975780601f10610b6c57610100808354040283529160200191610b97565b820191906000526020600020905b815481529060010190602001808311610b7a57829003601f168201915b5050505050905090565b600081815260026020526040812054600160a060020a0316610c335760405160e560020a62461bcd02815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084015b60405180910390fd5b50600090815260046020526040902054600160a060020a031690565b6000610c5a82611d11565b905080600160a060020a031683600160a060020a03161415610ce75760405160e560020a62461bcd02815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610c2a565b33600160a060020a0382161480610d035750610d038133610a28565b610d785760405160e560020a62461bcd02815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610c2a565b610d82838361350f565b505050565b60118181548110610d9757600080fd5b600091825260209091200154905081565b67011c37937e080000341015610e035760405160e560020a62461bcd02815260206004820152601b60248201527f4d696e74696e67205072696365206973206e6f7420656e6f75676800000000006044820152606401610c2a565b6012544211610e575760405160e560020a62461bcd02815260206004820152601f60248201527f507269766174652053616c65206973206e6f74207374617274656420796574006044820152606401610c2a565b601254610e679062015180614f63565b4210610eb85760405160e560020a62461bcd02815260206004820152601d60248201527f507269766174652053616c6520697320616c726561647920656e6465640000006044820152606401610c2a565b3360009081526018602052604090205460ff1615610f675760405160e560020a62461bcd02815260206004820152605a60248201527f596f7527766520616c7265616479206d696e74656420746f6b656e2e2049662060448201527f796f752077616e74206d6f72652c20796f752077696c6c2062652061626c652060648201527f746f206d696e7420647572696e67205075626c69632053616c65000000000000608482015260a401610c2a565b6040516c01000000000000000000000000330260208201527f12b1013fe853dea282b3440a70e5d739b7ef75e135122659fe5408bde23a4cc190600090603401604051602081830303815290604052805190602001209050610fff84848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525086925085915061358a9050565b6110745760405160e560020a62461bcd02815260206004820152603560248201527f536f7272792c20796f75277265206e6f742077686974656c69737465642e205060448201527f6c6561736520747279205075626c69632053616c6500000000000000000000006064820152608401610c2a565b336000908152601860205260408120805460ff19166001179055611097906135a0565b50505050565b600d54600160a060020a031633146110e85760405160e560020a62461bcd02815260206004820181905260248201526000805160206153328339815191526044820152606401610c2a565b6015819055604080518281524260208201527f9ebd770b6933866942a2245db0e13be99b87ec65878b4c32ac3183fcb9df58a391015b60405180910390a150565b6000600c61113683612582565b6040516111439190614f7b565b9081526040519081900360200190205460ff1692915050565b61116e8167011c37937e080000614f97565b3410156111c05760405160e560020a62461bcd02815260206004820152601b60248201527f4d696e74696e67205072696365206973206e6f7420656e6f75676800000000006044820152606401610c2a565b60135442116112145760405160e560020a62461bcd02815260206004820152601e60248201527f5075626c69632053616c65206973206e6f7420737461727465642079657400006044820152606401610c2a565b6013546112249062015180614f63565b42106112755760405160e560020a62461bcd02815260206004820152601c60248201527f5075626c69632053616c6520697320616c726561647920656e646564000000006044820152606401610c2a565b600381106112c85760405160e560020a62461bcd02815260206004820152601e60248201527f596f752063616e206f6e6c792072657175697265206174206d6f7374203200006044820152606401610c2a565b336000908152601960205260409020546003116113505760405160e560020a62461bcd02815260206004820152602e60248201527f596f752063616e206f6e6c79206d696e74206174206d6f73742032206475726960448201527f6e67205075626c69632053616c650000000000000000000000000000000000006064820152608401610c2a565b336000908152601960205260408120805483929061136f908490614f63565b90915550600090505b8181101561139c5761138a60006135a0565b8061139481614fb6565b915050611378565b5050565b600081815260176020526040902054610100900460ff1661142c5760405160e560020a62461bcd02815260206004820152602760248201527f5468697320746f6b656e206861736e27742065766572206265656e207374616b60448201527f6564207965742e000000000000000000000000000000000000000000000000006064820152608401610c2a565b601c546040517f183b8bac00000000000000000000000000000000000000000000000000000000815233600482015260248101839052600160a060020a039091169063183b8bac90604401600060405180830381600087803b15801561149157600080fd5b505af11580156114a5573d6000803e3d6000fd5b5050601c546040805160208101909152600081526114d49350600160a060020a03909116915033908490613757565b6000908152601760205260409020805461ff0019169055565b6114f733826137e3565b61156c5760405160e560020a62461bcd02815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610c2a565b610d828383836138ee565b600061158283611eee565b82106115f95760405160e560020a62461bcd02815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e64730000000000000000000000000000000000000000006064820152608401610c2a565b50600160a060020a03919091166000908152600660209081526040808320938352929052205490565b600d54600160a060020a0316331461166d5760405160e560020a62461bcd02815260206004820181905260248201526000805160206153328339815191526044820152606401610c2a565b601c805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383169081179091556040805130815260208101929092527f760ce5dc79857db1adeef862ffd74cad38dd68efdfd73100f66a342b43818cbc910161111e565b600081815260176020526040812054819060ff1660028111156116f4576116f4614e2f565b9050600160008481526017602052604090205460ff16600281111561171b5761171b614e2f565b14156117925760405160e560020a62461bcd02815260206004820152602860248201527f5472792061646f7074696e6720776974682047656e65736973206f7220416c7060448201527f68612057756c667a0000000000000000000000000000000000000000000000006064820152608401610c2a565b600083815260176020526040812060010154600e8054919291849081106117bb576117bb614fd1565b906000526020600020015490508082426117d59190615000565b1195945050505050565b600a60205260009081526040902080546117f890614ee0565b80601f016020809104026020016040519081016040528092919081815260200182805461182490614ee0565b80156118715780601f1061184657610100808354040283529160200191611871565b820191906000526020600020905b81548152906001019060200180831161185457829003601f168201915b505050505081565b600d54600160a060020a031633146118c45760405160e560020a62461bcd02815260206004820181905260248201526000805160206153328339815191526044820152606401610c2a565b6014819055604080518281524260208201527f46fc69507a8168e1f58a1539aa368a4c0187cdad07df168d054f733afc055ec0910161111e565b600d54600160a060020a031633146119495760405160e560020a62461bcd02815260206004820181905260248201526000805160206153328339815191526044820152606401610c2a565b30318061199b5760405160e560020a62461bcd02815260206004820152600f60248201527f42616c616e6365206973207a65726f00000000000000000000000000000000006044820152606401610c2a565b604051339082156108fc029083906000818181858888f1935050505015801561139c573d6000803e3d6000fd5b600d54600160a060020a03163314611a135760405160e560020a62461bcd02815260206004820181905260248201526000805160206153328339815191526044820152606401610c2a565b6012819055604080518281524260208201527fc0dc7f303e850ad753f8cd31dd289f4487d62cb53a165cf760b65694e1b3f270910161111e565b610d8283838360405180602001604052806000815250612baa565b33611a7283611d11565b600160a060020a031614611acb5760405160e560020a62461bcd02815260206004820152601f60248201527f4368616e676542696f3a20796f75277265206e6f7420746865206f776e6572006044820152606401610c2a565b601b54604080517f313ce5670000000000000000000000000000000000000000000000000000000081529051600160a060020a0390921691639dc29fac913391849163313ce5679160048083019260209291908290030181865afa158015611b37573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b5b9190615017565b611b6690600a615121565b611b71906064614f97565b6040517c010000000000000000000000000000000000000000000000000000000063ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b158015611bce57600080fd5b505af1158015611be2573d6000803e3d6000fd5b5050505061139c8282613ad9565b6000611bfb60085490565b8210611c725760405160e560020a62461bcd02815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e647300000000000000000000000000000000000000006064820152608401610c2a565b60088281548110611c8557611c85614fd1565b90600052602060002001549050919050565b600d54600160a060020a03163314611ce25760405160e560020a62461bcd02815260206004820181905260248201526000805160206153328339815191526044820152606401610c2a565b610d82601a83836148ec565b60008181526017602052604081205460ff166002811115610b0957610b09614e2f565b600081815260026020526040812054600160a060020a031680610b095760405160e560020a62461bcd02815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610c2a565b600d54600160a060020a03163314611dea5760405160e560020a62461bcd02815260206004820181905260248201526000805160206153328339815191526044820152606401610c2a565b601b805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383169081179091556040805130815260208101929092527fd2b7029d21747e3ef6781f470dcc87559562c992a58fccb970bc972e00d6f707910161111e565b6000818152600b60205260409020805460609190611e6990614ee0565b80601f0160208091040260200160405190810160405280929190818152602001828054611e9590614ee0565b8015611ee25780601f10611eb757610100808354040283529160200191611ee2565b820191906000526020600020905b815481529060010190602001808311611ec557829003601f168201915b50505050509050919050565b6000600160a060020a038216611f6f5760405160e560020a62461bcd02815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610c2a565b50600160a060020a031660009081526003602052604090205490565b600d54600160a060020a03163314611fd65760405160e560020a62461bcd02815260206004820181905260248201526000805160206153328339815191526044820152606401610c2a565b611fe06000613b9e565b565b601454421161205b5760405160e560020a62461bcd028152602060048201526024808201527f5374616b696e67204d656368616e69736d206973206e6f74207374617274656460448201527f20796574000000000000000000000000000000000000000000000000000000006064820152608401610c2a565b3361206582611d11565b600160a060020a0316146120be5760405160e560020a62461bcd02815260206004820152601a60248201527f5374616b696e673a206f776e6572206e6f74206d6174636865640000000000006044820152606401610c2a565b600081815260176020526040902054610100900460ff161561214b5760405160e560020a62461bcd02815260206004820152603760248201527f5468697320546f6b656e20697320616c7265616479207374616b65642e20506c60448201527f656173652074727920616e6f7468657220746f6b656e2e0000000000000000006064820152608401610c2a565b601c546040517fcf8317fa00000000000000000000000000000000000000000000000000000000815233600482015260248101839052600160a060020a039091169063cf8317fa90604401600060405180830381600087803b1580156121b057600080fd5b505af11580156121c4573d6000803e3d6000fd5b5050601c546040805160208101909152600081526121f39350339250600160a060020a03909116908490613757565b6000908152601760205260409020805461ff001916610100179055565b612219816116cf565b6122db5760405160e560020a62461bcd028152602060048201526064602482018190527f416c72656164792061646f707420696e20746865207061737420646179732e2060448301527f47656e657369732057756c667a2063616e2061646f7074206576657279203134908201527f206461797320616e6420416c7068612063616e20646f2065766572792037206460848201527f6179732e0000000000000000000000000000000000000000000000000000000060a482015260c401610c2a565b601554421161232f5760405160e560020a62461bcd02815260206004820152601e60248201527f41646f7074696e67205075707a206973206e6f742072656164792079657400006044820152606401610c2a565b3361233982611d11565b600160a060020a0316146123b85760405160e560020a62461bcd02815260206004820152602860248201527f41646f7074696e673a20596f75277265206e6f74206f776e6572206f6620746860448201527f697320746f6b656e0000000000000000000000000000000000000000000000006064820152608401610c2a565b600081815260176020526040902054610100900460ff16156124455760405160e560020a62461bcd02815260206004820152603760248201527f5468697320546f6b656e20697320616c7265616479207374616b65642e20506c60448201527f656173652074727920616e6f7468657220746f6b656e2e0000000000000000006064820152608401610c2a565b601b54604080517f313ce5670000000000000000000000000000000000000000000000000000000081529051600160a060020a0390921691639dc29fac913391849163313ce5679160048083019260209291908290030181865afa1580156124b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124d59190615017565b6124e090600a615121565b6124ec90610258614f97565b6040517c010000000000000000000000000000000000000000000000000000000063ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b15801561254957600080fd5b505af115801561255d573d6000803e3d6000fd5b5050505061256b60016135a0565b600090815260176020526040902042600190910155565b606060008290506000815167ffffffffffffffff8111156125a5576125a5614b7f565b6040519080825280601f01601f1916602001820160405280156125cf576020820181803683370190505b50905060005b825181101561274a5760418382815181106125f2576125f2614fd1565b602001015160f860020a900460f860020a0260f860020a900460ff161015801561264a5750605a83828151811061262b5761262b614fd1565b602001015160f860020a900460f860020a0260f860020a900460ff1611155b156126d25782818151811061266157612661614fd1565b602001015160f860020a900460f860020a0260f860020a900460206126869190615130565b60f860020a0282828151811061269e5761269e614fd1565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350612738565b8281815181106126e4576126e4614fd1565b602001015160f860020a900460f860020a0282828151811061270857612708614fd1565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b8061274281614fb6565b9150506125d5565b509392505050565b606060018054610b1e90614ee0565b60008082905060018151101561277a5750600092915050565b60198151111561278d5750600092915050565b806000815181106127a0576127a0614fd1565b602001015160f860020a900460f860020a027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916602060f860020a0214156127eb5750600092915050565b80600182516127fa9190615000565b8151811061280a5761280a614fd1565b602001015160f860020a900460f860020a027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916602060f860020a0214156128555750600092915050565b60008160008151811061286a5761286a614fd1565b602001015160f860020a900460f860020a02905060005b8251811015612b9457600083828151811061289e5761289e614fd1565b016020015160f860020a908190040290507f20000000000000000000000000000000000000000000000000000000000000007fff00000000000000000000000000000000000000000000000000000000000000821614801561294157507f20000000000000000000000000000000000000000000000000000000000000007fff000000000000000000000000000000000000000000000000000000000000008416145b156129525750600095945050505050565b7f30000000000000000000000000000000000000000000000000000000000000007fff000000000000000000000000000000000000000000000000000000000000008216108015906129e657507f39000000000000000000000000000000000000000000000000000000000000007fff00000000000000000000000000000000000000000000000000000000000000821611155b158015612a8457507f41000000000000000000000000000000000000000000000000000000000000007fff00000000000000000000000000000000000000000000000000000000000000821610801590612a8257507f5a000000000000000000000000000000000000000000000000000000000000007fff00000000000000000000000000000000000000000000000000000000000000821611155b155b8015612b2157507f61000000000000000000000000000000000000000000000000000000000000007fff00000000000000000000000000000000000000000000000000000000000000821610801590612b1f57507f7a000000000000000000000000000000000000000000000000000000000000007fff00000000000000000000000000000000000000000000000000000000000000821611155b155b8015612b6f57507f20000000000000000000000000000000000000000000000000000000000000007fff00000000000000000000000000000000000000000000000000000000000000821614155b15612b805750600095945050505050565b915080612b8c81614fb6565b915050612881565b506001949350505050565b61139c338383613bfd565b612bb433836137e3565b612c295760405160e560020a62461bcd02815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610c2a565b61109784848484613757565b600d54600160a060020a03163314612c805760405160e560020a62461bcd02815260206004820181905260248201526000805160206153328339815191526044820152606401610c2a565b6013819055604080518281524260208201527f53bb3f0edf5961602b6c985f8d776a7241ad4458cb383fe8233e64154647d08d910161111e565b33612cc483611d11565b600160a060020a031614612d1d5760405160e560020a62461bcd02815260206004820181905260248201527f4368616e67654e616d653a20796f75277265206e6f7420746865206f776e65726044820152606401610c2a565b600082815260176020526040902054610100900460ff1615612daa5760405160e560020a62461bcd02815260206004820152603760248201527f5468697320546f6b656e20697320616c7265616479207374616b65642e20506c60448201527f656173652074727920616e6f7468657220746f6b656e2e0000000000000000006064820152608401610c2a565b601b54604080517f313ce5670000000000000000000000000000000000000000000000000000000081529051600160a060020a0390921691639dc29fac913391849163313ce5679160048083019260209291908290030181865afa158015612e16573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e3a9190615017565b612e4590600a615121565b612e50906032614f97565b6040517c010000000000000000000000000000000000000000000000000000000063ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b158015612ead57600080fd5b505af1158015612ec1573d6000803e3d6000fd5b5050505061139c8282613ccf565b600081815260026020526040902054606090600160a060020a0316612f5f5760405160e560020a62461bcd02815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610c2a565b6000612f69614031565b90506000815111612f895760405180602001604052806000815250612fb4565b80612f9384614040565b604051602001612fa4929190615155565b6040516020818303038152906040525b9392505050565b601a80546117f890614ee0565b601654421161301c5760405160e560020a62461bcd02815260206004820152601f60248201527f45766f6c76696e672057756c667a206973206e6f7420726561647920796574006044820152606401610c2a565b3361302682611d11565b600160a060020a0316146130a55760405160e560020a62461bcd02815260206004820152602660248201527f45766f6c76653a20596f75277265206e6f74206f776e6572206f66207468697360448201527f20746f6b656e00000000000000000000000000000000000000000000000000006064820152608401610c2a565b60008181526017602052604081205460ff1660028111156130c8576130c8614e2f565b146131185760405160e560020a62461bcd02815260206004820152601d60248201527f47656e657369732063616e206f6e6c792065766f6c766520416c7068610000006044820152606401610c2a565b600081815260176020526040902054610100900460ff16156131a55760405160e560020a62461bcd02815260206004820152603760248201527f5468697320546f6b656e20697320616c7265616479207374616b65642e20506c60448201527f656173652074727920616e6f7468657220746f6b656e2e0000000000000000006064820152608401610c2a565b601b54604080517f313ce5670000000000000000000000000000000000000000000000000000000081529051600160a060020a0390921691639dc29fac913391849163313ce5679160048083019260209291908290030181865afa158015613211573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132359190615017565b61324090600a615121565b61324c906105dc614f97565b6040517c010000000000000000000000000000000000000000000000000000000063ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b1580156132a957600080fd5b505af11580156132bd573d6000803e3d6000fd5b505050506132ca81614175565b6132d460026135a0565b50565b600d54600160a060020a031633146133225760405160e560020a62461bcd02815260206004820181905260248201526000805160206153328339815191526044820152606401610c2a565b600160a060020a0381166133a15760405160e560020a62461bcd02815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610c2a565b6132d481613b9e565b600d54600160a060020a031633146133f55760405160e560020a62461bcd02815260206004820181905260248201526000805160206153328339815191526044820152606401610c2a565b6016819055604080518281524260208201527f20fd2b88254004c55cd45d3a7ff944318d39a1033f5075060d0b2f3fa5bda652910161111e565b3b151590565b60007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1982167f80ac58cd0000000000000000000000000000000000000000000000000000000014806134c257507bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610b0957507f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19831614610b09565b6000818152600460205260409020805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038416908117909155819061355182611d11565b600160a060020a03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000826135978584614229565b14949350505050565b3332146135ac57600080fd5b600f8160028111156135c0576135c0614e2f565b815481106135d0576135d0614fd1565b906000526020600020015460118260028111156135ef576135ef614e2f565b815481106135ff576135ff614fd1565b90600052602060002001541061365a5760405160e560020a62461bcd02815260206004820152601560248201527f416c6c20746f6b656e7320617265206d696e74656400000000000000000000006044820152606401610c2a565b6000601182600281111561367057613670614e2f565b8154811061368057613680614fd1565b906000526020600020016000815461369790614fb6565b9182905550905060108260028111156136b2576136b2614e2f565b815481106136c2576136c2614fd1565b9060005260206000200154816136d89190614f63565b90506136e433826142cd565b6000818152601760205260409020805483919060ff1916600183600281111561370f5761370f614e2f565b021790555081600281111561372657613726614e2f565b604051829033907f3788aa0b63cf0de40ea025fef7bb67d001c7c60cd6e3b1b2804a56e449a39b8d90600090a45050565b6137628484846138ee565b61376e848484846142e7565b6110975760405160e560020a62461bcd02815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610c2a565b600081815260026020526040812054600160a060020a03166138705760405160e560020a62461bcd02815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610c2a565b600061387b83611d11565b905080600160a060020a031684600160a060020a031614806138b6575083600160a060020a03166138ab84610ba1565b600160a060020a0316145b806138e65750600160a060020a0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b82600160a060020a031661390182611d11565b600160a060020a0316146139805760405160e560020a62461bcd02815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e00000000000000000000000000000000000000000000006064820152608401610c2a565b600160a060020a0382166139fe5760405160e560020a62461bcd028152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610c2a565b613a0983838361447a565b613a1460008261350f565b600160a060020a0383166000908152600360205260408120805460019290613a3d908490615000565b9091555050600160a060020a0382166000908152600360205260408120805460019290613a6b908490614f63565b9091555050600081815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6000613ae483611d11565b905033600160a060020a03821614613b415760405160e560020a62461bcd02815260206004820152601f60248201527f4552433732313a2063616c6c6572206973206e6f7420746865206f776e6572006044820152606401610c2a565b6000838152600a602090815260409091208351613b6092850190614970565b50827fbe3e2fc72ea4bd0d860e908b1ee27aa9856809e62a75bfc0cb7f04b5d791873d83604051613b919190614a99565b60405180910390a2505050565b600d8054600160a060020a0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b81600160a060020a031683600160a060020a03161415613c625760405160e560020a62461bcd02815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610c2a565b600160a060020a03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6000613cda83611d11565b905033600160a060020a03821614613d375760405160e560020a62461bcd02815260206004820152601f60248201527f4552433732313a2063616c6c6572206973206e6f7420746865206f776e6572006044820152606401610c2a565b613d4082612761565b1515600114613d945760405160e560020a62461bcd02815260206004820152601460248201527f4e6f7420612076616c6964206e6577206e616d650000000000000000000000006044820152606401610c2a565b6000838152600b6020526040908190209051600291613db291615184565b602060405180830381855afa158015613dcf573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190613df29190615239565b600283604051613e029190614f7b565b602060405180830381855afa158015613e1f573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190613e429190615239565b1415613eb95760405160e560020a62461bcd02815260206004820152602360248201527f4e6577206e616d652069732073616d65206173207468652063757272656e742060448201527f6f6e6500000000000000000000000000000000000000000000000000000000006064820152608401610c2a565b613ec282611129565b15613f125760405160e560020a62461bcd02815260206004820152601560248201527f4e616d6520616c726561647920726573657276656400000000000000000000006044820152606401610c2a565b6000838152600b602052604081208054613f2b90614ee0565b90501115613fd6576000838152600b602052604090208054613fd69190613f5190614ee0565b80601f0160208091040260200160405190810160405280929190818152602001828054613f7d90614ee0565b8015613fca5780601f10613f9f57610100808354040283529160200191613fca565b820191906000526020600020905b815481529060010190602001808311613fad57829003601f168201915b50505050506000614532565b613fe1826001614532565b6000838152600b60209081526040909120835161400092850190614970565b50827f7e632a301794d8d4a81ea7e20f37d1947158d36e66403af04ba85dd194b66f1b83604051613b919190614a99565b6060601a8054610b1e90614ee0565b60608161408057505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156140aa578061409481614fb6565b91506140a39050600a83615281565b9150614084565b60008167ffffffffffffffff8111156140c5576140c5614b7f565b6040519080825280601f01601f1916602001820160405280156140ef576020820181803683370190505b5090505b84156138e657614104600183615000565b9150614111600a86615295565b61411c906030614f63565b60f860020a0281838151811061413457614134614fd1565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061416e600a86615281565b94506140f3565b600061418082611d11565b905061418e8160008461447a565b61419960008361350f565b600160a060020a03811660009081526003602052604081208054600192906141c2908490615000565b9091555050600082815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff1916905551839190600160a060020a038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b600081815b845181101561274a57600085828151811061424b5761424b614fd1565b6020026020010151905080831161428d5760408051602081018590529081018290526060016040516020818303038152906040528051906020012092506142ba565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b50806142c581614fb6565b91505061422e565b61139c82826040518060200160405280600081525061456f565b6000600160a060020a0384163b15612b94576040517f150b7a02000000000000000000000000000000000000000000000000000000008152600160a060020a0385169063150b7a02906143449033908990889088906004016152a9565b6020604051808303816000875af192505050801561437f575060408051601f3d908101601f1916820190925261437c918101906152e5565b60015b614432573d8080156143ad576040519150601f19603f3d011682016040523d82523d6000602084013e6143b2565b606091505b50805161442a5760405160e560020a62461bcd02815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610c2a565b805181602001fd5b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167f150b7a02000000000000000000000000000000000000000000000000000000001490506138e6565b600160a060020a0383166144d5576144d081600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6144f8565b81600160a060020a031683600160a060020a0316146144f8576144f883826145fb565b600160a060020a03821661450f57610d8281614698565b82600160a060020a031682600160a060020a031614610d8257610d828282614747565b80600c61453e84612582565b60405161454b9190614f7b565b908152604051908190036020019020805491151560ff199092169190911790555050565b614579838361478b565b61458660008484846142e7565b610d825760405160e560020a62461bcd02815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610c2a565b6000600161460884611eee565b6146129190615000565b60008381526007602052604090205490915080821461466557600160a060020a03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b506000918252600760209081526040808420849055600160a060020a039094168352600681528383209183525290812055565b6008546000906146aa90600190615000565b600083815260096020526040812054600880549394509092849081106146d2576146d2614fd1565b9060005260206000200154905080600883815481106146f3576146f3614fd1565b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061472b5761472b615302565b6001900381819060005260206000200160009055905550505050565b600061475283611eee565b600160a060020a039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b600160a060020a0382166147e45760405160e560020a62461bcd02815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610c2a565b600081815260026020526040902054600160a060020a03161561484c5760405160e560020a62461bcd02815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610c2a565b6148586000838361447a565b600160a060020a0382166000908152600360205260408120805460019290614881908490614f63565b9091555050600081815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b8280546148f890614ee0565b90600052602060002090601f01602090048101928261491a5760008555614960565b82601f106149335782800160ff19823516178555614960565b82800160010185558215614960579182015b82811115614960578235825591602001919060010190614945565b5061496c9291506149e4565b5090565b82805461497c90614ee0565b90600052602060002090601f01602090048101928261499e5760008555614960565b82601f106149b757805160ff1916838001178555614960565b82800160010185558215614960579182015b828111156149605782518255916020019190600101906149c9565b5b8082111561496c57600081556001016149e5565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19811681146132d457600080fd5b600060208284031215614a3657600080fd5b8135612fb4816149f9565b60005b83811015614a5c578181015183820152602001614a44565b838111156110975750506000910152565b60008151808452614a85816020860160208601614a41565b601f01601f19169290920160200192915050565b602081526000612fb46020830184614a6d565b600060208284031215614abe57600080fd5b5035919050565b8035600160a060020a0381168114614adc57600080fd5b919050565b60008060408385031215614af457600080fd5b614afd83614ac5565b946020939093013593505050565b60008060208385031215614b1e57600080fd5b823567ffffffffffffffff80821115614b3657600080fd5b818501915085601f830112614b4a57600080fd5b813581811115614b5957600080fd5b8660208083028501011115614b6d57600080fd5b60209290920196919550909350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600067ffffffffffffffff80841115614bc957614bc9614b7f565b604051601f8501601f19908116603f01168101908282118183101715614bf157614bf1614b7f565b81604052809350858152868686011115614c0a57600080fd5b858560208301376000602087830101525050509392505050565b600082601f830112614c3557600080fd5b612fb483833560208501614bae565b600060208284031215614c5657600080fd5b813567ffffffffffffffff811115614c6d57600080fd5b6138e684828501614c24565b600080600060608486031215614c8e57600080fd5b614c9784614ac5565b9250614ca560208501614ac5565b9150604084013590509250925092565b600060208284031215614cc757600080fd5b612fb482614ac5565b60008060408385031215614ce357600080fd5b82359150602083013567ffffffffffffffff811115614d0157600080fd5b614d0d85828601614c24565b9150509250929050565b60008060208385031215614d2a57600080fd5b823567ffffffffffffffff80821115614d4257600080fd5b818501915085601f830112614d5657600080fd5b813581811115614d6557600080fd5b866020828501011115614b6d57600080fd5b60008060408385031215614d8a57600080fd5b614d9383614ac5565b915060208301358015158114614da857600080fd5b809150509250929050565b60008060008060808587031215614dc957600080fd5b614dd285614ac5565b9350614de060208601614ac5565b925060408501359150606085013567ffffffffffffffff811115614e0357600080fd5b8501601f81018713614e1457600080fd5b614e2387823560208401614bae565b91505092959194509250565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6060810160038510614e99577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b938152911515602083015260409091015290565b60008060408385031215614ec057600080fd5b614ec983614ac5565b9150614ed760208401614ac5565b90509250929050565b600281046001821680614ef457607f821691505b60208210811415614f2e577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008219821115614f7657614f76614f34565b500190565b60008251614f8d818460208701614a41565b9190910192915050565b6000816000190483118215151615614fb157614fb1614f34565b500290565b6000600019821415614fca57614fca614f34565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008282101561501257615012614f34565b500390565b60006020828403121561502957600080fd5b815160ff81168114612fb457600080fd5b600181815b8085111561507757816000190482111561505b5761505b614f34565b8085161561506857918102915b6002909404939080029061503f565b509250929050565b60008261508e57506001610b09565b8161509b57506000610b09565b81600181146150b157600281146150bb576150d8565b6001915050610b09565b60ff8411156150cc576150cc614f34565b8360020a915050610b09565b5060208310610133831016604e8410600b84101617156150fb575081810a610b09565b615105838361503a565b806000190482111561511957615119614f34565b029392505050565b6000612fb460ff84168361507f565b600060ff821660ff84168060ff0382111561514d5761514d614f34565b019392505050565b60008351615167818460208801614a41565b83519083019061517b818360208801614a41565b01949350505050565b81546000908190600281046001808316806151a057607f831692505b60208084108214156151d9577f4e487b710000000000000000000000000000000000000000000000000000000086526022600452602486fd5b8180156151ed57600181146151fe5761522b565b60ff1986168952848901965061522b565b60008a81526020902060005b868110156152235781548b82015290850190830161520a565b505084890196505b509498975050505050505050565b60006020828403121561524b57600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261529057615290615252565b500490565b6000826152a4576152a4615252565b500690565b6000600160a060020a038087168352808616602084015250836040830152608060608301526152db6080830184614a6d565b9695505050505050565b6000602082840312156152f757600080fd5b8151612fb4816149f9565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220155d91541190757a4f99d98c03f6b00917af803e6243d574e4a06396caa5334664736f6c634300080a00334552433732313a207472616e7366657220746f206e6f6e20455243373231526568747470733a2f2f697066732e696f2f697066732f516d51744e38316939654e724433777863723637736344704c765a44445878626d41764e584d615a6833443674422f00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000557756c667a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000557554c465a000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x60806040526004361061039e576000357c01000000000000000000000000000000000000000000000000000000009004806365e64903116101ee578063a4b4a5341161011f578063c87b56dd116100bd578063e985e9c51161008c578063e985e9c514610a0d578063f119f56714610a56578063f2fde38b14610a76578063f376018f14610a9657600080fd5b8063c87b56dd14610972578063ce933ce114610992578063cfc86f7b146109a8578063db912aa4146109bd57600080fd5b8063bd625d09116100f9578063bd625d0914610909578063bf424e7e14610920578063c002d23d14610936578063c39cbef11461095257600080fd5b8063a4b4a534146108b2578063b88d4fde146108c9578063bb31dea2146108e957600080fd5b8063762b1c921161018c5780639416b423116101665780639416b4231461083d57806395d89b411461085d5780639ffdb65a14610872578063a22cb4651461089257600080fd5b8063762b1c92146107df5780638588b2c5146107ff5780638da5cb5b1461081f57600080fd5b806370a08231116101c857806370a082311461077f578063715018a61461079f57806374151be0146107b4578063756059bd146107c957600080fd5b806365e649031461072957806366c0f38f146107495780636d5224181461075f57600080fd5b806323b872dd116102d35780634019a3b81161027157806354b6f1611161024057806354b6f161146106b457806355f804b3146106c95780635a5eff31146106e95780636352211e1461070957600080fd5b80634019a3b81461063457806342842e0e146106545780634d426528146106745780634f6ccce71461069457600080fd5b80633479d5c9116102ad5780633479d5c9146105bf57806336033deb146105df578063386172f3146105ff5780633ccfd60b1461061f57600080fd5b806323b872dd1461055f5780632f745c591461057f5780633028f63a1461059f57600080fd5b80630f51e77411610340578063169926631161031a578063169926631461050157806318160ddd146105145780631c760bdb146105295780631e0cc9a81461054957600080fd5b80630f51e774146104ae57806312616a7b146104c157806315b56d10146104e157600080fd5b8063095ea7b31161037c578063095ea7b3146104325780630a456fed146104545780630b29043a146104785780630d1599471461048e57600080fd5b806301ffc9a7146103a357806306fdde03146103d8578063081812fc146103fa575b600080fd5b3480156103af57600080fd5b506103c36103be366004614a24565b610ab6565b60405190151581526020015b60405180910390f35b3480156103e457600080fd5b506103ed610b0f565b6040516103cf9190614a99565b34801561040657600080fd5b5061041a610415366004614aac565b610ba1565b604051600160a060020a0390911681526020016103cf565b34801561043e57600080fd5b5061045261044d366004614ae1565b610c4f565b005b34801561046057600080fd5b5061046a60135481565b6040519081526020016103cf565b34801561048457600080fd5b5061046a60165481565b34801561049a57600080fd5b5061046a6104a9366004614aac565b610d87565b6104526104bc366004614b0b565b610da8565b3480156104cd57600080fd5b506104526104dc366004614aac565b61109d565b3480156104ed57600080fd5b506103c36104fc366004614c44565b611129565b61045261050f366004614aac565b61115c565b34801561052057600080fd5b5060085461046a565b34801561053557600080fd5b50610452610544366004614aac565b6113a0565b34801561055557600080fd5b5061046a60125481565b34801561056b57600080fd5b5061045261057a366004614c79565b6114ed565b34801561058b57600080fd5b5061046a61059a366004614ae1565b611577565b3480156105ab57600080fd5b506104526105ba366004614cb5565b611622565b3480156105cb57600080fd5b506103c36105da366004614aac565b6116cf565b3480156105eb57600080fd5b506103ed6105fa366004614aac565b6117df565b34801561060b57600080fd5b5061045261061a366004614aac565b611879565b34801561062b57600080fd5b506104526118fe565b34801561064057600080fd5b5061045261064f366004614aac565b6119c8565b34801561066057600080fd5b5061045261066f366004614c79565b611a4d565b34801561068057600080fd5b5061045261068f366004614cd0565b611a68565b3480156106a057600080fd5b5061046a6106af366004614aac565b611bf0565b3480156106c057600080fd5b5061046a603281565b3480156106d557600080fd5b506104526106e4366004614d17565b611c97565b3480156106f557600080fd5b5061046a610704366004614aac565b611cee565b34801561071557600080fd5b5061041a610724366004614aac565b611d11565b34801561073557600080fd5b50610452610744366004614cb5565b611d9f565b34801561075557600080fd5b5061046a60145481565b34801561076b57600080fd5b506103ed61077a366004614aac565b611e4c565b34801561078b57600080fd5b5061046a61079a366004614cb5565b611eee565b3480156107ab57600080fd5b50610452611f8b565b3480156107c057600080fd5b5061046a606481565b3480156107d557600080fd5b5061046a6105dc81565b3480156107eb57600080fd5b506104526107fa366004614aac565b611fe2565b34801561080b57600080fd5b5061045261081a366004614aac565b612210565b34801561082b57600080fd5b50600d54600160a060020a031661041a565b34801561084957600080fd5b506103ed610858366004614c44565b612582565b34801561086957600080fd5b506103ed612752565b34801561087e57600080fd5b506103c361088d366004614c44565b612761565b34801561089e57600080fd5b506104526108ad366004614d77565b612b9f565b3480156108be57600080fd5b5060155442116103c3565b3480156108d557600080fd5b506104526108e4366004614db3565b612baa565b3480156108f557600080fd5b50610452610904366004614aac565b612c35565b34801561091557600080fd5b5060165442116103c3565b34801561092c57600080fd5b5061046a61025881565b34801561094257600080fd5b5061046a67011c37937e08000081565b34801561095e57600080fd5b5061045261096d366004614cd0565b612cba565b34801561097e57600080fd5b506103ed61098d366004614aac565b612ecf565b34801561099e57600080fd5b5061046a60155481565b3480156109b457600080fd5b506103ed612fbb565b3480156109c957600080fd5b506109fe6109d8366004614aac565b6017602052600090815260409020805460019091015460ff808316926101009004169083565b6040516103cf93929190614e5e565b348015610a1957600080fd5b506103c3610a28366004614ead565b600160a060020a03918216600090815260056020908152604080832093909416825291909152205460ff1690565b348015610a6257600080fd5b50610452610a71366004614aac565b612fc8565b348015610a8257600080fd5b50610452610a91366004614cb5565b6132d7565b348015610aa257600080fd5b50610452610ab1366004614aac565b6133aa565b60007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1982167f780e9d63000000000000000000000000000000000000000000000000000000001480610b095750610b0982613435565b92915050565b606060008054610b1e90614ee0565b80601f0160208091040260200160405190810160405280929190818152602001828054610b4a90614ee0565b8015610b975780601f10610b6c57610100808354040283529160200191610b97565b820191906000526020600020905b815481529060010190602001808311610b7a57829003601f168201915b5050505050905090565b600081815260026020526040812054600160a060020a0316610c335760405160e560020a62461bcd02815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084015b60405180910390fd5b50600090815260046020526040902054600160a060020a031690565b6000610c5a82611d11565b905080600160a060020a031683600160a060020a03161415610ce75760405160e560020a62461bcd02815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610c2a565b33600160a060020a0382161480610d035750610d038133610a28565b610d785760405160e560020a62461bcd02815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610c2a565b610d82838361350f565b505050565b60118181548110610d9757600080fd5b600091825260209091200154905081565b67011c37937e080000341015610e035760405160e560020a62461bcd02815260206004820152601b60248201527f4d696e74696e67205072696365206973206e6f7420656e6f75676800000000006044820152606401610c2a565b6012544211610e575760405160e560020a62461bcd02815260206004820152601f60248201527f507269766174652053616c65206973206e6f74207374617274656420796574006044820152606401610c2a565b601254610e679062015180614f63565b4210610eb85760405160e560020a62461bcd02815260206004820152601d60248201527f507269766174652053616c6520697320616c726561647920656e6465640000006044820152606401610c2a565b3360009081526018602052604090205460ff1615610f675760405160e560020a62461bcd02815260206004820152605a60248201527f596f7527766520616c7265616479206d696e74656420746f6b656e2e2049662060448201527f796f752077616e74206d6f72652c20796f752077696c6c2062652061626c652060648201527f746f206d696e7420647572696e67205075626c69632053616c65000000000000608482015260a401610c2a565b6040516c01000000000000000000000000330260208201527f12b1013fe853dea282b3440a70e5d739b7ef75e135122659fe5408bde23a4cc190600090603401604051602081830303815290604052805190602001209050610fff84848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525086925085915061358a9050565b6110745760405160e560020a62461bcd02815260206004820152603560248201527f536f7272792c20796f75277265206e6f742077686974656c69737465642e205060448201527f6c6561736520747279205075626c69632053616c6500000000000000000000006064820152608401610c2a565b336000908152601860205260408120805460ff19166001179055611097906135a0565b50505050565b600d54600160a060020a031633146110e85760405160e560020a62461bcd02815260206004820181905260248201526000805160206153328339815191526044820152606401610c2a565b6015819055604080518281524260208201527f9ebd770b6933866942a2245db0e13be99b87ec65878b4c32ac3183fcb9df58a391015b60405180910390a150565b6000600c61113683612582565b6040516111439190614f7b565b9081526040519081900360200190205460ff1692915050565b61116e8167011c37937e080000614f97565b3410156111c05760405160e560020a62461bcd02815260206004820152601b60248201527f4d696e74696e67205072696365206973206e6f7420656e6f75676800000000006044820152606401610c2a565b60135442116112145760405160e560020a62461bcd02815260206004820152601e60248201527f5075626c69632053616c65206973206e6f7420737461727465642079657400006044820152606401610c2a565b6013546112249062015180614f63565b42106112755760405160e560020a62461bcd02815260206004820152601c60248201527f5075626c69632053616c6520697320616c726561647920656e646564000000006044820152606401610c2a565b600381106112c85760405160e560020a62461bcd02815260206004820152601e60248201527f596f752063616e206f6e6c792072657175697265206174206d6f7374203200006044820152606401610c2a565b336000908152601960205260409020546003116113505760405160e560020a62461bcd02815260206004820152602e60248201527f596f752063616e206f6e6c79206d696e74206174206d6f73742032206475726960448201527f6e67205075626c69632053616c650000000000000000000000000000000000006064820152608401610c2a565b336000908152601960205260408120805483929061136f908490614f63565b90915550600090505b8181101561139c5761138a60006135a0565b8061139481614fb6565b915050611378565b5050565b600081815260176020526040902054610100900460ff1661142c5760405160e560020a62461bcd02815260206004820152602760248201527f5468697320746f6b656e206861736e27742065766572206265656e207374616b60448201527f6564207965742e000000000000000000000000000000000000000000000000006064820152608401610c2a565b601c546040517f183b8bac00000000000000000000000000000000000000000000000000000000815233600482015260248101839052600160a060020a039091169063183b8bac90604401600060405180830381600087803b15801561149157600080fd5b505af11580156114a5573d6000803e3d6000fd5b5050601c546040805160208101909152600081526114d49350600160a060020a03909116915033908490613757565b6000908152601760205260409020805461ff0019169055565b6114f733826137e3565b61156c5760405160e560020a62461bcd02815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610c2a565b610d828383836138ee565b600061158283611eee565b82106115f95760405160e560020a62461bcd02815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e64730000000000000000000000000000000000000000006064820152608401610c2a565b50600160a060020a03919091166000908152600660209081526040808320938352929052205490565b600d54600160a060020a0316331461166d5760405160e560020a62461bcd02815260206004820181905260248201526000805160206153328339815191526044820152606401610c2a565b601c805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383169081179091556040805130815260208101929092527f760ce5dc79857db1adeef862ffd74cad38dd68efdfd73100f66a342b43818cbc910161111e565b600081815260176020526040812054819060ff1660028111156116f4576116f4614e2f565b9050600160008481526017602052604090205460ff16600281111561171b5761171b614e2f565b14156117925760405160e560020a62461bcd02815260206004820152602860248201527f5472792061646f7074696e6720776974682047656e65736973206f7220416c7060448201527f68612057756c667a0000000000000000000000000000000000000000000000006064820152608401610c2a565b600083815260176020526040812060010154600e8054919291849081106117bb576117bb614fd1565b906000526020600020015490508082426117d59190615000565b1195945050505050565b600a60205260009081526040902080546117f890614ee0565b80601f016020809104026020016040519081016040528092919081815260200182805461182490614ee0565b80156118715780601f1061184657610100808354040283529160200191611871565b820191906000526020600020905b81548152906001019060200180831161185457829003601f168201915b505050505081565b600d54600160a060020a031633146118c45760405160e560020a62461bcd02815260206004820181905260248201526000805160206153328339815191526044820152606401610c2a565b6014819055604080518281524260208201527f46fc69507a8168e1f58a1539aa368a4c0187cdad07df168d054f733afc055ec0910161111e565b600d54600160a060020a031633146119495760405160e560020a62461bcd02815260206004820181905260248201526000805160206153328339815191526044820152606401610c2a565b30318061199b5760405160e560020a62461bcd02815260206004820152600f60248201527f42616c616e6365206973207a65726f00000000000000000000000000000000006044820152606401610c2a565b604051339082156108fc029083906000818181858888f1935050505015801561139c573d6000803e3d6000fd5b600d54600160a060020a03163314611a135760405160e560020a62461bcd02815260206004820181905260248201526000805160206153328339815191526044820152606401610c2a565b6012819055604080518281524260208201527fc0dc7f303e850ad753f8cd31dd289f4487d62cb53a165cf760b65694e1b3f270910161111e565b610d8283838360405180602001604052806000815250612baa565b33611a7283611d11565b600160a060020a031614611acb5760405160e560020a62461bcd02815260206004820152601f60248201527f4368616e676542696f3a20796f75277265206e6f7420746865206f776e6572006044820152606401610c2a565b601b54604080517f313ce5670000000000000000000000000000000000000000000000000000000081529051600160a060020a0390921691639dc29fac913391849163313ce5679160048083019260209291908290030181865afa158015611b37573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b5b9190615017565b611b6690600a615121565b611b71906064614f97565b6040517c010000000000000000000000000000000000000000000000000000000063ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b158015611bce57600080fd5b505af1158015611be2573d6000803e3d6000fd5b5050505061139c8282613ad9565b6000611bfb60085490565b8210611c725760405160e560020a62461bcd02815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e647300000000000000000000000000000000000000006064820152608401610c2a565b60088281548110611c8557611c85614fd1565b90600052602060002001549050919050565b600d54600160a060020a03163314611ce25760405160e560020a62461bcd02815260206004820181905260248201526000805160206153328339815191526044820152606401610c2a565b610d82601a83836148ec565b60008181526017602052604081205460ff166002811115610b0957610b09614e2f565b600081815260026020526040812054600160a060020a031680610b095760405160e560020a62461bcd02815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610c2a565b600d54600160a060020a03163314611dea5760405160e560020a62461bcd02815260206004820181905260248201526000805160206153328339815191526044820152606401610c2a565b601b805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383169081179091556040805130815260208101929092527fd2b7029d21747e3ef6781f470dcc87559562c992a58fccb970bc972e00d6f707910161111e565b6000818152600b60205260409020805460609190611e6990614ee0565b80601f0160208091040260200160405190810160405280929190818152602001828054611e9590614ee0565b8015611ee25780601f10611eb757610100808354040283529160200191611ee2565b820191906000526020600020905b815481529060010190602001808311611ec557829003601f168201915b50505050509050919050565b6000600160a060020a038216611f6f5760405160e560020a62461bcd02815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610c2a565b50600160a060020a031660009081526003602052604090205490565b600d54600160a060020a03163314611fd65760405160e560020a62461bcd02815260206004820181905260248201526000805160206153328339815191526044820152606401610c2a565b611fe06000613b9e565b565b601454421161205b5760405160e560020a62461bcd028152602060048201526024808201527f5374616b696e67204d656368616e69736d206973206e6f74207374617274656460448201527f20796574000000000000000000000000000000000000000000000000000000006064820152608401610c2a565b3361206582611d11565b600160a060020a0316146120be5760405160e560020a62461bcd02815260206004820152601a60248201527f5374616b696e673a206f776e6572206e6f74206d6174636865640000000000006044820152606401610c2a565b600081815260176020526040902054610100900460ff161561214b5760405160e560020a62461bcd02815260206004820152603760248201527f5468697320546f6b656e20697320616c7265616479207374616b65642e20506c60448201527f656173652074727920616e6f7468657220746f6b656e2e0000000000000000006064820152608401610c2a565b601c546040517fcf8317fa00000000000000000000000000000000000000000000000000000000815233600482015260248101839052600160a060020a039091169063cf8317fa90604401600060405180830381600087803b1580156121b057600080fd5b505af11580156121c4573d6000803e3d6000fd5b5050601c546040805160208101909152600081526121f39350339250600160a060020a03909116908490613757565b6000908152601760205260409020805461ff001916610100179055565b612219816116cf565b6122db5760405160e560020a62461bcd028152602060048201526064602482018190527f416c72656164792061646f707420696e20746865207061737420646179732e2060448301527f47656e657369732057756c667a2063616e2061646f7074206576657279203134908201527f206461797320616e6420416c7068612063616e20646f2065766572792037206460848201527f6179732e0000000000000000000000000000000000000000000000000000000060a482015260c401610c2a565b601554421161232f5760405160e560020a62461bcd02815260206004820152601e60248201527f41646f7074696e67205075707a206973206e6f742072656164792079657400006044820152606401610c2a565b3361233982611d11565b600160a060020a0316146123b85760405160e560020a62461bcd02815260206004820152602860248201527f41646f7074696e673a20596f75277265206e6f74206f776e6572206f6620746860448201527f697320746f6b656e0000000000000000000000000000000000000000000000006064820152608401610c2a565b600081815260176020526040902054610100900460ff16156124455760405160e560020a62461bcd02815260206004820152603760248201527f5468697320546f6b656e20697320616c7265616479207374616b65642e20506c60448201527f656173652074727920616e6f7468657220746f6b656e2e0000000000000000006064820152608401610c2a565b601b54604080517f313ce5670000000000000000000000000000000000000000000000000000000081529051600160a060020a0390921691639dc29fac913391849163313ce5679160048083019260209291908290030181865afa1580156124b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124d59190615017565b6124e090600a615121565b6124ec90610258614f97565b6040517c010000000000000000000000000000000000000000000000000000000063ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b15801561254957600080fd5b505af115801561255d573d6000803e3d6000fd5b5050505061256b60016135a0565b600090815260176020526040902042600190910155565b606060008290506000815167ffffffffffffffff8111156125a5576125a5614b7f565b6040519080825280601f01601f1916602001820160405280156125cf576020820181803683370190505b50905060005b825181101561274a5760418382815181106125f2576125f2614fd1565b602001015160f860020a900460f860020a0260f860020a900460ff161015801561264a5750605a83828151811061262b5761262b614fd1565b602001015160f860020a900460f860020a0260f860020a900460ff1611155b156126d25782818151811061266157612661614fd1565b602001015160f860020a900460f860020a0260f860020a900460206126869190615130565b60f860020a0282828151811061269e5761269e614fd1565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350612738565b8281815181106126e4576126e4614fd1565b602001015160f860020a900460f860020a0282828151811061270857612708614fd1565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b8061274281614fb6565b9150506125d5565b509392505050565b606060018054610b1e90614ee0565b60008082905060018151101561277a5750600092915050565b60198151111561278d5750600092915050565b806000815181106127a0576127a0614fd1565b602001015160f860020a900460f860020a027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916602060f860020a0214156127eb5750600092915050565b80600182516127fa9190615000565b8151811061280a5761280a614fd1565b602001015160f860020a900460f860020a027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916602060f860020a0214156128555750600092915050565b60008160008151811061286a5761286a614fd1565b602001015160f860020a900460f860020a02905060005b8251811015612b9457600083828151811061289e5761289e614fd1565b016020015160f860020a908190040290507f20000000000000000000000000000000000000000000000000000000000000007fff00000000000000000000000000000000000000000000000000000000000000821614801561294157507f20000000000000000000000000000000000000000000000000000000000000007fff000000000000000000000000000000000000000000000000000000000000008416145b156129525750600095945050505050565b7f30000000000000000000000000000000000000000000000000000000000000007fff000000000000000000000000000000000000000000000000000000000000008216108015906129e657507f39000000000000000000000000000000000000000000000000000000000000007fff00000000000000000000000000000000000000000000000000000000000000821611155b158015612a8457507f41000000000000000000000000000000000000000000000000000000000000007fff00000000000000000000000000000000000000000000000000000000000000821610801590612a8257507f5a000000000000000000000000000000000000000000000000000000000000007fff00000000000000000000000000000000000000000000000000000000000000821611155b155b8015612b2157507f61000000000000000000000000000000000000000000000000000000000000007fff00000000000000000000000000000000000000000000000000000000000000821610801590612b1f57507f7a000000000000000000000000000000000000000000000000000000000000007fff00000000000000000000000000000000000000000000000000000000000000821611155b155b8015612b6f57507f20000000000000000000000000000000000000000000000000000000000000007fff00000000000000000000000000000000000000000000000000000000000000821614155b15612b805750600095945050505050565b915080612b8c81614fb6565b915050612881565b506001949350505050565b61139c338383613bfd565b612bb433836137e3565b612c295760405160e560020a62461bcd02815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610c2a565b61109784848484613757565b600d54600160a060020a03163314612c805760405160e560020a62461bcd02815260206004820181905260248201526000805160206153328339815191526044820152606401610c2a565b6013819055604080518281524260208201527f53bb3f0edf5961602b6c985f8d776a7241ad4458cb383fe8233e64154647d08d910161111e565b33612cc483611d11565b600160a060020a031614612d1d5760405160e560020a62461bcd02815260206004820181905260248201527f4368616e67654e616d653a20796f75277265206e6f7420746865206f776e65726044820152606401610c2a565b600082815260176020526040902054610100900460ff1615612daa5760405160e560020a62461bcd02815260206004820152603760248201527f5468697320546f6b656e20697320616c7265616479207374616b65642e20506c60448201527f656173652074727920616e6f7468657220746f6b656e2e0000000000000000006064820152608401610c2a565b601b54604080517f313ce5670000000000000000000000000000000000000000000000000000000081529051600160a060020a0390921691639dc29fac913391849163313ce5679160048083019260209291908290030181865afa158015612e16573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e3a9190615017565b612e4590600a615121565b612e50906032614f97565b6040517c010000000000000000000000000000000000000000000000000000000063ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b158015612ead57600080fd5b505af1158015612ec1573d6000803e3d6000fd5b5050505061139c8282613ccf565b600081815260026020526040902054606090600160a060020a0316612f5f5760405160e560020a62461bcd02815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610c2a565b6000612f69614031565b90506000815111612f895760405180602001604052806000815250612fb4565b80612f9384614040565b604051602001612fa4929190615155565b6040516020818303038152906040525b9392505050565b601a80546117f890614ee0565b601654421161301c5760405160e560020a62461bcd02815260206004820152601f60248201527f45766f6c76696e672057756c667a206973206e6f7420726561647920796574006044820152606401610c2a565b3361302682611d11565b600160a060020a0316146130a55760405160e560020a62461bcd02815260206004820152602660248201527f45766f6c76653a20596f75277265206e6f74206f776e6572206f66207468697360448201527f20746f6b656e00000000000000000000000000000000000000000000000000006064820152608401610c2a565b60008181526017602052604081205460ff1660028111156130c8576130c8614e2f565b146131185760405160e560020a62461bcd02815260206004820152601d60248201527f47656e657369732063616e206f6e6c792065766f6c766520416c7068610000006044820152606401610c2a565b600081815260176020526040902054610100900460ff16156131a55760405160e560020a62461bcd02815260206004820152603760248201527f5468697320546f6b656e20697320616c7265616479207374616b65642e20506c60448201527f656173652074727920616e6f7468657220746f6b656e2e0000000000000000006064820152608401610c2a565b601b54604080517f313ce5670000000000000000000000000000000000000000000000000000000081529051600160a060020a0390921691639dc29fac913391849163313ce5679160048083019260209291908290030181865afa158015613211573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132359190615017565b61324090600a615121565b61324c906105dc614f97565b6040517c010000000000000000000000000000000000000000000000000000000063ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b1580156132a957600080fd5b505af11580156132bd573d6000803e3d6000fd5b505050506132ca81614175565b6132d460026135a0565b50565b600d54600160a060020a031633146133225760405160e560020a62461bcd02815260206004820181905260248201526000805160206153328339815191526044820152606401610c2a565b600160a060020a0381166133a15760405160e560020a62461bcd02815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610c2a565b6132d481613b9e565b600d54600160a060020a031633146133f55760405160e560020a62461bcd02815260206004820181905260248201526000805160206153328339815191526044820152606401610c2a565b6016819055604080518281524260208201527f20fd2b88254004c55cd45d3a7ff944318d39a1033f5075060d0b2f3fa5bda652910161111e565b3b151590565b60007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1982167f80ac58cd0000000000000000000000000000000000000000000000000000000014806134c257507bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610b0957507f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19831614610b09565b6000818152600460205260409020805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038416908117909155819061355182611d11565b600160a060020a03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000826135978584614229565b14949350505050565b3332146135ac57600080fd5b600f8160028111156135c0576135c0614e2f565b815481106135d0576135d0614fd1565b906000526020600020015460118260028111156135ef576135ef614e2f565b815481106135ff576135ff614fd1565b90600052602060002001541061365a5760405160e560020a62461bcd02815260206004820152601560248201527f416c6c20746f6b656e7320617265206d696e74656400000000000000000000006044820152606401610c2a565b6000601182600281111561367057613670614e2f565b8154811061368057613680614fd1565b906000526020600020016000815461369790614fb6565b9182905550905060108260028111156136b2576136b2614e2f565b815481106136c2576136c2614fd1565b9060005260206000200154816136d89190614f63565b90506136e433826142cd565b6000818152601760205260409020805483919060ff1916600183600281111561370f5761370f614e2f565b021790555081600281111561372657613726614e2f565b604051829033907f3788aa0b63cf0de40ea025fef7bb67d001c7c60cd6e3b1b2804a56e449a39b8d90600090a45050565b6137628484846138ee565b61376e848484846142e7565b6110975760405160e560020a62461bcd02815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610c2a565b600081815260026020526040812054600160a060020a03166138705760405160e560020a62461bcd02815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610c2a565b600061387b83611d11565b905080600160a060020a031684600160a060020a031614806138b6575083600160a060020a03166138ab84610ba1565b600160a060020a0316145b806138e65750600160a060020a0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b82600160a060020a031661390182611d11565b600160a060020a0316146139805760405160e560020a62461bcd02815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e00000000000000000000000000000000000000000000006064820152608401610c2a565b600160a060020a0382166139fe5760405160e560020a62461bcd028152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610c2a565b613a0983838361447a565b613a1460008261350f565b600160a060020a0383166000908152600360205260408120805460019290613a3d908490615000565b9091555050600160a060020a0382166000908152600360205260408120805460019290613a6b908490614f63565b9091555050600081815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6000613ae483611d11565b905033600160a060020a03821614613b415760405160e560020a62461bcd02815260206004820152601f60248201527f4552433732313a2063616c6c6572206973206e6f7420746865206f776e6572006044820152606401610c2a565b6000838152600a602090815260409091208351613b6092850190614970565b50827fbe3e2fc72ea4bd0d860e908b1ee27aa9856809e62a75bfc0cb7f04b5d791873d83604051613b919190614a99565b60405180910390a2505050565b600d8054600160a060020a0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b81600160a060020a031683600160a060020a03161415613c625760405160e560020a62461bcd02815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610c2a565b600160a060020a03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6000613cda83611d11565b905033600160a060020a03821614613d375760405160e560020a62461bcd02815260206004820152601f60248201527f4552433732313a2063616c6c6572206973206e6f7420746865206f776e6572006044820152606401610c2a565b613d4082612761565b1515600114613d945760405160e560020a62461bcd02815260206004820152601460248201527f4e6f7420612076616c6964206e6577206e616d650000000000000000000000006044820152606401610c2a565b6000838152600b6020526040908190209051600291613db291615184565b602060405180830381855afa158015613dcf573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190613df29190615239565b600283604051613e029190614f7b565b602060405180830381855afa158015613e1f573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190613e429190615239565b1415613eb95760405160e560020a62461bcd02815260206004820152602360248201527f4e6577206e616d652069732073616d65206173207468652063757272656e742060448201527f6f6e6500000000000000000000000000000000000000000000000000000000006064820152608401610c2a565b613ec282611129565b15613f125760405160e560020a62461bcd02815260206004820152601560248201527f4e616d6520616c726561647920726573657276656400000000000000000000006044820152606401610c2a565b6000838152600b602052604081208054613f2b90614ee0565b90501115613fd6576000838152600b602052604090208054613fd69190613f5190614ee0565b80601f0160208091040260200160405190810160405280929190818152602001828054613f7d90614ee0565b8015613fca5780601f10613f9f57610100808354040283529160200191613fca565b820191906000526020600020905b815481529060010190602001808311613fad57829003601f168201915b50505050506000614532565b613fe1826001614532565b6000838152600b60209081526040909120835161400092850190614970565b50827f7e632a301794d8d4a81ea7e20f37d1947158d36e66403af04ba85dd194b66f1b83604051613b919190614a99565b6060601a8054610b1e90614ee0565b60608161408057505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156140aa578061409481614fb6565b91506140a39050600a83615281565b9150614084565b60008167ffffffffffffffff8111156140c5576140c5614b7f565b6040519080825280601f01601f1916602001820160405280156140ef576020820181803683370190505b5090505b84156138e657614104600183615000565b9150614111600a86615295565b61411c906030614f63565b60f860020a0281838151811061413457614134614fd1565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061416e600a86615281565b94506140f3565b600061418082611d11565b905061418e8160008461447a565b61419960008361350f565b600160a060020a03811660009081526003602052604081208054600192906141c2908490615000565b9091555050600082815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff1916905551839190600160a060020a038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b600081815b845181101561274a57600085828151811061424b5761424b614fd1565b6020026020010151905080831161428d5760408051602081018590529081018290526060016040516020818303038152906040528051906020012092506142ba565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b50806142c581614fb6565b91505061422e565b61139c82826040518060200160405280600081525061456f565b6000600160a060020a0384163b15612b94576040517f150b7a02000000000000000000000000000000000000000000000000000000008152600160a060020a0385169063150b7a02906143449033908990889088906004016152a9565b6020604051808303816000875af192505050801561437f575060408051601f3d908101601f1916820190925261437c918101906152e5565b60015b614432573d8080156143ad576040519150601f19603f3d011682016040523d82523d6000602084013e6143b2565b606091505b50805161442a5760405160e560020a62461bcd02815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610c2a565b805181602001fd5b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167f150b7a02000000000000000000000000000000000000000000000000000000001490506138e6565b600160a060020a0383166144d5576144d081600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6144f8565b81600160a060020a031683600160a060020a0316146144f8576144f883826145fb565b600160a060020a03821661450f57610d8281614698565b82600160a060020a031682600160a060020a031614610d8257610d828282614747565b80600c61453e84612582565b60405161454b9190614f7b565b908152604051908190036020019020805491151560ff199092169190911790555050565b614579838361478b565b61458660008484846142e7565b610d825760405160e560020a62461bcd02815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610c2a565b6000600161460884611eee565b6146129190615000565b60008381526007602052604090205490915080821461466557600160a060020a03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b506000918252600760209081526040808420849055600160a060020a039094168352600681528383209183525290812055565b6008546000906146aa90600190615000565b600083815260096020526040812054600880549394509092849081106146d2576146d2614fd1565b9060005260206000200154905080600883815481106146f3576146f3614fd1565b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061472b5761472b615302565b6001900381819060005260206000200160009055905550505050565b600061475283611eee565b600160a060020a039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b600160a060020a0382166147e45760405160e560020a62461bcd02815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610c2a565b600081815260026020526040902054600160a060020a03161561484c5760405160e560020a62461bcd02815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610c2a565b6148586000838361447a565b600160a060020a0382166000908152600360205260408120805460019290614881908490614f63565b9091555050600081815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b8280546148f890614ee0565b90600052602060002090601f01602090048101928261491a5760008555614960565b82601f106149335782800160ff19823516178555614960565b82800160010185558215614960579182015b82811115614960578235825591602001919060010190614945565b5061496c9291506149e4565b5090565b82805461497c90614ee0565b90600052602060002090601f01602090048101928261499e5760008555614960565b82601f106149b757805160ff1916838001178555614960565b82800160010185558215614960579182015b828111156149605782518255916020019190600101906149c9565b5b8082111561496c57600081556001016149e5565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19811681146132d457600080fd5b600060208284031215614a3657600080fd5b8135612fb4816149f9565b60005b83811015614a5c578181015183820152602001614a44565b838111156110975750506000910152565b60008151808452614a85816020860160208601614a41565b601f01601f19169290920160200192915050565b602081526000612fb46020830184614a6d565b600060208284031215614abe57600080fd5b5035919050565b8035600160a060020a0381168114614adc57600080fd5b919050565b60008060408385031215614af457600080fd5b614afd83614ac5565b946020939093013593505050565b60008060208385031215614b1e57600080fd5b823567ffffffffffffffff80821115614b3657600080fd5b818501915085601f830112614b4a57600080fd5b813581811115614b5957600080fd5b8660208083028501011115614b6d57600080fd5b60209290920196919550909350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600067ffffffffffffffff80841115614bc957614bc9614b7f565b604051601f8501601f19908116603f01168101908282118183101715614bf157614bf1614b7f565b81604052809350858152868686011115614c0a57600080fd5b858560208301376000602087830101525050509392505050565b600082601f830112614c3557600080fd5b612fb483833560208501614bae565b600060208284031215614c5657600080fd5b813567ffffffffffffffff811115614c6d57600080fd5b6138e684828501614c24565b600080600060608486031215614c8e57600080fd5b614c9784614ac5565b9250614ca560208501614ac5565b9150604084013590509250925092565b600060208284031215614cc757600080fd5b612fb482614ac5565b60008060408385031215614ce357600080fd5b82359150602083013567ffffffffffffffff811115614d0157600080fd5b614d0d85828601614c24565b9150509250929050565b60008060208385031215614d2a57600080fd5b823567ffffffffffffffff80821115614d4257600080fd5b818501915085601f830112614d5657600080fd5b813581811115614d6557600080fd5b866020828501011115614b6d57600080fd5b60008060408385031215614d8a57600080fd5b614d9383614ac5565b915060208301358015158114614da857600080fd5b809150509250929050565b60008060008060808587031215614dc957600080fd5b614dd285614ac5565b9350614de060208601614ac5565b925060408501359150606085013567ffffffffffffffff811115614e0357600080fd5b8501601f81018713614e1457600080fd5b614e2387823560208401614bae565b91505092959194509250565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6060810160038510614e99577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b938152911515602083015260409091015290565b60008060408385031215614ec057600080fd5b614ec983614ac5565b9150614ed760208401614ac5565b90509250929050565b600281046001821680614ef457607f821691505b60208210811415614f2e577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008219821115614f7657614f76614f34565b500190565b60008251614f8d818460208701614a41565b9190910192915050565b6000816000190483118215151615614fb157614fb1614f34565b500290565b6000600019821415614fca57614fca614f34565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008282101561501257615012614f34565b500390565b60006020828403121561502957600080fd5b815160ff81168114612fb457600080fd5b600181815b8085111561507757816000190482111561505b5761505b614f34565b8085161561506857918102915b6002909404939080029061503f565b509250929050565b60008261508e57506001610b09565b8161509b57506000610b09565b81600181146150b157600281146150bb576150d8565b6001915050610b09565b60ff8411156150cc576150cc614f34565b8360020a915050610b09565b5060208310610133831016604e8410600b84101617156150fb575081810a610b09565b615105838361503a565b806000190482111561511957615119614f34565b029392505050565b6000612fb460ff84168361507f565b600060ff821660ff84168060ff0382111561514d5761514d614f34565b019392505050565b60008351615167818460208801614a41565b83519083019061517b818360208801614a41565b01949350505050565b81546000908190600281046001808316806151a057607f831692505b60208084108214156151d9577f4e487b710000000000000000000000000000000000000000000000000000000086526022600452602486fd5b8180156151ed57600181146151fe5761522b565b60ff1986168952848901965061522b565b60008a81526020902060005b868110156152235781548b82015290850190830161520a565b505084890196505b509498975050505050505050565b60006020828403121561524b57600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261529057615290615252565b500490565b6000826152a4576152a4615252565b500690565b6000600160a060020a038087168352808616602084015250836040830152608060608301526152db6080830184614a6d565b9695505050505050565b6000602082840312156152f757600080fd5b8151612fb4816149f9565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220155d91541190757a4f99d98c03f6b00917af803e6243d574e4a06396caa5334664736f6c634300080a0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000557756c667a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000557554c465a000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _name (string): Wulfz
Arg [1] : _symbol (string): WULFZ
-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [3] : 57756c667a000000000000000000000000000000000000000000000000000000
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [5] : 57554c465a000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.