More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 3,236 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Free Roll New Ha... | 58280820 | 48 days ago | IN | 0 AVAX | 0.00017769 | ||||
Set Approval For... | 57749535 | 59 days ago | IN | 0 AVAX | 0.00016197 | ||||
Set Approval For... | 57675456 | 60 days ago | IN | 0 AVAX | 0.00011569 | ||||
Approve | 56381179 | 87 days ago | IN | 0 AVAX | 0.00004431 | ||||
Approve | 56381176 | 87 days ago | IN | 0 AVAX | 0.00004431 | ||||
Approve | 56381171 | 87 days ago | IN | 0 AVAX | 0.00004431 | ||||
Approve | 56381168 | 87 days ago | IN | 0 AVAX | 0.00004431 | ||||
Approve | 56381164 | 87 days ago | IN | 0 AVAX | 0.00004431 | ||||
Approve | 56381161 | 87 days ago | IN | 0 AVAX | 0.00004431 | ||||
Approve | 56381157 | 87 days ago | IN | 0 AVAX | 0.00004431 | ||||
Approve | 56381154 | 87 days ago | IN | 0 AVAX | 0.00004431 | ||||
Approve | 56381149 | 87 days ago | IN | 0 AVAX | 0.00004431 | ||||
Approve | 56381144 | 87 days ago | IN | 0 AVAX | 0.00004714 | ||||
Free Roll New Mo... | 56058235 | 93 days ago | IN | 0 AVAX | 0.00009343 | ||||
Free Roll New Ba... | 56058230 | 93 days ago | IN | 0 AVAX | 0.00016752 | ||||
Free Roll New Ba... | 55087577 | 114 days ago | IN | 0 AVAX | 0.0000596 | ||||
Approve | 54018625 | 137 days ago | IN | 0 AVAX | 0.00083281 | ||||
Approve | 54018623 | 137 days ago | IN | 0 AVAX | 0.00083281 | ||||
Approve | 54018622 | 137 days ago | IN | 0 AVAX | 0.00083281 | ||||
Approve | 54018620 | 137 days ago | IN | 0 AVAX | 0.00083281 | ||||
Approve | 54018618 | 137 days ago | IN | 0 AVAX | 0.00083281 | ||||
Set Approval For... | 52449167 | 174 days ago | IN | 0 AVAX | 0.00122636 | ||||
Set Approval For... | 52287688 | 178 days ago | IN | 0 AVAX | 0.00127264 | ||||
Set Approval For... | 51436927 | 199 days ago | IN | 0 AVAX | 0.00122414 | ||||
Set Approval For... | 47849224 | 285 days ago | IN | 0 AVAX | 0.00127264 |
Latest 25 internal transactions (View All)
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
42936994 | 403 days ago | 1.815 AVAX | ||||
42936994 | 403 days ago | 34.485 AVAX | ||||
29354476 | 725 days ago | 0.009 AVAX | ||||
29354454 | 725 days ago | 0.009 AVAX | ||||
29353406 | 725 days ago | 0.009 AVAX | ||||
29353379 | 725 days ago | 0.009 AVAX | ||||
29353358 | 725 days ago | 0.009 AVAX | ||||
29333639 | 726 days ago | 0.009 AVAX | ||||
29333620 | 726 days ago | 0.009 AVAX | ||||
29333602 | 726 days ago | 0.009 AVAX | ||||
29300864 | 726 days ago | 0.009 AVAX | ||||
29300811 | 726 days ago | 0.009 AVAX | ||||
29300797 | 726 days ago | 0.009 AVAX | ||||
29300785 | 726 days ago | 0.009 AVAX | ||||
29271328 | 727 days ago | 0.009 AVAX | ||||
29262442 | 727 days ago | 0.009 AVAX | ||||
29262424 | 727 days ago | 0.009 AVAX | ||||
29255639 | 727 days ago | 0.009 AVAX | ||||
29255629 | 727 days ago | 0.009 AVAX | ||||
29255618 | 727 days ago | 0.009 AVAX | ||||
29255586 | 727 days ago | 0.009 AVAX | ||||
29255561 | 727 days ago | 0.009 AVAX | ||||
29254779 | 727 days ago | 0.009 AVAX | ||||
29254764 | 727 days ago | 0.009 AVAX | ||||
29251283 | 727 days ago | 0.009 AVAX |
Loading...
Loading
Contract Name:
WeirdFrensNFT
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import './imports/ERC721.sol'; import '@openzeppelin/contracts/token/ERC721/IERC721.sol'; import '@openzeppelin/contracts/utils/Counters.sol'; import '@openzeppelin/contracts/access/AccessControl.sol'; error FrenisGlitched(); error InsufficientAvax(); error DailyCooldownHasntExpired(); error NoMoreFrensLeftToMint(); error UserReachedMintCap(); error NotTheOwner(); contract WeirdFrensNFT is ERC721, AccessControl { /* ========== STATE VARIABLES ========== */ // Using Counters library for token id generation using Counters for Counters.Counter; // Private variable to keep track of token ids Counters.Counter private _tokenIds; // Maximum amount of tokens that can be minted uint256 private MAX_MINT_COUNT; // Mapping to store the experience points of each user mapping(address => uint256) public playerExperience; // Mapping to store the number of tokens sponsored by each user mapping(address => uint256) public sponsorCount; // Mapping to store the number of tokens minted by each user mapping(address => uint256) public frensMinted; // Mapping to store whether a user is whitelisted or not mapping(address => bool) public isWhiteListed; // Mapping to store the last used time of free roll for each token mapping(uint256 => uint256) public freeRollLastUsedTime; // Amount of time required before a user can roll for free again uint256 public minimumTimeBeforeNextFreeRoll; address payable public admin; address payable public admin2; address public marketplaceContractAddress; // Costs of different rolls uint256 public backgroundRollCost; uint256 public bodyRollCost; uint256 public noseRollCost; uint256 public mouthRollCost; uint256 public eyeRollCost; uint256 public chestRollCost; uint256 public hairRollCost; uint256 public accessoryRollCost; // Amount of dust to gift to users uint256 public dustAmountToGift; // Amount of dust to gift to users uint256 public glitchRollCost; // Variable to store the last entropy used uint256 public lastEntropy; // Struct to store data of each token struct Fren { bool isGlitched; uint32 background; uint32 chest; uint32 nose; uint32 eyes; uint32 hair; uint32 accessory; uint32 mouth; } // Array to store all tokens Fren[] public frens; /* ========== EVENTS ========== */ // Event to indicate a new token is minted event Mint(address indexed user, uint256 tokenId); // Event to indicate a token is sponsored event SponsoredMint( address indexed receiver, address indexed sponsor, uint256 tokenId ); // Event to indicate a paid attribute roll has occurred event PaidAttributeRoll( uint256 indexed roll, string indexed AttributeType, address indexed user, uint256 tokenId ); // Event to indicate a free attribute roll has occurred event FreeAttributeRoll( uint256 indexed roll, string indexed AttributeType, address indexed user, uint256 tokenId ); // Event to indicate a glitch roll has occurred event GlitchRoll( bool indexed isGlitched, uint256 background, uint256 chest, uint256 nose, uint256 eyes, uint256 hair, uint256 accessory, uint256 mouth, uint256 indexed tokenId ); event AdminWithdrawal(uint256 transfer1, uint256 transfer2); // This event is emitted when the whiteListUsers() function is called, and it includes the address of the user that has been whitelisted. event userWhitelisted(address indexed user); /* ========== CONSTRUCTOR ========== */ constructor( address payable adminAddress, address payable admin2Address ) ERC721('WeirdFrens', 'FREN') { _setupRole(DEFAULT_ADMIN_ROLE, adminAddress); admin = adminAddress; admin2 = admin2Address; backgroundRollCost = 100000000000000000; // 0.1 AVAX noseRollCost = 100000000000000000; // 0.1 AVAX mouthRollCost = 100000000000000000; // 0.1 AVAX eyeRollCost = 100000000000000000; // 0.1 AVAX chestRollCost = 300000000000000000; // 0.3 AVAX hairRollCost = 300000000000000000; // 0.3 AVAX accessoryRollCost = 500000000000000000; // 0.5 AVAX dustAmountToGift = 9000000000000000; // 0.009 AVAX glitchRollCost = 1400000000000000000; // 1.4 AVAX MAX_MINT_COUNT = 10000; minimumTimeBeforeNextFreeRoll = 1 days; lastEntropy = block.timestamp; } /* ========== MUTATIVE FUNCTIONS ========== */ /** *@dev mints an item to the specified address. * @return uint256 the tokenId of the minted item */ function mintItem() public returns (uint256) { address to = msg.sender; uint256 id = _tokenIds.current(); if (id >= MAX_MINT_COUNT) revert NoMoreFrensLeftToMint(); if (isWhiteListed[to]) { if (frensMinted[to] >= 40) revert UserReachedMintCap(); } else { if (frensMinted[to] >= 20) revert UserReachedMintCap(); } _mint(to, id); if (getApproved(id) == address(0)) { approve(marketplaceContractAddress, id); } frensMinted[to] += 1; _tokenIds.increment(); freeRollLastUsedTime[id] = block.timestamp - 1 days; emit Mint(to, id); // lastEntropy = block.timestamp; frens.push( Fren({ isGlitched: false, background: 2, chest: 0, nose: 4, eyes: 0, hair: 0, accessory: 0, mouth: 0 }) ); return id; } /** * @dev Mints a batch of new items for the caller. * @param times The number of items to mint in the batch. * @return ids An array containing the IDs of the newly minted items. */ function batchMint(uint256 times) public returns (uint256[] memory) { uint256[] memory ids = new uint256[](times); for (uint256 i = 0; i < times; i++) { ids[i] = mintItem(); } return ids; } function totalSupply() public view returns (uint256) { return _tokenIds.current(); } /** * @dev function that allows a user to send a small amount of "dust" to another address * and also creates a new "fren" token and assigns it to the recipient address. * It also increments various counts and updates some other storage variables. * @param to address to which dust should be sent * @return the tokenId of the created fren */ function sponsoredMint(address to) public payable returns (uint256) { if (msg.value < dustAmountToGift) revert InsufficientAvax(); // send them some dust (bool sent, bytes memory data) = to.call{value: dustAmountToGift}(''); require(sent, 'Failed to send AVAX'); uint256 id = _tokenIds.current(); if (id >= MAX_MINT_COUNT) revert NoMoreFrensLeftToMint(); if (isWhiteListed[to]) { if (frensMinted[to] >= 40) revert UserReachedMintCap(); } else { if (frensMinted[to] >= 20) revert UserReachedMintCap(); } _mint(to, id); frensMinted[to] += 1; _tokenIds.increment(); if (getApproved(id) == address(0)) { approve(marketplaceContractAddress, id); } unchecked { sponsorCount[msg.sender] += 1; playerExperience[msg.sender] += 1; } freeRollLastUsedTime[id] = block.timestamp - 1 days; emit SponsoredMint(to, msg.sender, id); // lastEntropy = block.timestamp; frens.push( Fren({ isGlitched: false, background: 2, chest: 0, nose: 4, eyes: 0, hair: 0, accessory: 0, mouth: 0 }) ); return id; } /** * @dev Override of a built-in ERC721 function that runs some logic before a token transfer occurs * @param from the current owner of the token * @param to the address to which the token will be transferred * @param tokenId the tokenId of the token to be transferred * @param batchSize the number of tokens to be transferred */ function _beforeTokenTransfer( address from, address to, uint256 tokenId, uint256 batchSize ) internal override(ERC721) { super._beforeTokenTransfer(from, to, tokenId, batchSize); } function transferFrom( address from, address to, uint256 tokenId ) public override(ERC721) { require( _isApprovedOrOwner(marketplaceContractAddress, tokenId), 'ERC721: caller is not token owner or approved' ); if (getApproved(tokenId) == address(0)) { approve(marketplaceContractAddress, tokenId); } _transfer(from, to, tokenId); approve(marketplaceContractAddress, tokenId); } function safeTransferFrom( address from, address to, uint256 tokenId ) public override(ERC721) { require( _isApprovedOrOwner(marketplaceContractAddress, tokenId), 'ERC721: caller is not token owner or approved' ); if (getApproved(tokenId) == address(0)) { approve(marketplaceContractAddress, tokenId); } _transfer(from, to, tokenId); approve(marketplaceContractAddress, tokenId); } function _transfer( address from, address to, uint256 tokenId ) internal override(ERC721) { require( ERC721.ownerOf(tokenId) == from || _isApprovedOrOwner(marketplaceContractAddress, tokenId), 'WeirdFrens: transfer from incorrect owner' ); require(to != address(0), 'ERC721: transfer to the zero address'); _beforeTokenTransfer(from, to, tokenId, 1); ERC721.__unsafe_increaseBalance(to, 1); ERC721.__unsafe_decreaseBalance(from, 1); // Update the token ownership ERC721._setOwner(tokenId, from, to); emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId, 1); } function approve(address to, uint256 tokenId) public override(ERC721) { require( msg.sender == ownerOf(tokenId) || (msg.sender != ownerOf(tokenId) && to == marketplaceContractAddress), 'WeirdFrensNFT: caller must be either the owner or approving to the marketplace contract' ); _approve(to, tokenId); } function tokenURI( uint256 tokenId ) public view override(ERC721) returns (string memory) { return super.tokenURI(tokenId); } /** * @dev Performs a glitch roll on a specified token, updating its attributes and possibly glitching it. * @notice The caller must be the owner of the token and provide sufficient payment for the roll. * @param tokenId The ID of the token to perform the glitch roll on. */ function glitchRoll(uint256 tokenId) public payable { if (super.ownerOf(tokenId) != msg.sender) revert NotTheOwner(); Fren storage fren = frens[tokenId]; if (fren.isGlitched) revert FrenisGlitched(); if (msg.value < glitchRollCost) revert InsufficientAvax(); playerExperience[msg.sender] += 6; uint256 playerLevel = getPlayerLevel(msg.sender); fren.background = uint32( weightedRoll( generateItems(9), generateUpdatedBackgroundWeights(playerLevel) ) ); fren.chest = uint32( weightedRoll(generateItems(25), generateUpdatedChestWeights(playerLevel)) ); fren.nose = uint32( weightedRoll(generateItems(9), generateUpdatedNoseWeights(playerLevel)) ); fren.eyes = uint32( weightedRoll(generateItems(20), generateUpdatedEyeWeights(playerLevel)) ); fren.hair = uint32( weightedRoll(generateItems(34), generateUpdatedHairWeights(playerLevel)) ); fren.accessory = uint32( weightedRoll( generateItems(15), generateUpdatedAccessoryWeights(playerLevel) ) ); fren.mouth = uint32( weightedRoll(generateItems(14), generateUpdatedMouthWeights(playerLevel)) ); fren.isGlitched = didGlitch(); emit GlitchRoll( fren.isGlitched, fren.background, fren.chest, fren.nose, fren.eyes, fren.hair, fren.accessory, fren.mouth, tokenId ); } /** * @dev Allows a user to roll for a new background for their Fren token * @param tokenId the tokenId of the Fren for which to roll a new background * @notice The user must have enough AVAX to pay for the roll and the Fren token must not be glitched. */ function rollNewBackground(uint256 tokenId) public payable { if (super.ownerOf(tokenId) != msg.sender) revert NotTheOwner(); Fren storage fren = frens[tokenId]; if (fren.isGlitched) revert FrenisGlitched(); if (msg.value < backgroundRollCost) revert InsufficientAvax(); unchecked { playerExperience[msg.sender] += 1; } uint256 playerLevel = getPlayerLevel(msg.sender); uint32 roll = uint32( weightedRoll( generateItems(9), generateUpdatedBackgroundWeights(playerLevel) ) ); fren.background = roll; emit PaidAttributeRoll(roll, 'BackgroundRoll', msg.sender, tokenId); } /** * @dev Allows a user to roll for a new background for their Fren token for free, subject to a daily cooldown period * @param tokenId the tokenId of the Fren for which to roll a new background * @notice The Fren token must not be glitched. */ function freeRollNewBackground(uint256 tokenId) public { if (super.ownerOf(tokenId) != msg.sender) revert NotTheOwner(); Fren storage fren = frens[tokenId]; if (fren.isGlitched) revert FrenisGlitched(); if (!minimumRequiredTimeHasPassed(freeRollLastUsedTime[tokenId])) revert DailyCooldownHasntExpired(); freeRollLastUsedTime[tokenId] = block.timestamp; uint256 playerLevel = getPlayerLevel(msg.sender); uint32 roll = uint32( weightedRoll( generateItems(9), generateUpdatedBackgroundWeights(playerLevel) ) ); fren.background = roll; emit FreeAttributeRoll(roll, 'BackgroundRoll', msg.sender, tokenId); } /** @dev Allows a user to roll for a new chest for their Fren token @param tokenId the tokenId of the Fren for which to roll a new chest @notice The user must have enough AVAX to pay for the roll and the Fren token must not be glitched. */ function rollNewChest(uint256 tokenId) public payable { if (super.ownerOf(tokenId) != msg.sender) revert NotTheOwner(); Fren storage fren = frens[tokenId]; if (fren.isGlitched) revert FrenisGlitched(); if (msg.value < chestRollCost) revert InsufficientAvax(); unchecked { playerExperience[msg.sender] += 1; } uint256 playerLevel = getPlayerLevel(msg.sender); uint32 roll = uint32( weightedRoll(generateItems(25), generateUpdatedChestWeights(playerLevel)) ); fren.chest = roll; emit PaidAttributeRoll(roll, 'ChestRoll', msg.sender, tokenId); } /** @dev Allows a user to roll for a new chest for their Fren token for free, subject to a daily cooldown period @param tokenId the tokenId of the Fren for which to roll a new chest @notice The Fren token must not be glitched. */ function freeRollNewChest(uint256 tokenId) public { if (super.ownerOf(tokenId) != msg.sender) revert NotTheOwner(); Fren storage fren = frens[tokenId]; if (fren.isGlitched) revert FrenisGlitched(); if (!minimumRequiredTimeHasPassed(freeRollLastUsedTime[tokenId])) revert DailyCooldownHasntExpired(); freeRollLastUsedTime[tokenId] = block.timestamp; uint256 playerLevel = getPlayerLevel(msg.sender); uint32 roll = uint32( weightedRoll(generateItems(25), generateUpdatedChestWeights(playerLevel)) ); fren.chest = roll; emit FreeAttributeRoll(roll, 'ChestRoll', msg.sender, tokenId); } /** @dev Allows a user to roll for a new nose for their Fren token @param tokenId the tokenId of the Fren for which to roll a new nose @notice The user must have enough AVAX to pay for the roll and the Fren token must not be glitched. */ function rollNewNose(uint256 tokenId) public payable { if (super.ownerOf(tokenId) != msg.sender) revert NotTheOwner(); Fren storage fren = frens[tokenId]; if (fren.isGlitched) revert FrenisGlitched(); if (msg.value < noseRollCost) revert InsufficientAvax(); unchecked { playerExperience[msg.sender] += 1; } uint256 playerLevel = getPlayerLevel(msg.sender); uint32 roll = uint32( weightedRoll(generateItems(9), generateUpdatedNoseWeights(playerLevel)) ); fren.nose = roll; emit PaidAttributeRoll(roll, 'NoseRoll', msg.sender, tokenId); } /** @dev Allows a user to roll for a new nose for their Fren token for free, subject to a daily cooldown period @param tokenId the tokenId of the Fren for which to roll a new nose @notice The Fren token must not be glitched. */ function freeRollNewNose(uint256 tokenId) public { if (super.ownerOf(tokenId) != msg.sender) revert NotTheOwner(); Fren storage fren = frens[tokenId]; if (fren.isGlitched) revert FrenisGlitched(); if (!minimumRequiredTimeHasPassed(freeRollLastUsedTime[tokenId])) revert DailyCooldownHasntExpired(); freeRollLastUsedTime[tokenId] = block.timestamp; uint256 playerLevel = getPlayerLevel(msg.sender); uint32 roll = uint32( weightedRoll(generateItems(9), generateUpdatedNoseWeights(playerLevel)) ); fren.nose = roll; emit FreeAttributeRoll(roll, 'NoseRoll', msg.sender, tokenId); } /** @dev Allows a user to roll for a new mouth for their Fren token @param tokenId the tokenId of the Fren for which to roll a new mouth @notice The user must have enough AVAX to pay for the roll and the Fren token must not be glitched. */ function rollNewMouth(uint256 tokenId) public payable { if (super.ownerOf(tokenId) != msg.sender) revert NotTheOwner(); Fren storage fren = frens[tokenId]; if (fren.isGlitched) revert FrenisGlitched(); if (msg.value < mouthRollCost) revert InsufficientAvax(); unchecked { playerExperience[msg.sender] += 1; } uint256 playerLevel = getPlayerLevel(msg.sender); uint32 roll = uint32( weightedRoll(generateItems(14), generateUpdatedMouthWeights(playerLevel)) ); fren.mouth = roll; emit PaidAttributeRoll(roll, 'MouthRoll', msg.sender, tokenId); } /** @dev Allows a user to roll for a new mouth for their Fren token for free, subject to a daily cooldown period @param tokenId the tokenId of the Fren for which to roll a new mouth @notice The Fren token must not be glitched. */ function freeRollNewMouth(uint256 tokenId) public { if (super.ownerOf(tokenId) != msg.sender) revert NotTheOwner(); Fren storage fren = frens[tokenId]; if (fren.isGlitched) revert FrenisGlitched(); if (!minimumRequiredTimeHasPassed(freeRollLastUsedTime[tokenId])) revert DailyCooldownHasntExpired(); freeRollLastUsedTime[tokenId] = block.timestamp; uint256 playerLevel = getPlayerLevel(msg.sender); uint32 roll = uint32( weightedRoll(generateItems(14), generateUpdatedMouthWeights(playerLevel)) ); fren.mouth = roll; emit FreeAttributeRoll(roll, 'MouthRoll', msg.sender, tokenId); } /** @dev Allows a user to roll for a new eye for their Fren token @param tokenId the tokenId of the Fren for which to roll a new eye @notice The user must have enough AVAX to pay for the roll and the Fren token must not be glitched. */ function rollNewEye(uint256 tokenId) public payable { if (super.ownerOf(tokenId) != msg.sender) revert NotTheOwner(); Fren storage fren = frens[tokenId]; if (fren.isGlitched) revert FrenisGlitched(); if (msg.value < eyeRollCost) revert InsufficientAvax(); unchecked { playerExperience[msg.sender] += 1; } uint256 playerLevel = getPlayerLevel(msg.sender); uint32 roll = uint32( weightedRoll(generateItems(20), generateUpdatedEyeWeights(playerLevel)) ); fren.eyes = roll; emit PaidAttributeRoll(roll, 'EyeRoll', msg.sender, tokenId); } /** @dev Allows a user to roll for a new eye for their Fren token for free, subject to a daily cooldown period @param tokenId the tokenId of the Fren for which to roll a new eye @notice The Fren token must not be glitched. */ function freeRollNewEye(uint256 tokenId) public { if (super.ownerOf(tokenId) != msg.sender) revert NotTheOwner(); Fren storage fren = frens[tokenId]; if (fren.isGlitched) revert FrenisGlitched(); if (!minimumRequiredTimeHasPassed(freeRollLastUsedTime[tokenId])) revert DailyCooldownHasntExpired(); freeRollLastUsedTime[tokenId] = block.timestamp; uint256 playerLevel = getPlayerLevel(msg.sender); uint32 roll = uint32( weightedRoll(generateItems(20), generateUpdatedEyeWeights(playerLevel)) ); fren.eyes = roll; emit FreeAttributeRoll(roll, 'EyeRoll', msg.sender, tokenId); } /** * @dev Allows a user to roll for a new hair for their Fren token * @param tokenId the tokenId of the Fren for which to roll a new hair * @notice The user must have enough AVAX to pay for the roll and the Fren token must not be glitched. */ function rollNewHair(uint256 tokenId) public payable { if (super.ownerOf(tokenId) != msg.sender) revert NotTheOwner(); Fren storage fren = frens[tokenId]; if (fren.isGlitched) revert FrenisGlitched(); if (msg.value < hairRollCost) revert InsufficientAvax(); unchecked { playerExperience[msg.sender] += 1; } uint256 playerLevel = getPlayerLevel(msg.sender); uint32 roll = uint32( weightedRoll(generateItems(34), generateUpdatedHairWeights(playerLevel)) ); fren.hair = roll; emit PaidAttributeRoll(roll, 'HairRoll', msg.sender, tokenId); } /** * @dev Allows a user to roll for a new hair for their Fren token for free, * subject to a daily cooldown period * @param tokenId the tokenId of the Fren for which to roll a new hair * @notice The Fren token must not be glitched. */ function freeRollNewHair(uint256 tokenId) public { if (super.ownerOf(tokenId) != msg.sender) revert NotTheOwner(); Fren storage fren = frens[tokenId]; if (fren.isGlitched) revert FrenisGlitched(); if (!minimumRequiredTimeHasPassed(freeRollLastUsedTime[tokenId])) revert DailyCooldownHasntExpired(); freeRollLastUsedTime[tokenId] = block.timestamp; uint256 playerLevel = getPlayerLevel(msg.sender); uint32 roll = uint32( weightedRoll(generateItems(34), generateUpdatedHairWeights(playerLevel)) ); fren.hair = roll; emit FreeAttributeRoll(roll, 'HairRoll', msg.sender, tokenId); } /** * @dev Allows a user to roll for a new accessory for their Fren token * @param tokenId the tokenId of the Fren for which to roll a new accessory * @notice The user must have enough AVAX to pay for the roll and the Fren token must not be glitched. */ function rollNewAccessory(uint256 tokenId) public payable { if (super.ownerOf(tokenId) != msg.sender) revert NotTheOwner(); Fren storage fren = frens[tokenId]; if (fren.isGlitched) revert FrenisGlitched(); if (msg.value < accessoryRollCost) revert InsufficientAvax(); unchecked { playerExperience[msg.sender] += 1; } uint256 playerLevel = getPlayerLevel(msg.sender); uint32 roll = uint32( weightedRoll( generateItems(15), generateUpdatedAccessoryWeights(playerLevel) ) ); fren.accessory = roll; emit PaidAttributeRoll(roll, 'AccessoryRoll', msg.sender, tokenId); } /* ========== RESTRICTED FUNCTIONS ========== */ function adminWithdraw() external onlyTeam { uint256 initialAmount = address(this).balance; uint256 adminCut = (initialAmount * 95) / 100; uint256 admin2Cut = (initialAmount * 5) / 100; (bool success, ) = admin.call{value: adminCut}(''); require(success, 'Failed to send admin cut'); (bool success2, ) = admin2.call{value: admin2Cut}(''); require(success2, 'Failed to send admin2 cut'); emit AdminWithdrawal(adminCut, admin2Cut); } function whiteListUsers( address[] calldata users ) external onlyRole(DEFAULT_ADMIN_ROLE) { for (uint256 i = 0; i < users.length; i++) { isWhiteListed[users[i]] = true; emit userWhitelisted(users[i]); } } function setMarketplaceContractAddress( address contractAddress ) external onlyRole(DEFAULT_ADMIN_ROLE) { marketplaceContractAddress = contractAddress; } /* ========== MODIFIER FUNCTIONS ========== */ modifier onlyTeam() { require(admin2 == msg.sender || admin == msg.sender); _; } /* ========== VIEWS ========== */ /** * @dev Generates an array of background weights used for the rollNewBackground function * @return uint256[] memory - An array of weights for the different backgrounds */ function generateBackgroundWeights() internal pure returns (uint256[] memory) { uint256[] memory weights = new uint256[](9); weights[0] = 19500; weights[1] = 19500; weights[2] = 19500; weights[3] = 19500; weights[4] = 4400; weights[5] = 4400; weights[6] = 4400; weights[7] = 4400; weights[8] = 4400; return weights; } /** * @dev Generates updated background weights based on the player's level. * @param playerLevel The level of the player for whom the background weights are being generated. * @return updatedBackgroundWeights An array of updated background weights considering the player's level. */ function generateUpdatedBackgroundWeights( uint256 playerLevel ) internal pure returns (uint256[] memory) { uint256[] memory backgroundWeights = generateBackgroundWeights(); uint256[] memory updatedBackgroundWeights = applyLevelBasedBonus( backgroundWeights, playerLevel ); return updatedBackgroundWeights; } /** * @dev Generates an array of chest weights used for the rollNewChest function * @return uint256[] memory - An array of weights for the different chests */ function generateChestWeights() internal pure returns (uint256[] memory) { uint256[] memory weights = new uint256[](25); weights[0] = 6900; weights[1] = 6900; weights[2] = 6900; weights[3] = 6900; weights[4] = 6900; weights[5] = 5800; weights[6] = 4800; weights[7] = 4800; weights[8] = 4800; weights[9] = 4800; weights[10] = 4800; weights[11] = 4800; weights[12] = 3800; weights[13] = 3800; weights[14] = 3800; weights[15] = 3800; weights[16] = 3800; weights[17] = 3800; weights[18] = 3800; weights[19] = 3800; weights[20] = 100; weights[21] = 100; weights[22] = 100; weights[23] = 100; weights[24] = 100; return weights; } /** * @dev Generates updated chest weights based on the player's level. * @param playerLevel The level of the player for whom the chest weights are being generated. * @return updatedChestWeights An array of updated chest weights considering the player's level. */ function generateUpdatedChestWeights( uint256 playerLevel ) internal pure returns (uint256[] memory) { uint256[] memory chestWeights = generateChestWeights(); uint256[] memory updatedChestWeights = applyLevelBasedBonus( chestWeights, playerLevel ); return updatedChestWeights; } /** * @dev Generates an array of nose weights used for the rollNewnose function * @return uint256[] memory - An array of weights for the different noses */ function generateNoseWeights() internal pure returns (uint256[] memory) { uint256[] memory weights = new uint256[](9); weights[0] = 11112; weights[1] = 11111; weights[2] = 11111; weights[3] = 11111; weights[4] = 11111; weights[5] = 11111; weights[6] = 11111; weights[7] = 11111; weights[8] = 11111; return weights; } /** * @dev Generates updated nose weights based on the player's level. * @param playerLevel The level of the player for whom the nose weights are being generated. * @return updatedNoseWeights An array of updated nose weights considering the player's level. */ function generateUpdatedNoseWeights( uint256 playerLevel ) internal pure returns (uint256[] memory) { uint256[] memory noseWeights = generateNoseWeights(); uint256[] memory updatedNoseWeights = applyLevelBasedBonus( noseWeights, playerLevel ); return updatedNoseWeights; } /** * @dev Generates an array of eye weights used for the rollNeweye function * @return uint256[] memory - An array of weights for the different eyes */ function generateEyeWeights() internal pure returns (uint256[] memory) { uint256[] memory weights = new uint256[](20); weights[0] = 7100; weights[1] = 7100; weights[2] = 7100; weights[3] = 7100; weights[4] = 7100; weights[5] = 7100; weights[6] = 5900; weights[7] = 5900; weights[8] = 5900; weights[9] = 4300; weights[10] = 4300; weights[11] = 4300; weights[12] = 4300; weights[13] = 4300; weights[14] = 3500; weights[15] = 3500; weights[16] = 3500; weights[17] = 3500; weights[18] = 2100; weights[19] = 2100; return weights; } /** * @dev Generates updated eye weights based on the player's level. * @param playerLevel The level of the player for whom the eye weights are being generated. * @return updatedEyeWeights An array of updated eye weights considering the player's level. */ function generateUpdatedEyeWeights( uint256 playerLevel ) internal pure returns (uint256[] memory) { uint256[] memory eyeWeights = generateEyeWeights(); uint256[] memory updatedEyeWeights = applyLevelBasedBonus( eyeWeights, playerLevel ); return updatedEyeWeights; } /** * @dev Generates an array of mouth weights used for the rollNewMouth function * @return uint256[] memory - An array of weights for the different mouths */ function generateMouthWeights() internal pure returns (uint256[] memory) { uint256[] memory weights = new uint256[](14); weights[0] = 9300; weights[1] = 9300; weights[2] = 9300; weights[3] = 9300; weights[4] = 9300; weights[5] = 9300; weights[6] = 9200; weights[7] = 9200; weights[8] = 9200; weights[9] = 5900; weights[10] = 5900; weights[11] = 1600; weights[12] = 1600; weights[13] = 1600; return weights; } /** * @dev Generates updated mouth weights based on the player's level. * @param playerLevel The level of the player for whom the mouth weights are being generated. * @return updatedMouthWeights An array of updated mouth weights considering the player's level. */ function generateUpdatedMouthWeights( uint256 playerLevel ) internal pure returns (uint256[] memory) { uint256[] memory mouthWeights = generateMouthWeights(); uint256[] memory updatedMouthWeights = applyLevelBasedBonus( mouthWeights, playerLevel ); return updatedMouthWeights; } /** * @dev Generates an array of hair weights used for the rollNewHair function * @return uint256[] memory - An array of weights for the different hairs */ function generateHairWeights() internal pure returns (uint256[] memory) { uint256[] memory weights = new uint256[](34); weights[0] = 6580; weights[1] = 6580; weights[2] = 6580; weights[3] = 6580; weights[4] = 6580; weights[5] = 6580; weights[6] = 6580; weights[7] = 5590; weights[8] = 3200; weights[9] = 3200; weights[10] = 3200; weights[11] = 3200; weights[12] = 3200; weights[13] = 3200; weights[14] = 3200; weights[15] = 2700; weights[16] = 2700; weights[17] = 2700; weights[18] = 2700; weights[19] = 2700; weights[20] = 2700; weights[21] = 2700; weights[22] = 2100; weights[23] = 2100; weights[24] = 2100; weights[25] = 100; weights[26] = 100; weights[27] = 100; weights[28] = 100; weights[29] = 100; weights[30] = 100; weights[31] = 50; weights[32] = 50; weights[33] = 50; return weights; } /** * @dev Generates updated hair weights based on the player's level. * @param playerLevel The level of the player for whom the hair weights are being generated. * @return updatedHairWeights An array of updated hair weights considering the player's level. */ function generateUpdatedHairWeights( uint256 playerLevel ) internal pure returns (uint256[] memory) { uint256[] memory hairWeights = generateHairWeights(); uint256[] memory updatedHairWeights = applyLevelBasedBonus( hairWeights, playerLevel ); return updatedHairWeights; } /** * @dev Generates an array of accessory weights used for the rollNewAccessory function * @return uint256[] memory - An array of weights for the different accessorys */ function generateAccessoryWeights() internal pure returns (uint256[] memory) { uint256[] memory weights = new uint256[](15); weights[0] = 68915; weights[1] = 4548; weights[2] = 4548; weights[3] = 4548; weights[4] = 4548; weights[5] = 3203; weights[6] = 3100; weights[7] = 3100; weights[8] = 3100; weights[9] = 100; weights[10] = 100; weights[11] = 100; weights[12] = 30; weights[13] = 30; weights[14] = 30; return weights; } /** * @dev Generates updated accessory weights based on the player's level. * @param playerLevel The level of the player for whom the accessory weights are being generated. * @return updatedAccessoryWeights An array of updated accessory weights considering the player's level. */ function generateUpdatedAccessoryWeights( uint256 playerLevel ) internal pure returns (uint256[] memory) { uint256[] memory accessoryWeights = generateAccessoryWeights(); uint256[] memory updatedAccessoryWeights = applyLevelBasedBonus( accessoryWeights, playerLevel ); return updatedAccessoryWeights; } /** * @dev Applies a level-based bonus to the item weights, increasing the likelihood of obtaining rarer items. * @param weights The initial item weights, as an array of uint256 values. * @param playerLevel The player's level, used to calculate the bonus to apply. * @return updatedWeights The updated item weights after applying the level-based bonus. */ function applyLevelBasedBonus( uint256[] memory weights, uint256 playerLevel ) internal pure returns (uint256[] memory) { uint256 rareItemsStartIndex = weights.length - 4; uint256 totalBoost = 0; uint256 maxBoostPercentage = 13; for (uint256 i = rareItemsStartIndex; i < weights.length; i++) { uint256 bonus = ((playerLevel * playerLevel * maxBoostPercentage) / (60 * 60)) * 100; uint256 newItemWeight = weights[i] + bonus; totalBoost += newItemWeight - weights[i]; weights[i] = newItemWeight; } uint256 totalReduction = totalBoost / 4; for (uint256 i = 0; i < 4; i++) { weights[i] -= totalReduction; } return weights; } /** * @dev generateItems function generates an array of items of a given count * @param count uint256 - The number of items to generate * @return items uint256[] - An array of generated items */ function generateItems( uint256 count ) internal pure returns (uint256[] memory) { uint256[] memory items = new uint256[](count); for (uint256 i = 0; i < count; i++) { items[i] = i; } return items; } /** * @dev random function generates a random number * @return num uint256 - A random number */ function random() internal view returns (uint256) { uint256 num = uint256( keccak256( abi.encodePacked( lastEntropy, block.difficulty, block.timestamp, address(this).balance, tx.gasprice, msg.sender ) ) ); if ( num > 99999999999999999999999999999999999999999999999999999999999999999999999999999 ) { return num / 10 ** 73; } return num / 10 ** 72; } /** * Check if a glitch occurred. 10% chance of glitching. * * @dev The function returns true if the result of the keccak256 hash of the input parameters, * converted to a uint256 value, is less than the threshold of 0.03 * 10^18. The input parameters * are: lastEntropy, block.difficulty, block.timestamp, and address(this).balance. * * @return A boolean value indicating whether a glitch occurred. */ function didGlitch() public view returns (bool) { uint256 hash = uint256( keccak256( abi.encodePacked( lastEntropy, block.difficulty, block.timestamp, address(this).balance ) ) ); uint256 last5Digits = hash % 100000; return last5Digits < 10000; } /** * @dev weightedRoll function generates a random item index based on the given items and weights * @param items uint256[] - An array of items to choose from * @param weights uint256[] - An array of weights for each item * @return itemIndex uint256 - A randomly selected item index */ function weightedRoll( uint256[] memory items, uint256[] memory weights ) internal returns (uint256 itemIndex) { uint256 sumOfWeights = 0; uint256 rand = random(); lastEntropy = block.timestamp; for (uint256 i = 0; i < items.length; i++) { sumOfWeights += weights[i]; if (sumOfWeights > rand) { return i; } } } /** * @dev getFrenStruct returns a struct with the given tokenId's Fren data * @param tokenId uint256 - The tokenId of the Fren to retrieve * @return (bool, uint32, uint32, uint32, uint32, uint32, uint32, uint32, bytes32, string memory) - A struct with the Fren's data */ function getFrenStruct( uint256 tokenId ) external view returns (bool, uint32, uint32, uint32, uint32, uint32, uint32, uint32) { Fren memory x = frens[tokenId]; return ( x.isGlitched, x.background, x.chest, x.nose, x.eyes, x.hair, x.accessory, x.mouth ); } /** * @dev getPlayerLevel returns the player's level based on their experience * @param user address - The address of the player to retrieve the level for * @return level uint256 - The player's level */ function getPlayerLevel(address user) public view returns (uint256) { return calculateLevel(playerExperience[user]); } /** * @dev getPlayerExperience returns the player's experience * @param user address - The address of the player to retrieve the experience for * @return experience uint256 - The player's experience */ function getPlayerExperience(address user) external view returns (uint256) { return (playerExperience[user]); } /** * @dev getNumberOfMintsByUser returns the number of Frens minted by a user * @param user address - The address of the user to retrieve the number of mints for * @return numberOfMints uint256 - The number of Frens minted by the user */ function getNumberOfMintsByUser( address user ) external view returns (uint256) { return (frensMinted[user]); } /** * @dev _baseURI returns the base URI for the contract * @return baseURI string - The base URI for the contract */ function _baseURI() internal view virtual override returns (string memory) { return 'https://weirdfrens.com/api/token/'; } /** * @dev get the remaining time before user can roll for free again. * @param tokenId the tokenId of the Fren * @return time uint256 the remaining time in seconds */ function getFreeRollRemainingCooldown( uint256 tokenId ) external view returns (uint256 time) { return freeRollLastUsedTime[tokenId]; } /** @dev checks if the minimum amount of time before user can roll for free again. * @param timestamp The time to check against * @return bool */ function minimumRequiredTimeHasPassed( uint256 timestamp ) private view returns (bool) { return (block.timestamp >= timestamp + minimumTimeBeforeNextFreeRoll); } /** * @dev See {IERC165-supportsInterface}. * @param interfaceId the interface ID to check * @return bool true if the contract supports the given interface, false otherwise */ function supportsInterface( bytes4 interfaceId ) public view override(AccessControl, ERC721) returns (bool) { return super.supportsInterface(interfaceId); } /** * @dev check if the user is whitelisted * @param user the user to check * @return bool true if the user is whitelisted, false otherwise */ function isUserWhitelisted(address user) external view returns (bool) { return isWhiteListed[user]; } /** * @dev calculate the level of a user based on their experience points * @param experiencePoints the user's experience points * @return level uint256 the user's level */ function calculateLevel( uint256 experiencePoints ) internal pure returns (uint256 level) { // 5346 (level 99) // 2070 (level 60) if (experiencePoints > 2070) { return 60; } experiencePoints = ((experiencePoints + 10) * 8) + 1; experiencePoints = (sqrt(experiencePoints) + 1); level = ((experiencePoints * 50) / 100) - 5; } /** * @dev calculate the square root of a number * @param y the number to calculate the square root of * @return z uint256 the square root of the number */ function sqrt(uint256 y) internal pure returns (uint256 z) { if (y > 3) { z = y; uint256 x = y / 2 + 1; while (x < z) { z = x; x = (y / x + x) / 2; } } else if (y != 0) { z = 1; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `_msgSender()` is missing `role`. * Overriding this function changes the behavior of the {onlyRole} modifier. * * Format of the revert message is described in {_checkRole}. * * _Available since v4.6._ */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(account), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * May emit a {RoleGranted} event. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.2) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import '@openzeppelin/contracts/token/ERC721/IERC721.sol'; import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol'; import '@openzeppelin/contracts/utils/Address.sol'; import '@openzeppelin/contracts/utils/Context.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import '@openzeppelin/contracts/utils/introspection/ERC165.sol'; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface( bytes4 interfaceId ) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf( address owner ) public view virtual override returns (uint256) { require(owner != address(0), 'ERC721: address zero is not a valid owner'); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf( uint256 tokenId ) public view virtual override returns (address) { address owner = _ownerOf(tokenId); require(owner != address(0), 'ERC721: invalid token ID'); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI( uint256 tokenId ) public view virtual override returns (string memory) { _requireMinted(tokenId); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ''; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, 'ERC721: approval to current owner'); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), 'ERC721: approve caller is not token owner or approved for all' ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved( uint256 tokenId ) public view virtual override returns (address) { _requireMinted(tokenId); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll( address operator, bool approved ) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll( address owner, address operator ) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require( _isApprovedOrOwner(_msgSender(), tokenId), 'ERC721: caller is not token owner or approved' ); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public virtual override { require( _isApprovedOrOwner(_msgSender(), tokenId), 'ERC721: caller is not token owner or approved' ); _safeTransfer(from, to, tokenId, data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory data ) internal virtual { _transfer(from, to, tokenId); require( _checkOnERC721Received(from, to, tokenId, data), 'ERC721: transfer to non ERC721Receiver implementer' ); } /** * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist */ function _ownerOf(uint256 tokenId) internal view virtual returns (address) { return _owners[tokenId]; } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _ownerOf(tokenId) != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner( address spender, uint256 tokenId ) internal view virtual returns (bool) { address owner = ERC721.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ''); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, data), 'ERC721: transfer to non ERC721Receiver implementer' ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), 'ERC721: mint to the zero address'); require(!_exists(tokenId), 'ERC721: token already minted'); _beforeTokenTransfer(address(0), to, tokenId, 1); // Check that tokenId was not minted by `_beforeTokenTransfer` hook require(!_exists(tokenId), 'ERC721: token already minted'); unchecked { // Will not overflow unless all 2**256 token ids are minted to the same owner. // Given that tokens are minted one by one, it is impossible in practice that // this ever happens. Might change if we allow batch minting. // The ERC fails to describe this case. _balances[to] += 1; } _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId, 1); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * This is an internal function that does not check if the sender is authorized to operate on the token. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId, 1); // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook owner = ERC721.ownerOf(tokenId); // Clear approvals delete _tokenApprovals[tokenId]; unchecked { // Cannot overflow, as that would require more tokens to be burned/transferred // out than the owner initially received through minting and transferring in. _balances[owner] -= 1; } delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId, 1); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require( ERC721.ownerOf(tokenId) == from, 'ERC721: transfer from incorrect owner' ); require(to != address(0), 'ERC721: transfer to the zero address'); _beforeTokenTransfer(from, to, tokenId, 1); // Check that tokenId was not transferred by `_beforeTokenTransfer` hook require( ERC721.ownerOf(tokenId) == from, 'ERC721: transfer from incorrect owner' ); // Clear approvals from the previous owner delete _tokenApprovals[tokenId]; unchecked { // `_balances[from]` cannot overflow for the same reason as described in `_burn`: // `from`'s balance is the number of token held, which is at least one before the current // transfer. // `_balances[to]` could overflow in the conditions described in `_mint`. That would require // all 2**256 token ids to be minted, which in practice is impossible. _balances[from] -= 1; _balances[to] += 1; } _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId, 1); } /** * @dev Approve `to` to operate on `tokenId` * * Emits an {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, 'ERC721: approve to caller'); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Reverts if the `tokenId` has not been minted yet. */ function _requireMinted(uint256 tokenId) internal view virtual { require(_exists(tokenId), 'ERC721: invalid token ID'); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert('ERC721: transfer to non ERC721Receiver implementer'); } else { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`. * - When `from` is zero, the tokens will be minted for `to`. * - When `to` is zero, ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * - `batchSize` is non-zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 firstTokenId, uint256 batchSize ) internal virtual {} /** * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`. * - When `from` is zero, the tokens were minted for `to`. * - When `to` is zero, ``from``'s tokens were burned. * - `from` and `to` are never both zero. * - `batchSize` is non-zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 firstTokenId, uint256 batchSize ) internal virtual {} /** * @dev Unsafe write access to the balances, used by extensions that "mint" tokens using an {ownerOf} override. * * WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant * being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such * that `ownerOf(tokenId)` is `a`. */ // solhint-disable-next-line func-name-mixedcase function __unsafe_increaseBalance(address account, uint256 amount) internal { _balances[account] += amount; } function __unsafe_decreaseBalance(address account, uint256 amount) internal { _balances[account] -= amount; } function _setOwner(uint256 tokenId, address from, address to) internal { require(to != address(0), 'CustomERC721: Invalid address'); require(_exists(tokenId), 'CustomERC721: Token ID does not exist'); require( _isApprovedOrOwner(from, tokenId), 'CustomERC721: caller is not token owner or approved' ); _owners[tokenId] = to; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address payable","name":"adminAddress","type":"address"},{"internalType":"address payable","name":"admin2Address","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"DailyCooldownHasntExpired","type":"error"},{"inputs":[],"name":"FrenisGlitched","type":"error"},{"inputs":[],"name":"InsufficientAvax","type":"error"},{"inputs":[],"name":"NoMoreFrensLeftToMint","type":"error"},{"inputs":[],"name":"NotTheOwner","type":"error"},{"inputs":[],"name":"UserReachedMintCap","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"transfer1","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"transfer2","type":"uint256"}],"name":"AdminWithdrawal","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":"roll","type":"uint256"},{"indexed":true,"internalType":"string","name":"AttributeType","type":"string"},{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"FreeAttributeRoll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bool","name":"isGlitched","type":"bool"},{"indexed":false,"internalType":"uint256","name":"background","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"chest","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"nose","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"eyes","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"hair","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"accessory","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"mouth","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"GlitchRoll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"roll","type":"uint256"},{"indexed":true,"internalType":"string","name":"AttributeType","type":"string"},{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"PaidAttributeRoll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":true,"internalType":"address","name":"sponsor","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"SponsoredMint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"}],"name":"userWhitelisted","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"accessoryRollCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"admin2","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"adminWithdraw","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":[],"name":"backgroundRollCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"times","type":"uint256"}],"name":"batchMint","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"bodyRollCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"chestRollCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"didGlitch","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dustAmountToGift","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"eyeRollCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"freeRollLastUsedTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"freeRollNewBackground","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"freeRollNewChest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"freeRollNewEye","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"freeRollNewHair","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"freeRollNewMouth","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"freeRollNewNose","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"frens","outputs":[{"internalType":"bool","name":"isGlitched","type":"bool"},{"internalType":"uint32","name":"background","type":"uint32"},{"internalType":"uint32","name":"chest","type":"uint32"},{"internalType":"uint32","name":"nose","type":"uint32"},{"internalType":"uint32","name":"eyes","type":"uint32"},{"internalType":"uint32","name":"hair","type":"uint32"},{"internalType":"uint32","name":"accessory","type":"uint32"},{"internalType":"uint32","name":"mouth","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"frensMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getFreeRollRemainingCooldown","outputs":[{"internalType":"uint256","name":"time","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getFrenStruct","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"uint32","name":"","type":"uint32"},{"internalType":"uint32","name":"","type":"uint32"},{"internalType":"uint32","name":"","type":"uint32"},{"internalType":"uint32","name":"","type":"uint32"},{"internalType":"uint32","name":"","type":"uint32"},{"internalType":"uint32","name":"","type":"uint32"},{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getNumberOfMintsByUser","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getPlayerExperience","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getPlayerLevel","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"glitchRoll","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"glitchRollCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"hairRollCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"isUserWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isWhiteListed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastEntropy","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"marketplaceContractAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minimumTimeBeforeNextFreeRoll","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintItem","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mouthRollCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"noseRollCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"playerExperience","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"rollNewAccessory","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"rollNewBackground","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"rollNewChest","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"rollNewEye","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"rollNewHair","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"rollNewMouth","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"rollNewNose","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"}],"name":"setMarketplaceContractAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"sponsorCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"sponsoredMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"users","type":"address[]"}],"name":"whiteListUsers","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060405162005c5a38038062005c5a833981016040819052620000349162000209565b6040518060400160405280600a81526020016957656972644672656e7360b01b81525060405180604001604052806004815260200163232922a760e11b8152508160009081620000859190620002e6565b506001620000948282620002e6565b50620000a69150600090508362000138565b600f80546001600160a01b039384166001600160a01b0319918216179091556010805492909316911617905567016345785d8a0000601281905560148190556015819055601655670429d069189e000060178190556018556706f05b59d3b20000601955661ff973cafa8000601a5567136dcc951d8c0000601b5561271060085562015180600e5542601c55620003b2565b62000144828262000148565b5050565b60008281526006602090815260408083206001600160a01b038516845290915290205460ff16620001445760008281526006602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620001a83390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b80516001600160a01b03811681146200020457600080fd5b919050565b600080604083850312156200021d57600080fd5b6200022883620001ec565b91506200023860208401620001ec565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200026c57607f821691505b6020821081036200028d57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620002e157600081815260208120601f850160051c81016020861015620002bc5750805b601f850160051c820191505b81811015620002dd57828155600101620002c8565b5050505b505050565b81516001600160401b0381111562000302576200030262000241565b6200031a8162000313845462000257565b8462000293565b602080601f831160018114620003525760008415620003395750858301515b600019600386901b1c1916600185901b178555620002dd565b600085815260208120601f198616915b82811015620003835788860151825594840194600190910190840162000362565b5085821015620003a25787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61589880620003c26000396000f3fe6080604052600436106103ee5760003560e01c80635cb68cb711610208578063b24767b711610118578063e985e9c5116100ab578063f851a4401161007a578063f851a44014610be7578063f94864f114610c07578063fada67a314610c1d578063fb237eb214610c33578063fcfd236714610c6c57600080fd5b8063e985e9c514610b5e578063eb93406b14610ba7578063f18d20be14610bbc578063f3c943dd14610bd157600080fd5b8063c1753257116100e7578063c175325714610adb578063c87b56dd14610b08578063d547741f14610b28578063e6fc0a6d14610b4857600080fd5b8063b24767b714610a65578063b52d6fd114610a85578063b88d4fde14610aa5578063c122c6db14610ac557600080fd5b806384db9c9c1161019b57806395d89b411161016a57806395d89b41146109d2578063a217fddf146109e7578063a22cb465146109fc578063a7647fd614610a1c578063aedf503a14610a5257600080fd5b806384db9c9c146109695780638962c9681461097c57806391d148541461099c578063924c8bd1146109bc57600080fd5b806370a08231116101d757806370a08231146108f3578063765152ee146109135780637e8072e1146109295780638467be0d1461093c57600080fd5b80635cb68cb7146108635780636352211e146108835780636f9170f6146108a35780636ffc8b8a146108d357600080fd5b80632b8cc5401161030357806342842e0e116102965780634ad32030116102655780634ad32030146107be5780634f34044d146107de57806355377a0e146107f457806355cb574e146108215780635bbccbd11461084e57600080fd5b806342842e0e1461056c5780634450ca8514610768578063475fda0e146107885780634abe666f146107a857600080fd5b8063391e2ee2116102d2578063391e2ee2146106f55780633c029dc1146107155780633fbe42371461072857806340e4f3681461075557600080fd5b80632b8cc540146106285780632f2ff15d1461069557806334b735a1146106b557806336568abe146106d557600080fd5b8063180cd3dc1161038657806323d7fa7b1161035557806323d7fa7b1461058c578063248a9ca3146105a257806326c84e58146105d2578063285de177146105e557806329f7de5c1461061257600080fd5b8063180cd3dc1461050e57806318160ddd1461052157806319522d9f1461053657806323b872dd1461056c57600080fd5b806306fdde03116103c257806306fdde0314610499578063081812fc146104bb578063095ea7b3146104db578063151cc395146104fb57600080fd5b806255b295146103f357806301ffc9a714610408578063026b2dce1461043d57806306a8f8a214610461575b600080fd5b610406610401366004615215565b610c8c565b005b34801561041457600080fd5b50610428610423366004615244565b610de8565b60405190151581526020015b60405180910390f35b34801561044957600080fd5b5061045360195481565b604051908152602001610434565b34801561046d57600080fd5b50601054610481906001600160a01b031681565b6040516001600160a01b039091168152602001610434565b3480156104a557600080fd5b506104ae610df9565b60405161043491906152b1565b3480156104c757600080fd5b506104816104d6366004615215565b610e8b565b3480156104e757600080fd5b506104066104f63660046152db565b610eb2565b610406610509366004615215565b610fb7565b61040661051c366004615215565b6110ca565b34801561052d57600080fd5b506104536111d8565b34801561054257600080fd5b50610453610551366004615305565b6001600160a01b031660009081526009602052604090205490565b34801561057857600080fd5b50610406610587366004615320565b6111e8565b34801561059857600080fd5b5061045360125481565b3480156105ae57600080fd5b506104536105bd366004615215565b60009081526006602052604090206001015490565b6104066105e0366004615215565b61126f565b3480156105f157600080fd5b50610453610600366004615215565b6000908152600d602052604090205490565b34801561061e57600080fd5b50610453601b5481565b34801561063457600080fd5b50610648610643366004615215565b61137d565b60408051981515895263ffffffff97881660208a01529587169588019590955292851660608701529084166080860152831660a0850152821660c08401521660e082015261010001610434565b3480156106a157600080fd5b506104066106b036600461535c565b611456565b3480156106c157600080fd5b506104536106d0366004615305565b61147b565b3480156106e157600080fd5b506104066106f036600461535c565b61149d565b34801561070157600080fd5b50601154610481906001600160a01b031681565b610406610723366004615215565b611517565b34801561073457600080fd5b50610453610743366004615305565b600a6020526000908152604090205481565b610453610763366004615305565b611817565b34801561077457600080fd5b50610406610783366004615215565b611bf5565b34801561079457600080fd5b506104066107a3366004615388565b611d41565b3480156107b457600080fd5b5061045360165481565b3480156107ca57600080fd5b506104066107d9366004615305565b611e20565b3480156107ea57600080fd5b50610453601a5481565b34801561080057600080fd5b5061045361080f366004615305565b60096020526000908152604090205481565b34801561082d57600080fd5b5061045361083c366004615305565b600b6020526000908152604090205481565b34801561085a57600080fd5b50610428611e4e565b34801561086f57600080fd5b5061040661087e366004615215565b611eaa565b34801561088f57600080fd5b5061048161089e366004615215565b611fbb565b3480156108af57600080fd5b506104286108be366004615305565b600c6020526000908152604090205460ff1681565b3480156108df57600080fd5b506104066108ee366004615215565b61201b565b3480156108ff57600080fd5b5061045361090e366004615305565b612137565b34801561091f57600080fd5b5061045360135481565b610406610937366004615215565b6121bd565b34801561094857600080fd5b5061095c610957366004615215565b6122cc565b60405161043491906153fd565b610406610977366004615215565b61235e565b34801561098857600080fd5b50610406610997366004615215565b612465565b3480156109a857600080fd5b506104286109b736600461535c565b612582565b3480156109c857600080fd5b50610453601c5481565b3480156109de57600080fd5b506104ae6125ad565b3480156109f357600080fd5b50610453600081565b348015610a0857600080fd5b50610406610a17366004615441565b6125bc565b348015610a2857600080fd5b50610453610a37366004615305565b6001600160a01b03166000908152600b602052604090205490565b610406610a60366004615215565b6125c7565b348015610a7157600080fd5b50610648610a80366004615215565b6126cf565b348015610a9157600080fd5b50610406610aa0366004615215565b61273c565b348015610ab157600080fd5b50610406610ac0366004615493565b61284e565b348015610ad157600080fd5b5061045360145481565b348015610ae757600080fd5b50610453610af6366004615215565b600d6020526000908152604090205481565b348015610b1457600080fd5b506104ae610b23366004615215565b612880565b348015610b3457600080fd5b50610406610b4336600461535c565b61288b565b348015610b5457600080fd5b5061045360155481565b348015610b6a57600080fd5b50610428610b7936600461556f565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b348015610bb357600080fd5b506104536128b0565b348015610bc857600080fd5b50610406612b9f565b348015610bdd57600080fd5b50610453600e5481565b348015610bf357600080fd5b50600f54610481906001600160a01b031681565b348015610c1357600080fd5b5061045360185481565b348015610c2957600080fd5b5061045360175481565b348015610c3f57600080fd5b50610428610c4e366004615305565b6001600160a01b03166000908152600c602052604090205460ff1690565b348015610c7857600080fd5b50610406610c87366004615215565b612d8b565b33610c9682611fbb565b6001600160a01b031614610cbd576040516336b6b89560e01b815260040160405180910390fd5b6000601d8281548110610cd257610cd2615599565b6000918252602090912001805490915060ff1615610d0357604051635279c13160e01b815260040160405180910390fd5b601654341015610d265760405163700cff1f60e11b815260040160405180910390fd5b3360008181526009602052604081208054600101905590610d469061147b565b90506000610d65610d576014612e9c565b610d6084612f20565b612f42565b835463ffffffff60681b1916600160681b63ffffffff83160217845560405166115e59549bdb1b60ca1b815290915033906007015b60405180910390208263ffffffff167fbe131abeeb694b6df509f75940d836c9764f527e83dd1c6c6d0bb926d92c5c1d87604051610dda91815260200190565b60405180910390a450505050565b6000610df382612fb4565b92915050565b606060008054610e08906155af565b80601f0160208091040260200160405190810160405280929190818152602001828054610e34906155af565b8015610e815780601f10610e5657610100808354040283529160200191610e81565b820191906000526020600020905b815481529060010190602001808311610e6457829003601f168201915b5050505050905090565b6000610e9682612fd9565b506000908152600460205260409020546001600160a01b031690565b610ebb81611fbb565b6001600160a01b0316336001600160a01b03161480610f0c5750610ede81611fbb565b6001600160a01b0316336001600160a01b031614158015610f0c57506011546001600160a01b038381169116145b610fa95760405162461bcd60e51b815260206004820152605760248201527f57656972644672656e734e46543a2063616c6c6572206d75737420626520656960448201527f7468657220746865206f776e6572206f7220617070726f76696e6720746f207460648201527f6865206d61726b6574706c61636520636f6e7472616374000000000000000000608482015260a4015b60405180910390fd5b610fb3828261303b565b5050565b33610fc182611fbb565b6001600160a01b031614610fe8576040516336b6b89560e01b815260040160405180910390fd5b6000601d8281548110610ffd57610ffd615599565b6000918252602090912001805490915060ff161561102e57604051635279c13160e01b815260040160405180910390fd5b6019543410156110515760405163700cff1f60e11b815260040160405180910390fd5b33600081815260096020526040812080546001019055906110719061147b565b9050600061108b611082600f612e9c565b610d60846130a9565b835463ffffffff60a81b1916600160a81b63ffffffff8316021784556040516c1058d8d95cdcdbdc9e549bdb1b609a1b81529091503390600d01610d9a565b336110d482611fbb565b6001600160a01b0316146110fb576040516336b6b89560e01b815260040160405180910390fd5b6000601d828154811061111057611110615599565b6000918252602090912001805490915060ff161561114157604051635279c13160e01b815260040160405180910390fd5b6018543410156111645760405163700cff1f60e11b815260040160405180910390fd5b33600081815260096020526040812080546001019055906111849061147b565b9050600061119e6111956022612e9c565b610d60846130b5565b835463ffffffff60881b1916600160881b63ffffffff8316021784556040516712185a5c949bdb1b60c21b81529091503390600801610d9a565b60006111e360075490565b905090565b6011546111fe906001600160a01b0316826130c1565b61121a5760405162461bcd60e51b8152600401610fa0906155e3565b600061122582610e8b565b6001600160a01b03160361124957601154611249906001600160a01b031682610eb2565b61125483838361313f565b60115461126a906001600160a01b031682610eb2565b505050565b3361127982611fbb565b6001600160a01b0316146112a0576040516336b6b89560e01b815260040160405180910390fd5b6000601d82815481106112b5576112b5615599565b6000918252602090912001805490915060ff16156112e657604051635279c13160e01b815260040160405180910390fd5b6014543410156113095760405163700cff1f60e11b815260040160405180910390fd5b33600081815260096020526040812080546001019055906113299061147b565b9050600061134361133a6009612e9c565b610d60846132ac565b835463ffffffff60481b1916600160481b63ffffffff83160217845560405167139bdcd9549bdb1b60c21b81529091503390600801610d9a565b6000806000806000806000806000601d8a8154811061139e5761139e615599565b6000918252602091829020604080516101008082018352929093015460ff8116151580855263ffffffff9382048416958501869052600160281b82048416928501839052600160481b8204841660608601819052600160681b8304851660808701819052600160881b8404861660a08801819052600160a81b8504871660c08901819052600160c81b90950490961660e0909701879052919f50959d50919b5093995097509550909350915050919395975091939597565b600082815260066020526040902060010154611471816132b8565b61126a83836132c2565b6001600160a01b038116600090815260096020526040812054610df390613348565b6001600160a01b038116331461150d5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610fa0565b610fb382826133b8565b3361152182611fbb565b6001600160a01b031614611548576040516336b6b89560e01b815260040160405180910390fd5b6000601d828154811061155d5761155d615599565b6000918252602090912001805490915060ff161561158e57604051635279c13160e01b815260040160405180910390fd5b601b543410156115b15760405163700cff1f60e11b815260040160405180910390fd5b3360009081526009602052604081208054600692906115d1908490615646565b90915550600090506115e23361147b565b90506115fa6115f16009612e9c565b610d608361341f565b825463ffffffff919091166101000264ffffffff001990911617825561162c6116236019612e9c565b610d608361342b565b825463ffffffff91909116600160281b0268ffffffff00000000001990911617825561166461165b6009612e9c565b610d60836132ac565b825463ffffffff91909116600160481b0263ffffffff60481b1990911617825561169a6116916014612e9c565b610d6083612f20565b825463ffffffff91909116600160681b0263ffffffff60681b199091161782556116d06116c76022612e9c565b610d60836130b5565b825463ffffffff91909116600160881b0263ffffffff60881b199091161782556117066116fd600f612e9c565b610d60836130a9565b825463ffffffff91909116600160a81b0263ffffffff60a81b1990911617825561173c611733600e612e9c565b610d6083613437565b825463ffffffff91909116600160c81b0263ffffffff60c81b19909116178255611764611e4e565b825460ff191690151590811780845560408051610100830463ffffffff9081168252600160281b840481166020830152600160481b8404811692820192909252600160681b830482166060820152600160881b830482166080820152600160a81b8304821660a0820152600160c81b9092041660c0820152849160ff161515907f1211258d4c771b371d269a019fabd802479cf996184fbace4b7db22b49dcc38f9060e0015b60405180910390a3505050565b6000601a5434101561183c5760405163700cff1f60e11b815260040160405180910390fd5b600080836001600160a01b0316601a5460405160006040518083038185875af1925050503d806000811461188c576040519150601f19603f3d011682016040523d82523d6000602084013e611891565b606091505b5091509150816118d95760405162461bcd60e51b815260206004820152601360248201527208cc2d2d8cac840e8de40e6cadcc84082ac82b606b1b6044820152606401610fa0565b60006118e460075490565b9050600854811061190857604051632f427b7b60e11b815260040160405180910390fd5b6001600160a01b0385166000908152600c602052604090205460ff1615611967576001600160a01b0385166000908152600b602052604090205460281161196257604051637eb12f4760e11b815260040160405180910390fd5b6119a0565b6001600160a01b0385166000908152600b60205260409020546014116119a057604051637eb12f4760e11b815260040160405180910390fd5b6119aa8582613443565b6001600160a01b0385166000908152600b602052604081208054600192906119d3908490615646565b909155505060078054600101905560006119ec82610e8b565b6001600160a01b031603611a1057601154611a10906001600160a01b031682610eb2565b336000908152600a6020908152604080832080546001908101909155600990925290912080549091019055611a486201518042615659565b6000828152600d6020908152604091829020929092555182815233916001600160a01b038816917f4321221debddb8108d611e58c8f05c6469ebbee15fe5c7e7685acecc504a3a03910160405180910390a360408051610100808201835260008083526002602084019081529383018181526004606085019081526080850183815260a0860184815260c0870185815260e08801868152601d8054600181018255975297517f6d4407e7be21f808e6509aa9fa9143369579dd7d760fe20a2c09680fc146134f9096018054995195519451935192519151985164ffffffffff19909a1696151564ffffffff0019169690961763ffffffff958616909702969096176cffffffffffffffff00000000001916600160281b9385169390930263ffffffff60481b191692909217600160481b918416919091021767ffffffffffffffff60681b1916600160681b9183169190910263ffffffff60881b191617600160881b938216939093029290921767ffffffffffffffff60a81b1916600160a81b9383169390930263ffffffff60c81b191692909217600160c81b9190931602919091179055949350505050565b33611bff82611fbb565b6001600160a01b031614611c26576040516336b6b89560e01b815260040160405180910390fd5b6000601d8281548110611c3b57611c3b615599565b6000918252602090912001805490915060ff1615611c6c57604051635279c13160e01b815260040160405180910390fd5b6000828152600d6020526040902054611c84906135dc565b611ca157604051635d093c8f60e11b815260040160405180910390fd5b6000828152600d60205260408120429055611cbb3361147b565b90506000611ccc610d576014612e9c565b835463ffffffff60681b1916600160681b63ffffffff83160217845560405166115e59549bdb1b60ca1b815290915033906007015b60405180910390208263ffffffff167fb12e1e08e76d714ef63b27c8ca53a47cedc00aa980087dac6b988c929899020f87604051610dda91815260200190565b6000611d4c816132b8565b60005b82811015611e1a576001600c6000868685818110611d6f57611d6f615599565b9050602002016020810190611d849190615305565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055838382818110611dbe57611dbe615599565b9050602002016020810190611dd39190615305565b6001600160a01b03167ffc2e0c2f93b18a680eab6657e8b1471315f3055ba0ffb3af1cfd8ace975349e160405160405180910390a280611e128161566c565b915050611d4f565b50505050565b6000611e2b816132b8565b50601180546001600160a01b0319166001600160a01b0392909216919091179055565b601c546040805160208101929092524490820152426060820152476080820152600090819060a00160408051601f19818403018152919052805160209091012090506000611e9f620186a08361569b565b612710119392505050565b33611eb482611fbb565b6001600160a01b031614611edb576040516336b6b89560e01b815260040160405180910390fd5b6000601d8281548110611ef057611ef0615599565b6000918252602090912001805490915060ff1615611f2157604051635279c13160e01b815260040160405180910390fd5b6000828152600d6020526040902054611f39906135dc565b611f5657604051635d093c8f60e11b815260040160405180910390fd5b6000828152600d60205260408120429055611f703361147b565b90506000611f816111956022612e9c565b835463ffffffff60881b1916600160881b63ffffffff8316021784556040516712185a5c949bdb1b60c21b81529091503390600801611d01565b6000818152600260205260408120546001600160a01b031680610df35760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610fa0565b3361202582611fbb565b6001600160a01b03161461204c576040516336b6b89560e01b815260040160405180910390fd5b6000601d828154811061206157612061615599565b6000918252602090912001805490915060ff161561209257604051635279c13160e01b815260040160405180910390fd5b6000828152600d60205260409020546120aa906135dc565b6120c757604051635d093c8f60e11b815260040160405180910390fd5b6000828152600d602052604081204290556120e13361147b565b905060006120fb6120f26009612e9c565b610d608461341f565b835464ffffffff00191661010063ffffffff8316021784556040516d109858dad9dc9bdd5b99149bdb1b60921b81529091503390600e01611d01565b60006001600160a01b0382166121a15760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610fa0565b506001600160a01b031660009081526003602052604090205490565b336121c782611fbb565b6001600160a01b0316146121ee576040516336b6b89560e01b815260040160405180910390fd5b6000601d828154811061220357612203615599565b6000918252602090912001805490915060ff161561223457604051635279c13160e01b815260040160405180910390fd5b6015543410156122575760405163700cff1f60e11b815260040160405180910390fd5b33600081815260096020526040812080546001019055906122779061147b565b90506000612291612288600e612e9c565b610d6084613437565b835463ffffffff60c81b1916600160c81b63ffffffff83160217845560405168135bdd5d1a149bdb1b60ba1b81529091503390600901610d9a565b606060008267ffffffffffffffff8111156122e9576122e961547d565b604051908082528060200260200182016040528015612312578160200160208202803683370190505b50905060005b83811015612357576123286128b0565b82828151811061233a5761233a615599565b60209081029190910101528061234f8161566c565b915050612318565b5092915050565b3361236882611fbb565b6001600160a01b03161461238f576040516336b6b89560e01b815260040160405180910390fd5b6000601d82815481106123a4576123a4615599565b6000918252602090912001805490915060ff16156123d557604051635279c13160e01b815260040160405180910390fd5b6012543410156123f85760405163700cff1f60e11b815260040160405180910390fd5b33600081815260096020526040812080546001019055906124189061147b565b905060006124296120f26009612e9c565b835464ffffffff00191661010063ffffffff8316021784556040516d109858dad9dc9bdd5b99149bdb1b60921b81529091503390600e01610d9a565b3361246f82611fbb565b6001600160a01b031614612496576040516336b6b89560e01b815260040160405180910390fd5b6000601d82815481106124ab576124ab615599565b6000918252602090912001805490915060ff16156124dc57604051635279c13160e01b815260040160405180910390fd5b6000828152600d60205260409020546124f4906135dc565b61251157604051635d093c8f60e11b815260040160405180910390fd5b6000828152600d6020526040812042905561252b3361147b565b9050600061254561253c6019612e9c565b610d608461342b565b835468ffffffff00000000001916600160281b63ffffffff8316021784556040516810da195cdd149bdb1b60ba1b81529091503390600901611d01565b60009182526006602090815260408084206001600160a01b0393909316845291905290205460ff1690565b606060018054610e08906155af565b610fb33383836135f5565b336125d182611fbb565b6001600160a01b0316146125f8576040516336b6b89560e01b815260040160405180910390fd5b6000601d828154811061260d5761260d615599565b6000918252602090912001805490915060ff161561263e57604051635279c13160e01b815260040160405180910390fd5b6017543410156126615760405163700cff1f60e11b815260040160405180910390fd5b33600081815260096020526040812080546001019055906126819061147b565b9050600061269261253c6019612e9c565b835468ffffffff00000000001916600160281b63ffffffff8316021784556040516810da195cdd149bdb1b60ba1b81529091503390600901610d9a565b601d81815481106126df57600080fd5b60009182526020909120015460ff8116915063ffffffff6101008204811691600160281b8104821691600160481b8204811691600160681b8104821691600160881b8204811691600160a81b8104821691600160c81b9091041688565b3361274682611fbb565b6001600160a01b03161461276d576040516336b6b89560e01b815260040160405180910390fd5b6000601d828154811061278257612782615599565b6000918252602090912001805490915060ff16156127b357604051635279c13160e01b815260040160405180910390fd5b6000828152600d60205260409020546127cb906135dc565b6127e857604051635d093c8f60e11b815260040160405180910390fd5b6000828152600d602052604081204290556128023361147b565b90506000612813612288600e612e9c565b835463ffffffff60c81b1916600160c81b63ffffffff83160217845560405168135bdd5d1a149bdb1b60ba1b81529091503390600901611d01565b61285833836130c1565b6128745760405162461bcd60e51b8152600401610fa0906155e3565b611e1a848484846136bb565b6060610df3826136ee565b6000828152600660205260409020600101546128a6816132b8565b61126a83836133b8565b600033816128bd60075490565b905060085481106128e157604051632f427b7b60e11b815260040160405180910390fd5b6001600160a01b0382166000908152600c602052604090205460ff1615612940576001600160a01b0382166000908152600b602052604090205460281161293b57604051637eb12f4760e11b815260040160405180910390fd5b612979565b6001600160a01b0382166000908152600b602052604090205460141161297957604051637eb12f4760e11b815260040160405180910390fd5b6129838282613443565b600061298e82610e8b565b6001600160a01b0316036129b2576011546129b2906001600160a01b031682610eb2565b6001600160a01b0382166000908152600b602052604081208054600192906129db908490615646565b90915550506007805460010190556129f66201518042615659565b6000828152600d602090815260409182902092909255518281526001600160a01b038416917f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885910160405180910390a260408051610100808201835260008083526002602084019081529383018181526004606085019081526080850183815260a0860184815260c0870185815260e08801868152601d8054600181018255975297517f6d4407e7be21f808e6509aa9fa9143369579dd7d760fe20a2c09680fc146134f9096018054995195519451935192519151985164ffffffffff19909a1696151564ffffffff0019169690961763ffffffff958616909702969096176cffffffffffffffff00000000001916600160281b9385169390930263ffffffff60481b191692909217600160481b918416919091021767ffffffffffffffff60681b1916600160681b9183169190910263ffffffff60881b191617600160881b938216939093029290921767ffffffffffffffff60a81b1916600160a81b9383169390930263ffffffff60c81b191692909217600160c81b919093160291909117905592915050565b6010546001600160a01b0316331480612bc25750600f546001600160a01b031633145b612bcb57600080fd5b4760006064612bdb83605f6156af565b612be591906156c6565b905060006064612bf68460056156af565b612c0091906156c6565b600f546040519192506000916001600160a01b039091169084908381818185875af1925050503d8060008114612c52576040519150601f19603f3d011682016040523d82523d6000602084013e612c57565b606091505b5050905080612ca85760405162461bcd60e51b815260206004820152601860248201527f4661696c656420746f2073656e642061646d696e2063757400000000000000006044820152606401610fa0565b6010546040516000916001600160a01b03169084908381818185875af1925050503d8060008114612cf5576040519150601f19603f3d011682016040523d82523d6000602084013e612cfa565b606091505b5050905080612d4b5760405162461bcd60e51b815260206004820152601960248201527f4661696c656420746f2073656e642061646d696e3220637574000000000000006044820152606401610fa0565b60408051858152602081018590527f4436a492a747a04b3719fd1974f0ad9b8f5a6e7acf23e134d3127f56b9a54d1a910160405180910390a15050505050565b33612d9582611fbb565b6001600160a01b031614612dbc576040516336b6b89560e01b815260040160405180910390fd5b6000601d8281548110612dd157612dd1615599565b6000918252602090912001805490915060ff1615612e0257604051635279c13160e01b815260040160405180910390fd5b6000828152600d6020526040902054612e1a906135dc565b612e3757604051635d093c8f60e11b815260040160405180910390fd5b6000828152600d60205260408120429055612e513361147b565b90506000612e6261133a6009612e9c565b835463ffffffff60481b1916600160481b63ffffffff83160217845560405167139bdcd9549bdb1b60c21b81529091503390600801611d01565b606060008267ffffffffffffffff811115612eb957612eb961547d565b604051908082528060200260200182016040528015612ee2578160200160208202803683370190505b50905060005b838110156123575780828281518110612f0357612f03615599565b602090810291909101015280612f188161566c565b915050612ee8565b60606000612f2c613755565b90506000612f3a8285613a2a565b949350505050565b60008080612f4e613b70565b42601c55905060005b8551811015612fab57848181518110612f7257612f72615599565b602002602001015183612f859190615646565b925081831115612f99579250610df3915050565b80612fa38161566c565b915050612f57565b50505092915050565b60006001600160e01b03198216637965db0b60e01b1480610df35750610df382613c4b565b6000818152600260205260409020546001600160a01b03166130385760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610fa0565b50565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061307082611fbb565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60606000612f2c613c9b565b60606000612f2c613eb1565b6000806130cd83611fbb565b9050806001600160a01b0316846001600160a01b0316148061311457506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b80612f3a5750836001600160a01b031661312d84610e8b565b6001600160a01b031614949350505050565b826001600160a01b031661315282611fbb565b6001600160a01b031614806131785750601154613178906001600160a01b0316826130c1565b6131d65760405162461bcd60e51b815260206004820152602960248201527f57656972644672656e733a207472616e736665722066726f6d20696e636f727260448201526832b1ba1037bbb732b960b91b6064820152608401610fa0565b6001600160a01b0382166132385760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610fa0565b6132458383836001614349565b61325082600161434e565b61325b83600161437f565b6132668184846143a7565b80826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b60606000612f2c614511565b6130388133614660565b6132cc8282612582565b610fb35760008281526006602090815260408083206001600160a01b03851684529091529020805460ff191660011790556133043390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061081682111561335c5750603c919050565b61336782600a615646565b6133729060086156af565b61337d906001615646565b9150613388826146b9565b613393906001615646565b9150600560646133a48460326156af565b6133ae91906156c6565b610df39190615659565b6133c28282612582565b15610fb35760008281526006602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60606000612f2c614729565b60606000612f2c614878565b60606000612f2c614be2565b6001600160a01b0382166134995760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610fa0565b6000818152600260205260409020546001600160a01b0316156134fe5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610fa0565b61350c600083836001614349565b6000818152600260205260409020546001600160a01b0316156135715760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610fa0565b6001600160a01b038216600081815260036020908152604080832080546001019055848352600290915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000600e54826135ec9190615646565b42101592915050565b816001600160a01b0316836001600160a01b0316036136565760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610fa0565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910161180a565b6136c684848461313f565b6136d284848484614ddb565b611e1a5760405162461bcd60e51b8152600401610fa0906156da565b60606136f982612fd9565b6000613703614edc565b90506000815111613723576040518060200160405280600081525061374e565b8061372d84614efc565b60405160200161373e92919061572c565b6040516020818303038152906040525b9392505050565b6040805160148082526102a08201909252606091600091906020820161028080368337019050509050611bbc8160008151811061379457613794615599565b602002602001018181525050611bbc816001815181106137b6576137b6615599565b602002602001018181525050611bbc816002815181106137d8576137d8615599565b602002602001018181525050611bbc816003815181106137fa576137fa615599565b602002602001018181525050611bbc8160048151811061381c5761381c615599565b602002602001018181525050611bbc8160058151811061383e5761383e615599565b60200260200101818152505061170c8160068151811061386057613860615599565b60200260200101818152505061170c8160078151811061388257613882615599565b60200260200101818152505061170c816008815181106138a4576138a4615599565b6020026020010181815250506110cc816009815181106138c6576138c6615599565b6020026020010181815250506110cc81600a815181106138e8576138e8615599565b6020026020010181815250506110cc81600b8151811061390a5761390a615599565b6020026020010181815250506110cc81600c8151811061392c5761392c615599565b6020026020010181815250506110cc81600d8151811061394e5761394e615599565b602002602001018181525050610dac81600e8151811061397057613970615599565b602002602001018181525050610dac81600f8151811061399257613992615599565b602002602001018181525050610dac816010815181106139b4576139b4615599565b602002602001018181525050610dac816011815181106139d6576139d6615599565b602002602001018181525050610834816012815181106139f8576139f8615599565b60200260200101818152505061083481601381518110613a1a57613a1a615599565b6020908102919091010152919050565b6060600060048451613a3c9190615659565b90506000600d825b8651811015613b0c576000610e1083613a5d89806156af565b613a6791906156af565b613a7191906156c6565b613a7c9060646156af565b9050600081898481518110613a9357613a93615599565b6020026020010151613aa59190615646565b9050888381518110613ab957613ab9615599565b602002602001015181613acc9190615659565b613ad69086615646565b945080898481518110613aeb57613aeb615599565b60200260200101818152505050508080613b049061566c565b915050613a44565b506000613b1a6004846156c6565b905060005b6004811015613b645781888281518110613b3b57613b3b615599565b60200260200101818151613b4f9190615659565b90525080613b5c8161566c565b915050613b1f565b50959695505050505050565b601c54604080516020808201939093524481830152426060808301919091524760808301523a60a083015233901b6bffffffffffffffffffffffff191660c0820152815180820360b401815260d490910190915280519101206000907fdd15fe86affad91249ef0eb713f39ebeaa987b6e6fd29fffffffffffffffffff811115613c2357613c1d7e05a8e89d75252446eb5d5d5b1cc5edf20a1a059e10ca000000000000000000826156c6565b91505090565b613c1d7d90e40fbeea1d3a4abc8955e946fe31cdcf66f634e1000000000000000000826156c6565b60006001600160e01b031982166380ac58cd60e01b1480613c7c57506001600160e01b03198216635b5e139f60e01b145b80610df357506301ffc9a760e01b6001600160e01b0319831614610df3565b60408051600f808252610200820190925260609160009190602082016101e08036833701905050905062010d3381600081518110613cdb57613cdb615599565b6020026020010181815250506111c481600181518110613cfd57613cfd615599565b6020026020010181815250506111c481600281518110613d1f57613d1f615599565b6020026020010181815250506111c481600381518110613d4157613d41615599565b6020026020010181815250506111c481600481518110613d6357613d63615599565b602002602001018181525050610c8381600581518110613d8557613d85615599565b602002602001018181525050610c1c81600681518110613da757613da7615599565b602002602001018181525050610c1c81600781518110613dc957613dc9615599565b602002602001018181525050610c1c81600881518110613deb57613deb615599565b602002602001018181525050606481600981518110613e0c57613e0c615599565b602002602001018181525050606481600a81518110613e2d57613e2d615599565b602002602001018181525050606481600b81518110613e4e57613e4e615599565b602002602001018181525050601e81600c81518110613e6f57613e6f615599565b602002602001018181525050601e81600d81518110613e9057613e90615599565b602002602001018181525050601e81600e81518110613a1a57613a1a615599565b60408051602280825261046082019092526060916000919060208201610440803683370190505090506119b481600081518110613ef057613ef0615599565b6020026020010181815250506119b481600181518110613f1257613f12615599565b6020026020010181815250506119b481600281518110613f3457613f34615599565b6020026020010181815250506119b481600381518110613f5657613f56615599565b6020026020010181815250506119b481600481518110613f7857613f78615599565b6020026020010181815250506119b481600581518110613f9a57613f9a615599565b6020026020010181815250506119b481600681518110613fbc57613fbc615599565b6020026020010181815250506115d681600781518110613fde57613fde615599565b602002602001018181525050610c808160088151811061400057614000615599565b602002602001018181525050610c808160098151811061402257614022615599565b602002602001018181525050610c8081600a8151811061404457614044615599565b602002602001018181525050610c8081600b8151811061406657614066615599565b602002602001018181525050610c8081600c8151811061408857614088615599565b602002602001018181525050610c8081600d815181106140aa576140aa615599565b602002602001018181525050610c8081600e815181106140cc576140cc615599565b602002602001018181525050610a8c81600f815181106140ee576140ee615599565b602002602001018181525050610a8c8160108151811061411057614110615599565b602002602001018181525050610a8c8160118151811061413257614132615599565b602002602001018181525050610a8c8160128151811061415457614154615599565b602002602001018181525050610a8c8160138151811061417657614176615599565b602002602001018181525050610a8c8160148151811061419857614198615599565b602002602001018181525050610a8c816015815181106141ba576141ba615599565b602002602001018181525050610834816016815181106141dc576141dc615599565b602002602001018181525050610834816017815181106141fe576141fe615599565b6020026020010181815250506108348160188151811061422057614220615599565b60200260200101818152505060648160198151811061424157614241615599565b602002602001018181525050606481601a8151811061426257614262615599565b602002602001018181525050606481601b8151811061428357614283615599565b602002602001018181525050606481601c815181106142a4576142a4615599565b602002602001018181525050606481601d815181106142c5576142c5615599565b602002602001018181525050606481601e815181106142e6576142e6615599565b602002602001018181525050603281601f8151811061430757614307615599565b60200260200101818152505060328160208151811061432857614328615599565b602002602001018181525050603281602181518110613a1a57613a1a615599565b611e1a565b6001600160a01b03821660009081526003602052604081208054839290614376908490615646565b90915550505050565b6001600160a01b03821660009081526003602052604081208054839290614376908490615659565b6001600160a01b0381166143fd5760405162461bcd60e51b815260206004820152601d60248201527f437573746f6d4552433732313a20496e76616c696420616464726573730000006044820152606401610fa0565b6000838152600260205260409020546001600160a01b031661446f5760405162461bcd60e51b815260206004820152602560248201527f437573746f6d4552433732313a20546f6b656e20494420646f6573206e6f7420604482015264195e1a5cdd60da1b6064820152608401610fa0565b61447982846130c1565b6144e15760405162461bcd60e51b815260206004820152603360248201527f437573746f6d4552433732313a2063616c6c6572206973206e6f7420746f6b656044820152721b881bdddb995c881bdc88185c1c1c9bdd9959606a1b6064820152608401610fa0565b60009283526002602052604090922080546001600160a01b0319166001600160a01b039093169290921790915550565b6040805160098082526101408201909252606091600091906020820161012080368337019050509050612b688160008151811061455057614550615599565b602002602001018181525050612b678160018151811061457257614572615599565b602002602001018181525050612b678160028151811061459457614594615599565b602002602001018181525050612b67816003815181106145b6576145b6615599565b602002602001018181525050612b67816004815181106145d8576145d8615599565b602002602001018181525050612b67816005815181106145fa576145fa615599565b602002602001018181525050612b678160068151811061461c5761461c615599565b602002602001018181525050612b678160078151811061463e5761463e615599565b602002602001018181525050612b6781600881518110613a1a57613a1a615599565b61466a8282612582565b610fb35761467781614f8f565b614682836020614fa1565b60405160200161469392919061575b565b60408051601f198184030181529082905262461bcd60e51b8252610fa0916004016152b1565b6000600382111561471a57508060006146d36002836156c6565b6146de906001615646565b90505b81811015614714579050806002816146f981866156c6565b6147039190615646565b61470d91906156c6565b90506146e1565b50919050565b8115614724575060015b919050565b6040805160098082526101408201909252606091600091906020820161012080368337019050509050614c2c8160008151811061476857614768615599565b602002602001018181525050614c2c8160018151811061478a5761478a615599565b602002602001018181525050614c2c816002815181106147ac576147ac615599565b602002602001018181525050614c2c816003815181106147ce576147ce615599565b602002602001018181525050611130816004815181106147f0576147f0615599565b6020026020010181815250506111308160058151811061481257614812615599565b6020026020010181815250506111308160068151811061483457614834615599565b6020026020010181815250506111308160078151811061485657614856615599565b60200260200101818152505061113081600881518110613a1a57613a1a615599565b6040805160198082526103408201909252606091600091906020820161032080368337019050509050611af4816000815181106148b7576148b7615599565b602002602001018181525050611af4816001815181106148d9576148d9615599565b602002602001018181525050611af4816002815181106148fb576148fb615599565b602002602001018181525050611af48160038151811061491d5761491d615599565b602002602001018181525050611af48160048151811061493f5761493f615599565b6020026020010181815250506116a88160058151811061496157614961615599565b6020026020010181815250506112c08160068151811061498357614983615599565b6020026020010181815250506112c0816007815181106149a5576149a5615599565b6020026020010181815250506112c0816008815181106149c7576149c7615599565b6020026020010181815250506112c0816009815181106149e9576149e9615599565b6020026020010181815250506112c081600a81518110614a0b57614a0b615599565b6020026020010181815250506112c081600b81518110614a2d57614a2d615599565b602002602001018181525050610ed881600c81518110614a4f57614a4f615599565b602002602001018181525050610ed881600d81518110614a7157614a71615599565b602002602001018181525050610ed881600e81518110614a9357614a93615599565b602002602001018181525050610ed881600f81518110614ab557614ab5615599565b602002602001018181525050610ed881601081518110614ad757614ad7615599565b602002602001018181525050610ed881601181518110614af957614af9615599565b602002602001018181525050610ed881601281518110614b1b57614b1b615599565b602002602001018181525050610ed881601381518110614b3d57614b3d615599565b602002602001018181525050606481601481518110614b5e57614b5e615599565b602002602001018181525050606481601581518110614b7f57614b7f615599565b602002602001018181525050606481601681518110614ba057614ba0615599565b602002602001018181525050606481601781518110614bc157614bc1615599565b602002602001018181525050606481601881518110613a1a57613a1a615599565b60408051600e8082526101e0820190925260609160009190602082016101c08036833701905050905061245481600081518110614c2157614c21615599565b60200260200101818152505061245481600181518110614c4357614c43615599565b60200260200101818152505061245481600281518110614c6557614c65615599565b60200260200101818152505061245481600381518110614c8757614c87615599565b60200260200101818152505061245481600481518110614ca957614ca9615599565b60200260200101818152505061245481600581518110614ccb57614ccb615599565b6020026020010181815250506123f081600681518110614ced57614ced615599565b6020026020010181815250506123f081600781518110614d0f57614d0f615599565b6020026020010181815250506123f081600881518110614d3157614d31615599565b60200260200101818152505061170c81600981518110614d5357614d53615599565b60200260200101818152505061170c81600a81518110614d7557614d75615599565b60200260200101818152505061064081600b81518110614d9757614d97615599565b60200260200101818152505061064081600c81518110614db957614db9615599565b60200260200101818152505061064081600d81518110613a1a57613a1a615599565b60006001600160a01b0384163b15614ed157604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290614e1f9033908990889088906004016157d0565b6020604051808303816000875af1925050508015614e5a575060408051601f3d908101601f19168201909252614e579181019061580d565b60015b614eb7573d808015614e88576040519150601f19603f3d011682016040523d82523d6000602084013e614e8d565b606091505b508051600003614eaf5760405162461bcd60e51b8152600401610fa0906156da565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612f3a565b506001949350505050565b606060405180606001604052806021815260200161584260219139905090565b60606000614f098361513d565b600101905060008167ffffffffffffffff811115614f2957614f2961547d565b6040519080825280601f01601f191660200182016040528015614f53576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084614f5d57509392505050565b6060610df36001600160a01b03831660145b60606000614fb08360026156af565b614fbb906002615646565b67ffffffffffffffff811115614fd357614fd361547d565b6040519080825280601f01601f191660200182016040528015614ffd576020820181803683370190505b509050600360fc1b8160008151811061501857615018615599565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061504757615047615599565b60200101906001600160f81b031916908160001a905350600061506b8460026156af565b615076906001615646565b90505b60018111156150ee576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106150aa576150aa615599565b1a60f81b8282815181106150c0576150c0615599565b60200101906001600160f81b031916908160001a90535060049490941c936150e78161582a565b9050615079565b50831561374e5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610fa0565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b831061517c5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef810000000083106151a8576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106151c657662386f26fc10000830492506010015b6305f5e10083106151de576305f5e100830492506008015b61271083106151f257612710830492506004015b60648310615204576064830492506002015b600a8310610df35760010192915050565b60006020828403121561522757600080fd5b5035919050565b6001600160e01b03198116811461303857600080fd5b60006020828403121561525657600080fd5b813561374e8161522e565b60005b8381101561527c578181015183820152602001615264565b50506000910152565b6000815180845261529d816020860160208601615261565b601f01601f19169290920160200192915050565b60208152600061374e6020830184615285565b80356001600160a01b038116811461472457600080fd5b600080604083850312156152ee57600080fd5b6152f7836152c4565b946020939093013593505050565b60006020828403121561531757600080fd5b61374e826152c4565b60008060006060848603121561533557600080fd5b61533e846152c4565b925061534c602085016152c4565b9150604084013590509250925092565b6000806040838503121561536f57600080fd5b8235915061537f602084016152c4565b90509250929050565b6000806020838503121561539b57600080fd5b823567ffffffffffffffff808211156153b357600080fd5b818501915085601f8301126153c757600080fd5b8135818111156153d657600080fd5b8660208260051b85010111156153eb57600080fd5b60209290920196919550909350505050565b6020808252825182820181905260009190848201906040850190845b8181101561543557835183529284019291840191600101615419565b50909695505050505050565b6000806040838503121561545457600080fd5b61545d836152c4565b91506020830135801515811461547257600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600080600080608085870312156154a957600080fd5b6154b2856152c4565b93506154c0602086016152c4565b925060408501359150606085013567ffffffffffffffff808211156154e457600080fd5b818701915087601f8301126154f857600080fd5b81358181111561550a5761550a61547d565b604051601f8201601f19908116603f011681019083821181831017156155325761553261547d565b816040528281528a602084870101111561554b57600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b6000806040838503121561558257600080fd5b61558b836152c4565b915061537f602084016152c4565b634e487b7160e01b600052603260045260246000fd5b600181811c908216806155c357607f821691505b60208210810361471457634e487b7160e01b600052602260045260246000fd5b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b80820180821115610df357610df3615630565b81810381811115610df357610df3615630565b60006001820161567e5761567e615630565b5060010190565b634e487b7160e01b600052601260045260246000fd5b6000826156aa576156aa615685565b500690565b8082028115828204841417610df357610df3615630565b6000826156d5576156d5615685565b500490565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6000835161573e818460208801615261565b835190830190615752818360208801615261565b01949350505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351615793816017850160208801615261565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516157c4816028840160208801615261565b01602801949350505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061580390830184615285565b9695505050505050565b60006020828403121561581f57600080fd5b815161374e8161522e565b60008161583957615839615630565b50600019019056fe68747470733a2f2f77656972646672656e732e636f6d2f6170692f746f6b656e2fa2646970667358221220a360bf93a6a7945836485d9a6cbe1f1006fd14ccece2a8596cdf1685230a006d64736f6c6343000811003300000000000000000000000098f6f0acf500330f605c3fd335ab3957d4442ba7000000000000000000000000198277c5b6230010a0f1c49823b6430bda033448
Deployed Bytecode
0x6080604052600436106103ee5760003560e01c80635cb68cb711610208578063b24767b711610118578063e985e9c5116100ab578063f851a4401161007a578063f851a44014610be7578063f94864f114610c07578063fada67a314610c1d578063fb237eb214610c33578063fcfd236714610c6c57600080fd5b8063e985e9c514610b5e578063eb93406b14610ba7578063f18d20be14610bbc578063f3c943dd14610bd157600080fd5b8063c1753257116100e7578063c175325714610adb578063c87b56dd14610b08578063d547741f14610b28578063e6fc0a6d14610b4857600080fd5b8063b24767b714610a65578063b52d6fd114610a85578063b88d4fde14610aa5578063c122c6db14610ac557600080fd5b806384db9c9c1161019b57806395d89b411161016a57806395d89b41146109d2578063a217fddf146109e7578063a22cb465146109fc578063a7647fd614610a1c578063aedf503a14610a5257600080fd5b806384db9c9c146109695780638962c9681461097c57806391d148541461099c578063924c8bd1146109bc57600080fd5b806370a08231116101d757806370a08231146108f3578063765152ee146109135780637e8072e1146109295780638467be0d1461093c57600080fd5b80635cb68cb7146108635780636352211e146108835780636f9170f6146108a35780636ffc8b8a146108d357600080fd5b80632b8cc5401161030357806342842e0e116102965780634ad32030116102655780634ad32030146107be5780634f34044d146107de57806355377a0e146107f457806355cb574e146108215780635bbccbd11461084e57600080fd5b806342842e0e1461056c5780634450ca8514610768578063475fda0e146107885780634abe666f146107a857600080fd5b8063391e2ee2116102d2578063391e2ee2146106f55780633c029dc1146107155780633fbe42371461072857806340e4f3681461075557600080fd5b80632b8cc540146106285780632f2ff15d1461069557806334b735a1146106b557806336568abe146106d557600080fd5b8063180cd3dc1161038657806323d7fa7b1161035557806323d7fa7b1461058c578063248a9ca3146105a257806326c84e58146105d2578063285de177146105e557806329f7de5c1461061257600080fd5b8063180cd3dc1461050e57806318160ddd1461052157806319522d9f1461053657806323b872dd1461056c57600080fd5b806306fdde03116103c257806306fdde0314610499578063081812fc146104bb578063095ea7b3146104db578063151cc395146104fb57600080fd5b806255b295146103f357806301ffc9a714610408578063026b2dce1461043d57806306a8f8a214610461575b600080fd5b610406610401366004615215565b610c8c565b005b34801561041457600080fd5b50610428610423366004615244565b610de8565b60405190151581526020015b60405180910390f35b34801561044957600080fd5b5061045360195481565b604051908152602001610434565b34801561046d57600080fd5b50601054610481906001600160a01b031681565b6040516001600160a01b039091168152602001610434565b3480156104a557600080fd5b506104ae610df9565b60405161043491906152b1565b3480156104c757600080fd5b506104816104d6366004615215565b610e8b565b3480156104e757600080fd5b506104066104f63660046152db565b610eb2565b610406610509366004615215565b610fb7565b61040661051c366004615215565b6110ca565b34801561052d57600080fd5b506104536111d8565b34801561054257600080fd5b50610453610551366004615305565b6001600160a01b031660009081526009602052604090205490565b34801561057857600080fd5b50610406610587366004615320565b6111e8565b34801561059857600080fd5b5061045360125481565b3480156105ae57600080fd5b506104536105bd366004615215565b60009081526006602052604090206001015490565b6104066105e0366004615215565b61126f565b3480156105f157600080fd5b50610453610600366004615215565b6000908152600d602052604090205490565b34801561061e57600080fd5b50610453601b5481565b34801561063457600080fd5b50610648610643366004615215565b61137d565b60408051981515895263ffffffff97881660208a01529587169588019590955292851660608701529084166080860152831660a0850152821660c08401521660e082015261010001610434565b3480156106a157600080fd5b506104066106b036600461535c565b611456565b3480156106c157600080fd5b506104536106d0366004615305565b61147b565b3480156106e157600080fd5b506104066106f036600461535c565b61149d565b34801561070157600080fd5b50601154610481906001600160a01b031681565b610406610723366004615215565b611517565b34801561073457600080fd5b50610453610743366004615305565b600a6020526000908152604090205481565b610453610763366004615305565b611817565b34801561077457600080fd5b50610406610783366004615215565b611bf5565b34801561079457600080fd5b506104066107a3366004615388565b611d41565b3480156107b457600080fd5b5061045360165481565b3480156107ca57600080fd5b506104066107d9366004615305565b611e20565b3480156107ea57600080fd5b50610453601a5481565b34801561080057600080fd5b5061045361080f366004615305565b60096020526000908152604090205481565b34801561082d57600080fd5b5061045361083c366004615305565b600b6020526000908152604090205481565b34801561085a57600080fd5b50610428611e4e565b34801561086f57600080fd5b5061040661087e366004615215565b611eaa565b34801561088f57600080fd5b5061048161089e366004615215565b611fbb565b3480156108af57600080fd5b506104286108be366004615305565b600c6020526000908152604090205460ff1681565b3480156108df57600080fd5b506104066108ee366004615215565b61201b565b3480156108ff57600080fd5b5061045361090e366004615305565b612137565b34801561091f57600080fd5b5061045360135481565b610406610937366004615215565b6121bd565b34801561094857600080fd5b5061095c610957366004615215565b6122cc565b60405161043491906153fd565b610406610977366004615215565b61235e565b34801561098857600080fd5b50610406610997366004615215565b612465565b3480156109a857600080fd5b506104286109b736600461535c565b612582565b3480156109c857600080fd5b50610453601c5481565b3480156109de57600080fd5b506104ae6125ad565b3480156109f357600080fd5b50610453600081565b348015610a0857600080fd5b50610406610a17366004615441565b6125bc565b348015610a2857600080fd5b50610453610a37366004615305565b6001600160a01b03166000908152600b602052604090205490565b610406610a60366004615215565b6125c7565b348015610a7157600080fd5b50610648610a80366004615215565b6126cf565b348015610a9157600080fd5b50610406610aa0366004615215565b61273c565b348015610ab157600080fd5b50610406610ac0366004615493565b61284e565b348015610ad157600080fd5b5061045360145481565b348015610ae757600080fd5b50610453610af6366004615215565b600d6020526000908152604090205481565b348015610b1457600080fd5b506104ae610b23366004615215565b612880565b348015610b3457600080fd5b50610406610b4336600461535c565b61288b565b348015610b5457600080fd5b5061045360155481565b348015610b6a57600080fd5b50610428610b7936600461556f565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b348015610bb357600080fd5b506104536128b0565b348015610bc857600080fd5b50610406612b9f565b348015610bdd57600080fd5b50610453600e5481565b348015610bf357600080fd5b50600f54610481906001600160a01b031681565b348015610c1357600080fd5b5061045360185481565b348015610c2957600080fd5b5061045360175481565b348015610c3f57600080fd5b50610428610c4e366004615305565b6001600160a01b03166000908152600c602052604090205460ff1690565b348015610c7857600080fd5b50610406610c87366004615215565b612d8b565b33610c9682611fbb565b6001600160a01b031614610cbd576040516336b6b89560e01b815260040160405180910390fd5b6000601d8281548110610cd257610cd2615599565b6000918252602090912001805490915060ff1615610d0357604051635279c13160e01b815260040160405180910390fd5b601654341015610d265760405163700cff1f60e11b815260040160405180910390fd5b3360008181526009602052604081208054600101905590610d469061147b565b90506000610d65610d576014612e9c565b610d6084612f20565b612f42565b835463ffffffff60681b1916600160681b63ffffffff83160217845560405166115e59549bdb1b60ca1b815290915033906007015b60405180910390208263ffffffff167fbe131abeeb694b6df509f75940d836c9764f527e83dd1c6c6d0bb926d92c5c1d87604051610dda91815260200190565b60405180910390a450505050565b6000610df382612fb4565b92915050565b606060008054610e08906155af565b80601f0160208091040260200160405190810160405280929190818152602001828054610e34906155af565b8015610e815780601f10610e5657610100808354040283529160200191610e81565b820191906000526020600020905b815481529060010190602001808311610e6457829003601f168201915b5050505050905090565b6000610e9682612fd9565b506000908152600460205260409020546001600160a01b031690565b610ebb81611fbb565b6001600160a01b0316336001600160a01b03161480610f0c5750610ede81611fbb565b6001600160a01b0316336001600160a01b031614158015610f0c57506011546001600160a01b038381169116145b610fa95760405162461bcd60e51b815260206004820152605760248201527f57656972644672656e734e46543a2063616c6c6572206d75737420626520656960448201527f7468657220746865206f776e6572206f7220617070726f76696e6720746f207460648201527f6865206d61726b6574706c61636520636f6e7472616374000000000000000000608482015260a4015b60405180910390fd5b610fb3828261303b565b5050565b33610fc182611fbb565b6001600160a01b031614610fe8576040516336b6b89560e01b815260040160405180910390fd5b6000601d8281548110610ffd57610ffd615599565b6000918252602090912001805490915060ff161561102e57604051635279c13160e01b815260040160405180910390fd5b6019543410156110515760405163700cff1f60e11b815260040160405180910390fd5b33600081815260096020526040812080546001019055906110719061147b565b9050600061108b611082600f612e9c565b610d60846130a9565b835463ffffffff60a81b1916600160a81b63ffffffff8316021784556040516c1058d8d95cdcdbdc9e549bdb1b609a1b81529091503390600d01610d9a565b336110d482611fbb565b6001600160a01b0316146110fb576040516336b6b89560e01b815260040160405180910390fd5b6000601d828154811061111057611110615599565b6000918252602090912001805490915060ff161561114157604051635279c13160e01b815260040160405180910390fd5b6018543410156111645760405163700cff1f60e11b815260040160405180910390fd5b33600081815260096020526040812080546001019055906111849061147b565b9050600061119e6111956022612e9c565b610d60846130b5565b835463ffffffff60881b1916600160881b63ffffffff8316021784556040516712185a5c949bdb1b60c21b81529091503390600801610d9a565b60006111e360075490565b905090565b6011546111fe906001600160a01b0316826130c1565b61121a5760405162461bcd60e51b8152600401610fa0906155e3565b600061122582610e8b565b6001600160a01b03160361124957601154611249906001600160a01b031682610eb2565b61125483838361313f565b60115461126a906001600160a01b031682610eb2565b505050565b3361127982611fbb565b6001600160a01b0316146112a0576040516336b6b89560e01b815260040160405180910390fd5b6000601d82815481106112b5576112b5615599565b6000918252602090912001805490915060ff16156112e657604051635279c13160e01b815260040160405180910390fd5b6014543410156113095760405163700cff1f60e11b815260040160405180910390fd5b33600081815260096020526040812080546001019055906113299061147b565b9050600061134361133a6009612e9c565b610d60846132ac565b835463ffffffff60481b1916600160481b63ffffffff83160217845560405167139bdcd9549bdb1b60c21b81529091503390600801610d9a565b6000806000806000806000806000601d8a8154811061139e5761139e615599565b6000918252602091829020604080516101008082018352929093015460ff8116151580855263ffffffff9382048416958501869052600160281b82048416928501839052600160481b8204841660608601819052600160681b8304851660808701819052600160881b8404861660a08801819052600160a81b8504871660c08901819052600160c81b90950490961660e0909701879052919f50959d50919b5093995097509550909350915050919395975091939597565b600082815260066020526040902060010154611471816132b8565b61126a83836132c2565b6001600160a01b038116600090815260096020526040812054610df390613348565b6001600160a01b038116331461150d5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610fa0565b610fb382826133b8565b3361152182611fbb565b6001600160a01b031614611548576040516336b6b89560e01b815260040160405180910390fd5b6000601d828154811061155d5761155d615599565b6000918252602090912001805490915060ff161561158e57604051635279c13160e01b815260040160405180910390fd5b601b543410156115b15760405163700cff1f60e11b815260040160405180910390fd5b3360009081526009602052604081208054600692906115d1908490615646565b90915550600090506115e23361147b565b90506115fa6115f16009612e9c565b610d608361341f565b825463ffffffff919091166101000264ffffffff001990911617825561162c6116236019612e9c565b610d608361342b565b825463ffffffff91909116600160281b0268ffffffff00000000001990911617825561166461165b6009612e9c565b610d60836132ac565b825463ffffffff91909116600160481b0263ffffffff60481b1990911617825561169a6116916014612e9c565b610d6083612f20565b825463ffffffff91909116600160681b0263ffffffff60681b199091161782556116d06116c76022612e9c565b610d60836130b5565b825463ffffffff91909116600160881b0263ffffffff60881b199091161782556117066116fd600f612e9c565b610d60836130a9565b825463ffffffff91909116600160a81b0263ffffffff60a81b1990911617825561173c611733600e612e9c565b610d6083613437565b825463ffffffff91909116600160c81b0263ffffffff60c81b19909116178255611764611e4e565b825460ff191690151590811780845560408051610100830463ffffffff9081168252600160281b840481166020830152600160481b8404811692820192909252600160681b830482166060820152600160881b830482166080820152600160a81b8304821660a0820152600160c81b9092041660c0820152849160ff161515907f1211258d4c771b371d269a019fabd802479cf996184fbace4b7db22b49dcc38f9060e0015b60405180910390a3505050565b6000601a5434101561183c5760405163700cff1f60e11b815260040160405180910390fd5b600080836001600160a01b0316601a5460405160006040518083038185875af1925050503d806000811461188c576040519150601f19603f3d011682016040523d82523d6000602084013e611891565b606091505b5091509150816118d95760405162461bcd60e51b815260206004820152601360248201527208cc2d2d8cac840e8de40e6cadcc84082ac82b606b1b6044820152606401610fa0565b60006118e460075490565b9050600854811061190857604051632f427b7b60e11b815260040160405180910390fd5b6001600160a01b0385166000908152600c602052604090205460ff1615611967576001600160a01b0385166000908152600b602052604090205460281161196257604051637eb12f4760e11b815260040160405180910390fd5b6119a0565b6001600160a01b0385166000908152600b60205260409020546014116119a057604051637eb12f4760e11b815260040160405180910390fd5b6119aa8582613443565b6001600160a01b0385166000908152600b602052604081208054600192906119d3908490615646565b909155505060078054600101905560006119ec82610e8b565b6001600160a01b031603611a1057601154611a10906001600160a01b031682610eb2565b336000908152600a6020908152604080832080546001908101909155600990925290912080549091019055611a486201518042615659565b6000828152600d6020908152604091829020929092555182815233916001600160a01b038816917f4321221debddb8108d611e58c8f05c6469ebbee15fe5c7e7685acecc504a3a03910160405180910390a360408051610100808201835260008083526002602084019081529383018181526004606085019081526080850183815260a0860184815260c0870185815260e08801868152601d8054600181018255975297517f6d4407e7be21f808e6509aa9fa9143369579dd7d760fe20a2c09680fc146134f9096018054995195519451935192519151985164ffffffffff19909a1696151564ffffffff0019169690961763ffffffff958616909702969096176cffffffffffffffff00000000001916600160281b9385169390930263ffffffff60481b191692909217600160481b918416919091021767ffffffffffffffff60681b1916600160681b9183169190910263ffffffff60881b191617600160881b938216939093029290921767ffffffffffffffff60a81b1916600160a81b9383169390930263ffffffff60c81b191692909217600160c81b9190931602919091179055949350505050565b33611bff82611fbb565b6001600160a01b031614611c26576040516336b6b89560e01b815260040160405180910390fd5b6000601d8281548110611c3b57611c3b615599565b6000918252602090912001805490915060ff1615611c6c57604051635279c13160e01b815260040160405180910390fd5b6000828152600d6020526040902054611c84906135dc565b611ca157604051635d093c8f60e11b815260040160405180910390fd5b6000828152600d60205260408120429055611cbb3361147b565b90506000611ccc610d576014612e9c565b835463ffffffff60681b1916600160681b63ffffffff83160217845560405166115e59549bdb1b60ca1b815290915033906007015b60405180910390208263ffffffff167fb12e1e08e76d714ef63b27c8ca53a47cedc00aa980087dac6b988c929899020f87604051610dda91815260200190565b6000611d4c816132b8565b60005b82811015611e1a576001600c6000868685818110611d6f57611d6f615599565b9050602002016020810190611d849190615305565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055838382818110611dbe57611dbe615599565b9050602002016020810190611dd39190615305565b6001600160a01b03167ffc2e0c2f93b18a680eab6657e8b1471315f3055ba0ffb3af1cfd8ace975349e160405160405180910390a280611e128161566c565b915050611d4f565b50505050565b6000611e2b816132b8565b50601180546001600160a01b0319166001600160a01b0392909216919091179055565b601c546040805160208101929092524490820152426060820152476080820152600090819060a00160408051601f19818403018152919052805160209091012090506000611e9f620186a08361569b565b612710119392505050565b33611eb482611fbb565b6001600160a01b031614611edb576040516336b6b89560e01b815260040160405180910390fd5b6000601d8281548110611ef057611ef0615599565b6000918252602090912001805490915060ff1615611f2157604051635279c13160e01b815260040160405180910390fd5b6000828152600d6020526040902054611f39906135dc565b611f5657604051635d093c8f60e11b815260040160405180910390fd5b6000828152600d60205260408120429055611f703361147b565b90506000611f816111956022612e9c565b835463ffffffff60881b1916600160881b63ffffffff8316021784556040516712185a5c949bdb1b60c21b81529091503390600801611d01565b6000818152600260205260408120546001600160a01b031680610df35760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610fa0565b3361202582611fbb565b6001600160a01b03161461204c576040516336b6b89560e01b815260040160405180910390fd5b6000601d828154811061206157612061615599565b6000918252602090912001805490915060ff161561209257604051635279c13160e01b815260040160405180910390fd5b6000828152600d60205260409020546120aa906135dc565b6120c757604051635d093c8f60e11b815260040160405180910390fd5b6000828152600d602052604081204290556120e13361147b565b905060006120fb6120f26009612e9c565b610d608461341f565b835464ffffffff00191661010063ffffffff8316021784556040516d109858dad9dc9bdd5b99149bdb1b60921b81529091503390600e01611d01565b60006001600160a01b0382166121a15760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610fa0565b506001600160a01b031660009081526003602052604090205490565b336121c782611fbb565b6001600160a01b0316146121ee576040516336b6b89560e01b815260040160405180910390fd5b6000601d828154811061220357612203615599565b6000918252602090912001805490915060ff161561223457604051635279c13160e01b815260040160405180910390fd5b6015543410156122575760405163700cff1f60e11b815260040160405180910390fd5b33600081815260096020526040812080546001019055906122779061147b565b90506000612291612288600e612e9c565b610d6084613437565b835463ffffffff60c81b1916600160c81b63ffffffff83160217845560405168135bdd5d1a149bdb1b60ba1b81529091503390600901610d9a565b606060008267ffffffffffffffff8111156122e9576122e961547d565b604051908082528060200260200182016040528015612312578160200160208202803683370190505b50905060005b83811015612357576123286128b0565b82828151811061233a5761233a615599565b60209081029190910101528061234f8161566c565b915050612318565b5092915050565b3361236882611fbb565b6001600160a01b03161461238f576040516336b6b89560e01b815260040160405180910390fd5b6000601d82815481106123a4576123a4615599565b6000918252602090912001805490915060ff16156123d557604051635279c13160e01b815260040160405180910390fd5b6012543410156123f85760405163700cff1f60e11b815260040160405180910390fd5b33600081815260096020526040812080546001019055906124189061147b565b905060006124296120f26009612e9c565b835464ffffffff00191661010063ffffffff8316021784556040516d109858dad9dc9bdd5b99149bdb1b60921b81529091503390600e01610d9a565b3361246f82611fbb565b6001600160a01b031614612496576040516336b6b89560e01b815260040160405180910390fd5b6000601d82815481106124ab576124ab615599565b6000918252602090912001805490915060ff16156124dc57604051635279c13160e01b815260040160405180910390fd5b6000828152600d60205260409020546124f4906135dc565b61251157604051635d093c8f60e11b815260040160405180910390fd5b6000828152600d6020526040812042905561252b3361147b565b9050600061254561253c6019612e9c565b610d608461342b565b835468ffffffff00000000001916600160281b63ffffffff8316021784556040516810da195cdd149bdb1b60ba1b81529091503390600901611d01565b60009182526006602090815260408084206001600160a01b0393909316845291905290205460ff1690565b606060018054610e08906155af565b610fb33383836135f5565b336125d182611fbb565b6001600160a01b0316146125f8576040516336b6b89560e01b815260040160405180910390fd5b6000601d828154811061260d5761260d615599565b6000918252602090912001805490915060ff161561263e57604051635279c13160e01b815260040160405180910390fd5b6017543410156126615760405163700cff1f60e11b815260040160405180910390fd5b33600081815260096020526040812080546001019055906126819061147b565b9050600061269261253c6019612e9c565b835468ffffffff00000000001916600160281b63ffffffff8316021784556040516810da195cdd149bdb1b60ba1b81529091503390600901610d9a565b601d81815481106126df57600080fd5b60009182526020909120015460ff8116915063ffffffff6101008204811691600160281b8104821691600160481b8204811691600160681b8104821691600160881b8204811691600160a81b8104821691600160c81b9091041688565b3361274682611fbb565b6001600160a01b03161461276d576040516336b6b89560e01b815260040160405180910390fd5b6000601d828154811061278257612782615599565b6000918252602090912001805490915060ff16156127b357604051635279c13160e01b815260040160405180910390fd5b6000828152600d60205260409020546127cb906135dc565b6127e857604051635d093c8f60e11b815260040160405180910390fd5b6000828152600d602052604081204290556128023361147b565b90506000612813612288600e612e9c565b835463ffffffff60c81b1916600160c81b63ffffffff83160217845560405168135bdd5d1a149bdb1b60ba1b81529091503390600901611d01565b61285833836130c1565b6128745760405162461bcd60e51b8152600401610fa0906155e3565b611e1a848484846136bb565b6060610df3826136ee565b6000828152600660205260409020600101546128a6816132b8565b61126a83836133b8565b600033816128bd60075490565b905060085481106128e157604051632f427b7b60e11b815260040160405180910390fd5b6001600160a01b0382166000908152600c602052604090205460ff1615612940576001600160a01b0382166000908152600b602052604090205460281161293b57604051637eb12f4760e11b815260040160405180910390fd5b612979565b6001600160a01b0382166000908152600b602052604090205460141161297957604051637eb12f4760e11b815260040160405180910390fd5b6129838282613443565b600061298e82610e8b565b6001600160a01b0316036129b2576011546129b2906001600160a01b031682610eb2565b6001600160a01b0382166000908152600b602052604081208054600192906129db908490615646565b90915550506007805460010190556129f66201518042615659565b6000828152600d602090815260409182902092909255518281526001600160a01b038416917f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885910160405180910390a260408051610100808201835260008083526002602084019081529383018181526004606085019081526080850183815260a0860184815260c0870185815260e08801868152601d8054600181018255975297517f6d4407e7be21f808e6509aa9fa9143369579dd7d760fe20a2c09680fc146134f9096018054995195519451935192519151985164ffffffffff19909a1696151564ffffffff0019169690961763ffffffff958616909702969096176cffffffffffffffff00000000001916600160281b9385169390930263ffffffff60481b191692909217600160481b918416919091021767ffffffffffffffff60681b1916600160681b9183169190910263ffffffff60881b191617600160881b938216939093029290921767ffffffffffffffff60a81b1916600160a81b9383169390930263ffffffff60c81b191692909217600160c81b919093160291909117905592915050565b6010546001600160a01b0316331480612bc25750600f546001600160a01b031633145b612bcb57600080fd5b4760006064612bdb83605f6156af565b612be591906156c6565b905060006064612bf68460056156af565b612c0091906156c6565b600f546040519192506000916001600160a01b039091169084908381818185875af1925050503d8060008114612c52576040519150601f19603f3d011682016040523d82523d6000602084013e612c57565b606091505b5050905080612ca85760405162461bcd60e51b815260206004820152601860248201527f4661696c656420746f2073656e642061646d696e2063757400000000000000006044820152606401610fa0565b6010546040516000916001600160a01b03169084908381818185875af1925050503d8060008114612cf5576040519150601f19603f3d011682016040523d82523d6000602084013e612cfa565b606091505b5050905080612d4b5760405162461bcd60e51b815260206004820152601960248201527f4661696c656420746f2073656e642061646d696e3220637574000000000000006044820152606401610fa0565b60408051858152602081018590527f4436a492a747a04b3719fd1974f0ad9b8f5a6e7acf23e134d3127f56b9a54d1a910160405180910390a15050505050565b33612d9582611fbb565b6001600160a01b031614612dbc576040516336b6b89560e01b815260040160405180910390fd5b6000601d8281548110612dd157612dd1615599565b6000918252602090912001805490915060ff1615612e0257604051635279c13160e01b815260040160405180910390fd5b6000828152600d6020526040902054612e1a906135dc565b612e3757604051635d093c8f60e11b815260040160405180910390fd5b6000828152600d60205260408120429055612e513361147b565b90506000612e6261133a6009612e9c565b835463ffffffff60481b1916600160481b63ffffffff83160217845560405167139bdcd9549bdb1b60c21b81529091503390600801611d01565b606060008267ffffffffffffffff811115612eb957612eb961547d565b604051908082528060200260200182016040528015612ee2578160200160208202803683370190505b50905060005b838110156123575780828281518110612f0357612f03615599565b602090810291909101015280612f188161566c565b915050612ee8565b60606000612f2c613755565b90506000612f3a8285613a2a565b949350505050565b60008080612f4e613b70565b42601c55905060005b8551811015612fab57848181518110612f7257612f72615599565b602002602001015183612f859190615646565b925081831115612f99579250610df3915050565b80612fa38161566c565b915050612f57565b50505092915050565b60006001600160e01b03198216637965db0b60e01b1480610df35750610df382613c4b565b6000818152600260205260409020546001600160a01b03166130385760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610fa0565b50565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061307082611fbb565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60606000612f2c613c9b565b60606000612f2c613eb1565b6000806130cd83611fbb565b9050806001600160a01b0316846001600160a01b0316148061311457506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b80612f3a5750836001600160a01b031661312d84610e8b565b6001600160a01b031614949350505050565b826001600160a01b031661315282611fbb565b6001600160a01b031614806131785750601154613178906001600160a01b0316826130c1565b6131d65760405162461bcd60e51b815260206004820152602960248201527f57656972644672656e733a207472616e736665722066726f6d20696e636f727260448201526832b1ba1037bbb732b960b91b6064820152608401610fa0565b6001600160a01b0382166132385760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610fa0565b6132458383836001614349565b61325082600161434e565b61325b83600161437f565b6132668184846143a7565b80826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b60606000612f2c614511565b6130388133614660565b6132cc8282612582565b610fb35760008281526006602090815260408083206001600160a01b03851684529091529020805460ff191660011790556133043390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061081682111561335c5750603c919050565b61336782600a615646565b6133729060086156af565b61337d906001615646565b9150613388826146b9565b613393906001615646565b9150600560646133a48460326156af565b6133ae91906156c6565b610df39190615659565b6133c28282612582565b15610fb35760008281526006602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60606000612f2c614729565b60606000612f2c614878565b60606000612f2c614be2565b6001600160a01b0382166134995760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610fa0565b6000818152600260205260409020546001600160a01b0316156134fe5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610fa0565b61350c600083836001614349565b6000818152600260205260409020546001600160a01b0316156135715760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610fa0565b6001600160a01b038216600081815260036020908152604080832080546001019055848352600290915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000600e54826135ec9190615646565b42101592915050565b816001600160a01b0316836001600160a01b0316036136565760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610fa0565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910161180a565b6136c684848461313f565b6136d284848484614ddb565b611e1a5760405162461bcd60e51b8152600401610fa0906156da565b60606136f982612fd9565b6000613703614edc565b90506000815111613723576040518060200160405280600081525061374e565b8061372d84614efc565b60405160200161373e92919061572c565b6040516020818303038152906040525b9392505050565b6040805160148082526102a08201909252606091600091906020820161028080368337019050509050611bbc8160008151811061379457613794615599565b602002602001018181525050611bbc816001815181106137b6576137b6615599565b602002602001018181525050611bbc816002815181106137d8576137d8615599565b602002602001018181525050611bbc816003815181106137fa576137fa615599565b602002602001018181525050611bbc8160048151811061381c5761381c615599565b602002602001018181525050611bbc8160058151811061383e5761383e615599565b60200260200101818152505061170c8160068151811061386057613860615599565b60200260200101818152505061170c8160078151811061388257613882615599565b60200260200101818152505061170c816008815181106138a4576138a4615599565b6020026020010181815250506110cc816009815181106138c6576138c6615599565b6020026020010181815250506110cc81600a815181106138e8576138e8615599565b6020026020010181815250506110cc81600b8151811061390a5761390a615599565b6020026020010181815250506110cc81600c8151811061392c5761392c615599565b6020026020010181815250506110cc81600d8151811061394e5761394e615599565b602002602001018181525050610dac81600e8151811061397057613970615599565b602002602001018181525050610dac81600f8151811061399257613992615599565b602002602001018181525050610dac816010815181106139b4576139b4615599565b602002602001018181525050610dac816011815181106139d6576139d6615599565b602002602001018181525050610834816012815181106139f8576139f8615599565b60200260200101818152505061083481601381518110613a1a57613a1a615599565b6020908102919091010152919050565b6060600060048451613a3c9190615659565b90506000600d825b8651811015613b0c576000610e1083613a5d89806156af565b613a6791906156af565b613a7191906156c6565b613a7c9060646156af565b9050600081898481518110613a9357613a93615599565b6020026020010151613aa59190615646565b9050888381518110613ab957613ab9615599565b602002602001015181613acc9190615659565b613ad69086615646565b945080898481518110613aeb57613aeb615599565b60200260200101818152505050508080613b049061566c565b915050613a44565b506000613b1a6004846156c6565b905060005b6004811015613b645781888281518110613b3b57613b3b615599565b60200260200101818151613b4f9190615659565b90525080613b5c8161566c565b915050613b1f565b50959695505050505050565b601c54604080516020808201939093524481830152426060808301919091524760808301523a60a083015233901b6bffffffffffffffffffffffff191660c0820152815180820360b401815260d490910190915280519101206000907fdd15fe86affad91249ef0eb713f39ebeaa987b6e6fd29fffffffffffffffffff811115613c2357613c1d7e05a8e89d75252446eb5d5d5b1cc5edf20a1a059e10ca000000000000000000826156c6565b91505090565b613c1d7d90e40fbeea1d3a4abc8955e946fe31cdcf66f634e1000000000000000000826156c6565b60006001600160e01b031982166380ac58cd60e01b1480613c7c57506001600160e01b03198216635b5e139f60e01b145b80610df357506301ffc9a760e01b6001600160e01b0319831614610df3565b60408051600f808252610200820190925260609160009190602082016101e08036833701905050905062010d3381600081518110613cdb57613cdb615599565b6020026020010181815250506111c481600181518110613cfd57613cfd615599565b6020026020010181815250506111c481600281518110613d1f57613d1f615599565b6020026020010181815250506111c481600381518110613d4157613d41615599565b6020026020010181815250506111c481600481518110613d6357613d63615599565b602002602001018181525050610c8381600581518110613d8557613d85615599565b602002602001018181525050610c1c81600681518110613da757613da7615599565b602002602001018181525050610c1c81600781518110613dc957613dc9615599565b602002602001018181525050610c1c81600881518110613deb57613deb615599565b602002602001018181525050606481600981518110613e0c57613e0c615599565b602002602001018181525050606481600a81518110613e2d57613e2d615599565b602002602001018181525050606481600b81518110613e4e57613e4e615599565b602002602001018181525050601e81600c81518110613e6f57613e6f615599565b602002602001018181525050601e81600d81518110613e9057613e90615599565b602002602001018181525050601e81600e81518110613a1a57613a1a615599565b60408051602280825261046082019092526060916000919060208201610440803683370190505090506119b481600081518110613ef057613ef0615599565b6020026020010181815250506119b481600181518110613f1257613f12615599565b6020026020010181815250506119b481600281518110613f3457613f34615599565b6020026020010181815250506119b481600381518110613f5657613f56615599565b6020026020010181815250506119b481600481518110613f7857613f78615599565b6020026020010181815250506119b481600581518110613f9a57613f9a615599565b6020026020010181815250506119b481600681518110613fbc57613fbc615599565b6020026020010181815250506115d681600781518110613fde57613fde615599565b602002602001018181525050610c808160088151811061400057614000615599565b602002602001018181525050610c808160098151811061402257614022615599565b602002602001018181525050610c8081600a8151811061404457614044615599565b602002602001018181525050610c8081600b8151811061406657614066615599565b602002602001018181525050610c8081600c8151811061408857614088615599565b602002602001018181525050610c8081600d815181106140aa576140aa615599565b602002602001018181525050610c8081600e815181106140cc576140cc615599565b602002602001018181525050610a8c81600f815181106140ee576140ee615599565b602002602001018181525050610a8c8160108151811061411057614110615599565b602002602001018181525050610a8c8160118151811061413257614132615599565b602002602001018181525050610a8c8160128151811061415457614154615599565b602002602001018181525050610a8c8160138151811061417657614176615599565b602002602001018181525050610a8c8160148151811061419857614198615599565b602002602001018181525050610a8c816015815181106141ba576141ba615599565b602002602001018181525050610834816016815181106141dc576141dc615599565b602002602001018181525050610834816017815181106141fe576141fe615599565b6020026020010181815250506108348160188151811061422057614220615599565b60200260200101818152505060648160198151811061424157614241615599565b602002602001018181525050606481601a8151811061426257614262615599565b602002602001018181525050606481601b8151811061428357614283615599565b602002602001018181525050606481601c815181106142a4576142a4615599565b602002602001018181525050606481601d815181106142c5576142c5615599565b602002602001018181525050606481601e815181106142e6576142e6615599565b602002602001018181525050603281601f8151811061430757614307615599565b60200260200101818152505060328160208151811061432857614328615599565b602002602001018181525050603281602181518110613a1a57613a1a615599565b611e1a565b6001600160a01b03821660009081526003602052604081208054839290614376908490615646565b90915550505050565b6001600160a01b03821660009081526003602052604081208054839290614376908490615659565b6001600160a01b0381166143fd5760405162461bcd60e51b815260206004820152601d60248201527f437573746f6d4552433732313a20496e76616c696420616464726573730000006044820152606401610fa0565b6000838152600260205260409020546001600160a01b031661446f5760405162461bcd60e51b815260206004820152602560248201527f437573746f6d4552433732313a20546f6b656e20494420646f6573206e6f7420604482015264195e1a5cdd60da1b6064820152608401610fa0565b61447982846130c1565b6144e15760405162461bcd60e51b815260206004820152603360248201527f437573746f6d4552433732313a2063616c6c6572206973206e6f7420746f6b656044820152721b881bdddb995c881bdc88185c1c1c9bdd9959606a1b6064820152608401610fa0565b60009283526002602052604090922080546001600160a01b0319166001600160a01b039093169290921790915550565b6040805160098082526101408201909252606091600091906020820161012080368337019050509050612b688160008151811061455057614550615599565b602002602001018181525050612b678160018151811061457257614572615599565b602002602001018181525050612b678160028151811061459457614594615599565b602002602001018181525050612b67816003815181106145b6576145b6615599565b602002602001018181525050612b67816004815181106145d8576145d8615599565b602002602001018181525050612b67816005815181106145fa576145fa615599565b602002602001018181525050612b678160068151811061461c5761461c615599565b602002602001018181525050612b678160078151811061463e5761463e615599565b602002602001018181525050612b6781600881518110613a1a57613a1a615599565b61466a8282612582565b610fb35761467781614f8f565b614682836020614fa1565b60405160200161469392919061575b565b60408051601f198184030181529082905262461bcd60e51b8252610fa0916004016152b1565b6000600382111561471a57508060006146d36002836156c6565b6146de906001615646565b90505b81811015614714579050806002816146f981866156c6565b6147039190615646565b61470d91906156c6565b90506146e1565b50919050565b8115614724575060015b919050565b6040805160098082526101408201909252606091600091906020820161012080368337019050509050614c2c8160008151811061476857614768615599565b602002602001018181525050614c2c8160018151811061478a5761478a615599565b602002602001018181525050614c2c816002815181106147ac576147ac615599565b602002602001018181525050614c2c816003815181106147ce576147ce615599565b602002602001018181525050611130816004815181106147f0576147f0615599565b6020026020010181815250506111308160058151811061481257614812615599565b6020026020010181815250506111308160068151811061483457614834615599565b6020026020010181815250506111308160078151811061485657614856615599565b60200260200101818152505061113081600881518110613a1a57613a1a615599565b6040805160198082526103408201909252606091600091906020820161032080368337019050509050611af4816000815181106148b7576148b7615599565b602002602001018181525050611af4816001815181106148d9576148d9615599565b602002602001018181525050611af4816002815181106148fb576148fb615599565b602002602001018181525050611af48160038151811061491d5761491d615599565b602002602001018181525050611af48160048151811061493f5761493f615599565b6020026020010181815250506116a88160058151811061496157614961615599565b6020026020010181815250506112c08160068151811061498357614983615599565b6020026020010181815250506112c0816007815181106149a5576149a5615599565b6020026020010181815250506112c0816008815181106149c7576149c7615599565b6020026020010181815250506112c0816009815181106149e9576149e9615599565b6020026020010181815250506112c081600a81518110614a0b57614a0b615599565b6020026020010181815250506112c081600b81518110614a2d57614a2d615599565b602002602001018181525050610ed881600c81518110614a4f57614a4f615599565b602002602001018181525050610ed881600d81518110614a7157614a71615599565b602002602001018181525050610ed881600e81518110614a9357614a93615599565b602002602001018181525050610ed881600f81518110614ab557614ab5615599565b602002602001018181525050610ed881601081518110614ad757614ad7615599565b602002602001018181525050610ed881601181518110614af957614af9615599565b602002602001018181525050610ed881601281518110614b1b57614b1b615599565b602002602001018181525050610ed881601381518110614b3d57614b3d615599565b602002602001018181525050606481601481518110614b5e57614b5e615599565b602002602001018181525050606481601581518110614b7f57614b7f615599565b602002602001018181525050606481601681518110614ba057614ba0615599565b602002602001018181525050606481601781518110614bc157614bc1615599565b602002602001018181525050606481601881518110613a1a57613a1a615599565b60408051600e8082526101e0820190925260609160009190602082016101c08036833701905050905061245481600081518110614c2157614c21615599565b60200260200101818152505061245481600181518110614c4357614c43615599565b60200260200101818152505061245481600281518110614c6557614c65615599565b60200260200101818152505061245481600381518110614c8757614c87615599565b60200260200101818152505061245481600481518110614ca957614ca9615599565b60200260200101818152505061245481600581518110614ccb57614ccb615599565b6020026020010181815250506123f081600681518110614ced57614ced615599565b6020026020010181815250506123f081600781518110614d0f57614d0f615599565b6020026020010181815250506123f081600881518110614d3157614d31615599565b60200260200101818152505061170c81600981518110614d5357614d53615599565b60200260200101818152505061170c81600a81518110614d7557614d75615599565b60200260200101818152505061064081600b81518110614d9757614d97615599565b60200260200101818152505061064081600c81518110614db957614db9615599565b60200260200101818152505061064081600d81518110613a1a57613a1a615599565b60006001600160a01b0384163b15614ed157604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290614e1f9033908990889088906004016157d0565b6020604051808303816000875af1925050508015614e5a575060408051601f3d908101601f19168201909252614e579181019061580d565b60015b614eb7573d808015614e88576040519150601f19603f3d011682016040523d82523d6000602084013e614e8d565b606091505b508051600003614eaf5760405162461bcd60e51b8152600401610fa0906156da565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612f3a565b506001949350505050565b606060405180606001604052806021815260200161584260219139905090565b60606000614f098361513d565b600101905060008167ffffffffffffffff811115614f2957614f2961547d565b6040519080825280601f01601f191660200182016040528015614f53576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084614f5d57509392505050565b6060610df36001600160a01b03831660145b60606000614fb08360026156af565b614fbb906002615646565b67ffffffffffffffff811115614fd357614fd361547d565b6040519080825280601f01601f191660200182016040528015614ffd576020820181803683370190505b509050600360fc1b8160008151811061501857615018615599565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061504757615047615599565b60200101906001600160f81b031916908160001a905350600061506b8460026156af565b615076906001615646565b90505b60018111156150ee576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106150aa576150aa615599565b1a60f81b8282815181106150c0576150c0615599565b60200101906001600160f81b031916908160001a90535060049490941c936150e78161582a565b9050615079565b50831561374e5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610fa0565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b831061517c5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef810000000083106151a8576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106151c657662386f26fc10000830492506010015b6305f5e10083106151de576305f5e100830492506008015b61271083106151f257612710830492506004015b60648310615204576064830492506002015b600a8310610df35760010192915050565b60006020828403121561522757600080fd5b5035919050565b6001600160e01b03198116811461303857600080fd5b60006020828403121561525657600080fd5b813561374e8161522e565b60005b8381101561527c578181015183820152602001615264565b50506000910152565b6000815180845261529d816020860160208601615261565b601f01601f19169290920160200192915050565b60208152600061374e6020830184615285565b80356001600160a01b038116811461472457600080fd5b600080604083850312156152ee57600080fd5b6152f7836152c4565b946020939093013593505050565b60006020828403121561531757600080fd5b61374e826152c4565b60008060006060848603121561533557600080fd5b61533e846152c4565b925061534c602085016152c4565b9150604084013590509250925092565b6000806040838503121561536f57600080fd5b8235915061537f602084016152c4565b90509250929050565b6000806020838503121561539b57600080fd5b823567ffffffffffffffff808211156153b357600080fd5b818501915085601f8301126153c757600080fd5b8135818111156153d657600080fd5b8660208260051b85010111156153eb57600080fd5b60209290920196919550909350505050565b6020808252825182820181905260009190848201906040850190845b8181101561543557835183529284019291840191600101615419565b50909695505050505050565b6000806040838503121561545457600080fd5b61545d836152c4565b91506020830135801515811461547257600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600080600080608085870312156154a957600080fd5b6154b2856152c4565b93506154c0602086016152c4565b925060408501359150606085013567ffffffffffffffff808211156154e457600080fd5b818701915087601f8301126154f857600080fd5b81358181111561550a5761550a61547d565b604051601f8201601f19908116603f011681019083821181831017156155325761553261547d565b816040528281528a602084870101111561554b57600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b6000806040838503121561558257600080fd5b61558b836152c4565b915061537f602084016152c4565b634e487b7160e01b600052603260045260246000fd5b600181811c908216806155c357607f821691505b60208210810361471457634e487b7160e01b600052602260045260246000fd5b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b80820180821115610df357610df3615630565b81810381811115610df357610df3615630565b60006001820161567e5761567e615630565b5060010190565b634e487b7160e01b600052601260045260246000fd5b6000826156aa576156aa615685565b500690565b8082028115828204841417610df357610df3615630565b6000826156d5576156d5615685565b500490565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6000835161573e818460208801615261565b835190830190615752818360208801615261565b01949350505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351615793816017850160208801615261565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516157c4816028840160208801615261565b01602801949350505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061580390830184615285565b9695505050505050565b60006020828403121561581f57600080fd5b815161374e8161522e565b60008161583957615839615630565b50600019019056fe68747470733a2f2f77656972646672656e732e636f6d2f6170692f746f6b656e2fa2646970667358221220a360bf93a6a7945836485d9a6cbe1f1006fd14ccece2a8596cdf1685230a006d64736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000098f6f0acf500330f605c3fd335ab3957d4442ba7000000000000000000000000198277c5b6230010a0f1c49823b6430bda033448
-----Decoded View---------------
Arg [0] : adminAddress (address): 0x98F6f0aCF500330F605C3fd335aB3957d4442Ba7
Arg [1] : admin2Address (address): 0x198277C5b6230010A0F1C49823b6430bDa033448
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000098f6f0acf500330f605c3fd335ab3957d4442ba7
Arg [1] : 000000000000000000000000198277c5b6230010a0f1c49823b6430bda033448
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
AVAX | 100.00% | $22.26 | 0.5 | $11.13 |
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.