ERC-721
NFT
Overview
Max Total Supply
46,169 WnD
Holders
3,631
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
7 WnDLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
WnD
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT LICENSE pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "./interfaces/IWnD.sol"; import "./interfaces/ITower.sol"; import "./interfaces/ITraits.sol"; import "./interfaces/IGP.sol"; import "./interfaces/IRandomizer.sol"; contract WnD is IWnD, ERC721Enumerable, Ownable, Pausable { struct LastWrite { uint64 time; uint64 blockNum; } event WizardMinted(uint256 indexed tokenId); event DragonMinted(uint256 indexed tokenId); event WizardStolen(uint256 indexed tokenId); event DragonStolen(uint256 indexed tokenId); event WizardBurned(uint256 indexed tokenId); event DragonBurned(uint256 indexed tokenId); // max number of tokens that can be minted: 60000 in production uint256 public maxTokens; // number of tokens that can be claimed for a fee: 15,000 uint256 public PAID_TOKENS; // number of tokens have been minted so far uint16 public override minted; // mapping from tokenId to a struct containing the token's traits mapping(uint256 => WizardDragon) private tokenTraits; // mapping from hashed(tokenTrait) to the tokenId it's associated with // used to ensure there are no duplicates mapping(uint256 => uint256) public existingCombinations; // Tracks the last block and timestamp that a caller has written to state. // Disallow some access to functions if they occur while a change is being written. mapping(address => LastWrite) private lastWriteAddress; mapping(uint256 => LastWrite) private lastWriteToken; // list of probabilities for each trait type // 0 - 9 are associated with Wizard, 10 - 18 are associated with Dragons uint8[][18] public rarities; // list of aliases for Walker's Alias algorithm // 0 - 9 are associated with Wizard, 10 - 18 are associated with Dragons uint8[][18] public aliases; // reference to the Tower contract to allow transfers to it without approval ITower public tower; // reference to Traits ITraits public traits; // reference to Randomizer IRandomizer public randomizer; // address => allowedToCallFunctions mapping(address => bool) private admins; constructor(uint256 _maxTokens) ERC721("Wizards & Dragons Game", "WnD") { maxTokens = _maxTokens; PAID_TOKENS = _maxTokens / 4; _pause(); // A.J. Walker's Alias Algorithm // Wizards // body rarities[0] = [80, 150, 200, 250, 255]; aliases[0] = [4, 4, 4, 4, 4]; // head rarities[1] = [150, 40, 240, 90, 115, 135, 40, 199, 100]; aliases[1] = [3, 7, 4, 0, 5, 6, 8, 5, 0]; // spell rarities[2] = [255, 135, 60, 130, 190, 156, 250, 120, 60, 25, 190]; aliases[2] = [0, 0, 0, 6, 6, 0, 0, 0, 6, 8, 0]; // eyes rarities[3] = [221, 100, 181, 140, 224, 147, 84, 228, 140, 224, 250, 160, 241, 207, 173, 84, 254]; aliases[3] = [1, 2, 5, 0, 1, 7, 1, 10, 5, 10, 11, 12, 13, 14, 16, 11, 0]; // neck rarities[4] = [175, 100, 40, 250, 115, 100, 80, 110, 180, 255, 210, 180]; aliases[4] = [3, 0, 4, 1, 11, 7, 8, 10, 9, 9, 8, 8]; // mouth rarities[5] = [80, 225, 220, 35, 100, 240, 70, 160, 175, 217, 175, 60]; aliases[5] = [1, 2, 5, 8, 2, 8, 8, 9, 9, 10, 7, 10]; // neck rarities[6] = [255]; aliases[6] = [0]; // wand rarities[7] = [243, 189, 50, 30, 55, 180, 80, 90, 155, 30, 222, 255]; aliases[7] = [1, 7, 5, 2, 11, 11, 0, 10, 0, 0, 11, 3]; // rankIndex rarities[8] = [255]; aliases[8] = [0]; // Dragons // body rarities[9] = [100, 80, 177, 199, 255, 40, 211, 177, 25, 230, 90, 130, 199, 230]; aliases[9] = [4, 3, 3, 4, 4, 13, 9, 1, 2, 5, 13, 0, 6, 12]; // head rarities[10] = [255]; aliases[10] = [0]; // spell rarities[11] = [255]; aliases[11] = [0]; // eyes rarities[12] = [90, 40, 219, 80, 183, 225, 40, 120, 60, 220]; aliases[12] = [1, 8, 3, 2, 5, 6, 5, 9, 4, 3]; // nose rarities[13] = [255]; aliases[13] = [0]; // mouth rarities[14] = [239, 244, 255, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234]; aliases[14] = [1, 2, 2, 0, 2, 2, 9, 0, 5, 4, 4, 4, 4, 4]; // tails rarities[15] = [80, 200, 144, 145, 80, 140, 120]; aliases[15] = [1, 6, 0, 0, 3, 0, 3]; // wand rarities[16] = [255]; aliases[16] = [0]; // rankIndex rarities[17] = [14, 155, 80, 255]; aliases[17] = [2, 3, 3, 3]; } /** CRITICAL TO SETUP / MODIFIERS */ modifier requireContractsSet() { require(address(traits) != address(0) && address(tower) != address(0) && address(randomizer) != address(0), "Contracts not set"); _; } modifier blockIfChangingAddress() { // frens can always call whenever they want :) require(admins[_msgSender()] || lastWriteAddress[tx.origin].blockNum < block.number, "hmmmm what doing?"); _; } modifier blockIfChangingToken(uint256 tokenId) { // frens can always call whenever they want :) require(admins[_msgSender()] || lastWriteToken[tokenId].blockNum < block.number, "hmmmm what doing?"); _; } function setContracts(address _traits, address _tower, address _rand) external onlyOwner { traits = ITraits(_traits); tower = ITower(_tower); randomizer = IRandomizer(_rand); } /** EXTERNAL */ function getTokenWriteBlock(uint256 tokenId) external view override returns(uint64) { require(admins[_msgSender()], "Only admins can call this"); return lastWriteToken[tokenId].blockNum; } /** * Mint a token - any payment / game logic should be handled in the game contract. * This will just generate random traits and mint a token to a designated address. */ function mint(address recipient, uint256 seed) external override whenNotPaused { require(admins[_msgSender()], "Only admins can call this"); require(minted + 1 <= maxTokens, "All tokens minted"); minted++; generate(minted, seed, lastWriteAddress[tx.origin]); if(tx.origin != recipient && recipient != address(tower)) { // Stolen! if(tokenTraits[minted].isWizard) { emit WizardStolen(minted); } else { emit DragonStolen(minted); } } _safeMint(recipient, minted); } /** * Burn a token - any game logic should be handled before this function. */ function burn(uint256 tokenId) external override whenNotPaused { require(admins[_msgSender()], "Only admins can call this"); require(ownerOf(tokenId) == tx.origin, "Oops you don't own that"); if(tokenTraits[tokenId].isWizard) { emit WizardBurned(tokenId); } else { emit DragonBurned(tokenId); } _burn(tokenId); } function updateOriginAccess(uint16[] memory tokenIds) external override { require(admins[_msgSender()], "Only admins can call this"); uint64 blockNum = uint64(block.number); uint64 time = uint64(block.timestamp); lastWriteAddress[tx.origin] = LastWrite(time, blockNum); for (uint256 i = 0; i < tokenIds.length; i++) { lastWriteToken[tokenIds[i]] = LastWrite(time, blockNum); } } function transferFrom( address from, address to, uint256 tokenId ) public virtual override(ERC721, IERC721) blockIfChangingToken(tokenId) { // allow admin contracts to be send without approval if(!admins[_msgSender()]) { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); } _transfer(from, to, tokenId); } /** INTERNAL */ /** * generates traits for a specific token, checking to make sure it's unique * @param tokenId the id of the token to generate traits for * @param seed a pseudorandom 256 bit number to derive traits from * @return t - a struct of traits for the given token ID */ function generate(uint256 tokenId, uint256 seed, LastWrite memory lw) internal returns (WizardDragon memory t) { t = selectTraits(seed); if (existingCombinations[structToHash(t)] == 0) { tokenTraits[tokenId] = t; existingCombinations[structToHash(t)] = tokenId; if(t.isWizard) { emit WizardMinted(tokenId); } else { emit DragonMinted(tokenId); } return t; } return generate(tokenId, randomizer.random(), lw); } /** * uses A.J. Walker's Alias algorithm for O(1) rarity table lookup * ensuring O(1) instead of O(n) reduces mint cost by more than 50% * probability & alias tables are generated off-chain beforehand * @param seed portion of the 256 bit seed to remove trait correlation * @param traitType the trait type to select a trait for * @return the ID of the randomly selected trait */ function selectTrait(uint16 seed, uint8 traitType) internal view returns (uint8) { uint8 trait = uint8(seed) % uint8(rarities[traitType].length); // If a selected random trait probability is selected (biased coin) return that trait if (seed >> 8 < rarities[traitType][trait]) return trait; return aliases[traitType][trait]; } /** * selects the species and all of its traits based on the seed value * @param seed a pseudorandom 256 bit number to derive traits from * @return t - a struct of randomly selected traits */ function selectTraits(uint256 seed) internal view returns (WizardDragon memory t) { t.isWizard = (seed & 0xFFFF) % 10 != 0; uint8 shift = t.isWizard ? 0 : 9; seed >>= 16; t.body = selectTrait(uint16(seed & 0xFFFF), 0 + shift); seed >>= 16; t.head = selectTrait(uint16(seed & 0xFFFF), 1 + shift); seed >>= 16; t.spell = selectTrait(uint16(seed & 0xFFFF), 2 + shift); seed >>= 16; t.eyes = selectTrait(uint16(seed & 0xFFFF), 3 + shift); seed >>= 16; t.neck = selectTrait(uint16(seed & 0xFFFF), 4 + shift); seed >>= 16; t.mouth = selectTrait(uint16(seed & 0xFFFF), 5 + shift); seed >>= 16; t.tail = selectTrait(uint16(seed & 0xFFFF), 6 + shift); seed >>= 16; t.wand = selectTrait(uint16(seed & 0xFFFF), 7 + shift); seed >>= 16; t.rankIndex = selectTrait(uint16(seed & 0xFFFF), 8 + shift); } /** * converts a struct to a 256 bit hash to check for uniqueness * @param s the struct to pack into a hash * @return the 256 bit hash of the struct */ function structToHash(WizardDragon memory s) internal pure returns (uint256) { return uint256(keccak256( abi.encodePacked( s.isWizard, s.body, s.head, s.spell, s.eyes, s.neck, s.mouth, s.tail, s.wand, s.rankIndex ) )); } /** READ */ /** * checks if a token is a Wizards * @param tokenId the ID of the token to check * @return wizard - whether or not a token is a Wizards */ function isWizard(uint256 tokenId) external view override blockIfChangingToken(tokenId) returns (bool) { // Sneaky dragons will be slain if they try to peep this after mint. Nice try. IWnD.WizardDragon memory s = tokenTraits[tokenId]; return s.isWizard; } function getMaxTokens() external view override returns (uint256) { return maxTokens; } function getPaidTokens() external view override returns (uint256) { return PAID_TOKENS; } /** ADMIN */ /** * updates the number of tokens for sale */ function setPaidTokens(uint256 _paidTokens) external onlyOwner { PAID_TOKENS = uint16(_paidTokens); } /** * enables owner to pause / unpause minting */ function setPaused(bool _paused) external requireContractsSet onlyOwner { if (_paused) _pause(); else _unpause(); } /** * enables an address to mint / burn * @param addr the address to enable */ function addAdmin(address addr) external onlyOwner { admins[addr] = true; } /** * disables an address from minting / burning * @param addr the address to disbale */ function removeAdmin(address addr) external onlyOwner { admins[addr] = false; } /** Traits */ function getTokenTraits(uint256 tokenId) external view override blockIfChangingAddress blockIfChangingToken(tokenId) returns (WizardDragon memory) { return tokenTraits[tokenId]; } function tokenURI(uint256 tokenId) public view override blockIfChangingAddress blockIfChangingToken(tokenId) returns (string memory) { require(_exists(tokenId), "Token ID does not exist"); return traits.tokenURI(tokenId); } /** OVERRIDES FOR SAFETY */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override(ERC721Enumerable, IERC721Enumerable) blockIfChangingAddress returns (uint256) { // Y U checking on this address in the same block it's being modified... hmmmm require(admins[_msgSender()] || lastWriteAddress[owner].blockNum < block.number, "hmmmm what doing?"); uint256 tokenId = super.tokenOfOwnerByIndex(owner, index); require(admins[_msgSender()] || lastWriteToken[tokenId].blockNum < block.number, "hmmmm what doing?"); return tokenId; } function balanceOf(address owner) public view virtual override(ERC721, IERC721) blockIfChangingAddress returns (uint256) { // Y U checking on this address in the same block it's being modified... hmmmm require(admins[_msgSender()] || lastWriteAddress[owner].blockNum < block.number, "hmmmm what doing?"); return super.balanceOf(owner); } function ownerOf(uint256 tokenId) public view virtual override(ERC721, IERC721) blockIfChangingAddress blockIfChangingToken(tokenId) returns (address) { address addr = super.ownerOf(tokenId); // Y U checking on this address in the same block it's being modified... hmmmm require(admins[_msgSender()] || lastWriteAddress[addr].blockNum < block.number, "hmmmm what doing?"); return addr; } function tokenByIndex(uint256 index) public view virtual override(ERC721Enumerable, IERC721Enumerable) returns (uint256) { uint256 tokenId = super.tokenByIndex(index); // NICE TRY TOAD DRAGON require(admins[_msgSender()] || lastWriteToken[tokenId].blockNum < block.number, "hmmmm what doing?"); return tokenId; } function approve(address to, uint256 tokenId) public virtual override(ERC721, IERC721) blockIfChangingToken(tokenId) { super.approve(to, tokenId); } function getApproved(uint256 tokenId) public view virtual override(ERC721, IERC721) blockIfChangingToken(tokenId) returns (address) { return super.getApproved(tokenId); } function setApprovalForAll(address operator, bool approved) public virtual override(ERC721, IERC721) blockIfChangingAddress { super.setApprovalForAll(operator, approved); } function isApprovedForAll(address owner, address operator) public view virtual override(ERC721, IERC721) blockIfChangingAddress returns (bool) { return super.isApprovedForAll(owner, operator); } function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override(ERC721, IERC721) blockIfChangingToken(tokenId) { super.safeTransferFrom(from, to, tokenId); } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override(ERC721, IERC721) blockIfChangingToken(tokenId) { super.safeTransferFrom(from, to, tokenId, _data); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _setOwner(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _setOwner(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../ERC721.sol"; import "./IERC721Enumerable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } }
// SPDX-License-Identifier: MIT LICENSE pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; interface IWnD is IERC721Enumerable { // game data storage struct WizardDragon { bool isWizard; uint8 body; uint8 head; uint8 spell; uint8 eyes; uint8 neck; uint8 mouth; uint8 wand; uint8 tail; uint8 rankIndex; } function minted() external returns (uint16); function updateOriginAccess(uint16[] memory tokenIds) external; function mint(address recipient, uint256 seed) external; function burn(uint256 tokenId) external; function getMaxTokens() external view returns (uint256); function getPaidTokens() external view returns (uint256); function getTokenTraits(uint256 tokenId) external view returns (WizardDragon memory); function getTokenWriteBlock(uint256 tokenId) external view returns(uint64); function isWizard(uint256 tokenId) external view returns(bool); }
// SPDX-License-Identifier: MIT LICENSE pragma solidity ^0.8.0; interface ITower { function addManyToTowerAndFlight(address account, uint16[] calldata tokenIds) external; function randomDragonOwner(uint256 seed) external view returns (address); }
// SPDX-License-Identifier: MIT LICENSE pragma solidity ^0.8.0; interface ITraits { function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT LICENSE pragma solidity ^0.8.0; interface IGP { function mint(address to, uint256 amount) external; function burn(address from, uint256 amount) external; function updateOriginAccess() external; function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); }
pragma solidity ^0.8.0; interface IRandomizer { function random() external returns (uint256); }
// SPDX-License-Identifier: MIT 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 pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { require(operator != _msgSender(), "ERC721: approve to caller"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT 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 pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT 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 pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"uint256","name":"_maxTokens","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"DragonBurned","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"DragonMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"DragonStolen","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"WizardBurned","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"WizardMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"WizardStolen","type":"event"},{"inputs":[],"name":"PAID_TOKENS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"addAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"aliases","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"existingCombinations","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":[],"name":"getMaxTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPaidTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTokenTraits","outputs":[{"components":[{"internalType":"bool","name":"isWizard","type":"bool"},{"internalType":"uint8","name":"body","type":"uint8"},{"internalType":"uint8","name":"head","type":"uint8"},{"internalType":"uint8","name":"spell","type":"uint8"},{"internalType":"uint8","name":"eyes","type":"uint8"},{"internalType":"uint8","name":"neck","type":"uint8"},{"internalType":"uint8","name":"mouth","type":"uint8"},{"internalType":"uint8","name":"wand","type":"uint8"},{"internalType":"uint8","name":"tail","type":"uint8"},{"internalType":"uint8","name":"rankIndex","type":"uint8"}],"internalType":"struct IWnD.WizardDragon","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTokenWriteBlock","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"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":"uint256","name":"tokenId","type":"uint256"}],"name":"isWizard","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"seed","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"minted","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"randomizer","outputs":[{"internalType":"contract IRandomizer","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"rarities","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"removeAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_traits","type":"address"},{"internalType":"address","name":"_tower","type":"address"},{"internalType":"address","name":"_rand","type":"address"}],"name":"setContracts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_paidTokens","type":"uint256"}],"name":"setPaidTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_paused","type":"bool"}],"name":"setPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tower","outputs":[{"internalType":"contract ITower","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"traits","outputs":[{"internalType":"contract ITraits","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16[]","name":"tokenIds","type":"uint16[]"}],"name":"updateOriginAccess","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b50604051620046de380380620046de833981016040819052620000349162000ec2565b604080518082018252601681527f57697a61726473202620447261676f6e732047616d650000000000000000000060208083019182528351808501909452600384526215db9160ea1b908401528151919291620000949160009162000d79565b508051620000aa90600190602084019062000d79565b505050620000c7620000c162000c7160201b60201c565b62000c75565b600a805460ff60a01b19169055600b819055620000e660048262000edb565b600c55620000f362000cc7565b6040805160a081018252605081526096602082015260c89181019190915260fa606082015260ff60808201526200012f90601290600562000e08565b506040805160a0810182526004808252602082018190529181018290526060810182905260808101919091526200016b90602490600562000e08565b5060408051610120810182526096815260286020820181905260f092820192909252605a606082015260736080820152608760a082015260c081019190915260c760e08201526064610100820152620001c990601390600962000e08565b5060408051610120810182526003815260076020820152600491810191909152600060608201819052600560808301819052600660a0840152600860c084015260e08301526101008201526200022490602590600962000e08565b50604080516101608101825260ff815260876020820152603c9181018290526082606082015260be60808201819052609c60a083015260fa60c0830152607860e083015261010082019290925260196101208201526101408101919091526200029290601490600b62000e08565b5060408051610160810182526000808252602082018190529181018290526006606082018190526080820181905260a0820183905260c0820183905260e082018390526101008201526008610120820152610140810191909152620002fc90602690600b62000e08565b50604080516102208101825260dd81526064602082015260b591810191909152608c6060820181905260e060808301819052609360a080850191909152605460c0850181905260e48386015261010085019390935261012084019190915260fa61014084015261016083015260f161018083015260cf6101a083015260ad6101c08301526101e082015260fe6102008201526200039e90601590601162000e08565b506040805161022081018252600180825260026020830152600592820183905260006060830181905260808301829052600760a084015260c0830191909152600a60e08301819052610100830193909352610120820192909252600b6101408201819052600c610160830152600d610180830152600e6101a083015260106101c08301526101e08201526102008101919091526200044190602790601162000e08565b50604080516101808101825260af815260646020820181905260289282019290925260fa60608201526073608082015260a0810191909152605060c0820152606e60e082015260b4610100820181905260ff61012083015260d2610140830152610160820152620004b790601690600c62000e08565b506040805161018081018252600381526000602082015260049181019190915260016060820152600b6080820152600760a0820152600860c08201819052600a60e08301526009610100830181905261012083015261014082018190526101608201526200052a90602890600c62000e08565b5060408051610180810182526050815260e1602082015260dc91810191909152602360608201526064608082015260f060a080830191909152604660c083015260e082015260af610100820181905260d9610120830152610140820152603c6101608201526200059f90601790600c62000e08565b506040805161018081018252600181526002602082018190526005928201839052600860608301819052608083019190915260a0820181905260c0820152600960e08201819052610100820152600a61012082018190526007610140830152610160820152906024906200061892910190600c62000e08565b50604080516020810190915260ff81526200063890601890600162000e08565b506040805160208101909152600081526200065890602a90600162000e08565b50604080516101808101825260f3815260bd6020820152603291810191909152601e606082018190526037608083015260b460a0830152605060c0830152605a60e0830152609b61010083015261012082015260de61014082015260ff610160820152620006cb90601990600c62000e08565b506040805161018081018252600181526007602082015260059181019190915260026060820152600b6080820181905260a08201819052600060c08301819052600a60e0840152610100830181905261012083015261014082015260036101608201526200073e90602b90600c62000e08565b50604080516020810190915260ff81526200075e90601a90600162000e08565b506040805160208101909152600081526200077e90602c90600162000e08565b50604080516101c081018252606481526050602082015260b191810182905260c76060820181905260ff6080830152602860a083015260d360c083015260e0820192909252601961010082015260e66101208201819052605a61014083015260826101608301526101808201929092526101a08101919091526200080790601b90600e62000e08565b50604080516101c081018252600480825260036020830181905292820192909252606081018290526080810191909152600d60a08201819052600960c0830152600160e08301526002610100830152600561012083015261014082015260006101608201526006610180820152600c6101a08201526200088c90602d90600e62000e08565b50604080516020810190915260ff8152620008ac90601c90600162000e08565b50604080516020810190915260008152620008cc90602e90600162000e08565b50604080516020810190915260ff8152620008ec90601d90600162000e08565b506040805160208101909152600081526200090c90602f90600162000e08565b506040805161014081018252605a815260286020820181905260db928201929092526050606082015260b7608082015260e160a082015260c0810191909152607860e0820152603c61010082015260dc6101208201526200097290601e90600a62000e08565b5060408051610140810182526001815260086020820152600391810182905260026060820152600560808201819052600660a083015260c0820152600960e08201526004610100820152610120810191909152620009d590603090600a62000e08565b50604080516020810190915260ff8152620009f590601f90600162000e08565b5060408051602081019091526000815262000a1590603190600162000e08565b50604080516101c08101825260ef815260f4602082015260ff9181019190915260ea606082018190526080820181905260a0820181905260c0820181905260e08201819052610100820181905261012082018190526101408201819052610160820181905261018082018190526101a08201526012600e62000a9c92910190600e62000e08565b50604080516101c081018252600181526002602082018190529181018290526000606082018190526080820183905260a0820192909252600960c082015260e08101919091526005610100820152600461012082018190526101408201819052610160820181905261018082018190526101a082015262000b2290603290600e62000e08565b506040805160e081018252605080825260c86020830152609092820192909252609160608201526080810191909152608c60a0820152607860c082015262000b6f90602190600762000e08565b506040805160e081018252600181526006602082015260009181018290526060810182905260036080820181905260a082019290925260c081019190915262000bbd90603390600762000e08565b50604080516020810190915260ff815262000bdd90602290600162000e08565b5060408051602081019091526000815262000bfd90603490600162000e08565b5060408051608081018252600e8152609b602082015260509181019190915260ff606082015262000c3390602390600462000e08565b506040805160808101825260028152600360208201819052918101829052606081019190915262000c6990603590600462000e08565b505062000f39565b3390565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b62000cdb600a54600160a01b900460ff1690565b1562000d205760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640160405180910390fd5b600a805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25862000d5c3390565b6040516001600160a01b03909116815260200160405180910390a1565b82805462000d879062000efc565b90600052602060002090601f01602090048101928262000dab576000855562000df6565b82601f1062000dc657805160ff191683800117855562000df6565b8280016001018555821562000df6579182015b8281111562000df657825182559160200191906001019062000dd9565b5062000e0492915062000eab565b5090565b82805482825590600052602060002090601f0160209004810192821562000df65791602002820160005b8382111562000e7257835183826101000a81548160ff021916908360ff160217905550926020019260010160208160000104928301926001030262000e32565b801562000ea15782816101000a81549060ff021916905560010160208160000104928301926001030262000e72565b505062000e049291505b5b8082111562000e04576000815560010162000eac565b60006020828403121562000ed4578081fd5b5051919050565b60008262000ef757634e487b7160e01b81526012600452602481fd5b500490565b600181811c9082168062000f1157607f821691505b6020821081141562000f3357634e487b7160e01b600052602260045260246000fd5b50919050565b6137958062000f496000396000f3fe608060405234801561001057600080fd5b506004361061025e5760003560e01c80636abcded111610146578063b88d4fde116100c3578063e831574211610087578063e831574214610540578063e985e9c514610549578063ebd173681461055c578063f10fb58414610587578063f2fde38b1461059a578063ff53f473146105ad57600080fd5b8063b88d4fde146104eb578063c084f540146104fe578063c87b56dd14610507578063ca14df4f1461051a578063e1fc334f1461052d57600080fd5b806394e568471161010a57806394e568471461047d57806395d89b411461049d578063a1b8f374146104a5578063a22cb465146104c5578063b3066d49146104d857600080fd5b80636abcded114610436578063704802751461043e57806370a0823114610451578063715018a6146104645780638da5cb5b1461046c57600080fd5b80633431a753116101df57806342842e0e116101a357806342842e0e146103b757806342966c68146103ca5780634f02c420146103dd5780634f6ccce7146103fe5780635c975abb146104115780636352211e1461042357600080fd5b80633431a7531461036357806335ca838b1461037657806336838391146103895780634018b1f81461039c57806340c10f19146103a457600080fd5b80631785f53c116102265780631785f53c146102f357806318160ddd1461030657806323b872dd146103185780632f745c591461032b57806333df4b2c1461033e57600080fd5b806301ffc9a71461026357806306fdde031461028b578063081812fc146102a0578063095ea7b3146102cb57806316c38b3c146102e0575b600080fd5b610276610271366004613124565b6105c0565b60405190151581526020015b60405180910390f35b6102936105eb565b6040516102829190613327565b6102b36102ae3660046131ce565b61067d565b6040516001600160a01b039091168152602001610282565b6102de6102d9366004613028565b6106f2565b005b6102de6102ee36600461310a565b61075b565b6102de610301366004612e94565b610818565b6008545b604051908152602001610282565b6102de610326366004612f22565b610863565b61030a610339366004613028565b61090c565b61035161034c3660046131fe565b610a35565b60405160ff9091168152602001610282565b6102de6103713660046131ce565b610a7b565b6102de610384366004613051565b610aae565b6103516103973660046131fe565b610bee565b600c5461030a565b6102de6103b2366004613028565b610bfe565b6102de6103c5366004612f22565b610df6565b6102de6103d83660046131ce565b610e5b565b600d546103eb9061ffff1681565b60405161ffff9091168152602001610282565b61030a61040c3660046131ce565b610f90565b600a54600160a01b900460ff16610276565b6102b36104313660046131ce565b610ff7565b600b5461030a565b6102de61044c366004612e94565b61111a565b61030a61045f366004612e94565b611168565b6102de611231565b600a546001600160a01b03166102b3565b61049061048b3660046131ce565b611267565b604051610282919061349e565b6102936113d5565b61030a6104b33660046131ce565b600f6020526000908152604090205481565b6102de6104d3366004612fff565b6113e4565b6102de6104e6366004612ee0565b611447565b6102de6104f9366004612f5d565b6114b0565b61030a600c5481565b6102936105153660046131ce565b61151d565b6036546102b3906001600160a01b031681565b6037546102b3906001600160a01b031681565b61030a600b5481565b610276610557366004612eae565b6116b7565b61056f61056a3660046131ce565b61173e565b6040516001600160401b039091168152602001610282565b6038546102b3906001600160a01b031681565b6102de6105a8366004612e94565b611790565b6102766105bb3660046131ce565b611828565b60006001600160e01b0319821663780e9d6360e01b14806105e557506105e582611936565b92915050565b6060600080546105fa9061365f565b80601f01602080910402602001604051908101604052809291908181526020018280546106269061365f565b80156106735780601f1061064857610100808354040283529160200191610673565b820191906000526020600020905b81548152906001019060200180831161065657829003601f168201915b5050505050905090565b33600090815260396020526040812054829060ff16806106bb575060008181526011602052604090205443600160401b9091046001600160401b0316105b6106e05760405162461bcd60e51b81526004016106d7906133c3565b60405180910390fd5b6106e983611986565b91505b50919050565b33600090815260396020526040902054819060ff1680610730575060008181526011602052604090205443600160401b9091046001600160401b0316105b61074c5760405162461bcd60e51b81526004016106d7906133c3565b6107568383611a1b565b505050565b6037546001600160a01b03161580159061077f57506036546001600160a01b031615155b801561079557506038546001600160a01b031615155b6107d55760405162461bcd60e51b815260206004820152601160248201527010dbdb9d1c9858dd1cc81b9bdd081cd95d607a1b60448201526064016106d7565b600a546001600160a01b031633146107ff5760405162461bcd60e51b81526004016106d790613418565b80156108105761080d611b2c565b50565b61080d611bae565b600a546001600160a01b031633146108425760405162461bcd60e51b81526004016106d790613418565b6001600160a01b03166000908152603960205260409020805460ff19169055565b33600090815260396020526040902054819060ff16806108a1575060008181526011602052604090205443600160401b9091046001600160401b0316105b6108bd5760405162461bcd60e51b81526004016106d7906133c3565b3360009081526039602052604090205460ff166108fb576108df335b83611c32565b6108fb5760405162461bcd60e51b81526004016106d79061344d565b610906848484611d09565b50505050565b3360009081526039602052604081205460ff168061094957503260009081526010602052604090205443600160401b9091046001600160401b0316105b6109655760405162461bcd60e51b81526004016106d7906133c3565b3360009081526039602052604090205460ff16806109ab57506001600160a01b03831660009081526010602052604090205443600160401b9091046001600160401b0316105b6109c75760405162461bcd60e51b81526004016106d7906133c3565b60006109d38484611eb4565b3360009081526039602052604090205490915060ff1680610a12575060008181526011602052604090205443600160401b9091046001600160401b0316105b610a2e5760405162461bcd60e51b81526004016106d7906133c3565b9392505050565b60128260128110610a4557600080fd5b018181548110610a5457600080fd5b9060005260206000209060209182820401919006915091509054906101000a900460ff1681565b600a546001600160a01b03163314610aa55760405162461bcd60e51b81526004016106d790613418565b61ffff16600c55565b3360009081526039602052604090205460ff16610add5760405162461bcd60e51b81526004016106d79061338c565b6040805180820182526001600160401b0342818116835243828116602080860191825232600090815260109091529586209451855491518516600160401b026001600160801b031990921694169390931792909217909255915b8351811015610906576040518060400160405280836001600160401b03168152602001846001600160401b031681525060116000868481518110610b8b57634e487b7160e01b600052603260045260246000fd5b60209081029190910181015161ffff168252818101929092526040016000208251815493909201516001600160401b03908116600160401b026001600160801b031990941692169190911791909117905580610be6816136b6565b915050610b37565b60248260128110610a4557600080fd5b600a54600160a01b900460ff1615610c285760405162461bcd60e51b81526004016106d7906133ee565b3360009081526039602052604090205460ff16610c575760405162461bcd60e51b81526004016106d79061338c565b600b54600d54610c6c9061ffff1660016135b9565b61ffff161115610cb25760405162461bcd60e51b8152602060048201526011602482015270105b1b081d1bdad95b9cc81b5a5b9d1959607a1b60448201526064016106d7565b600d805461ffff16906000610cc683613694565b82546101009290920a61ffff818102199093169183160217909155600d54326000908152601060209081526040918290208251808401909352546001600160401b038082168452600160401b9091041690820152610d2993509116908390611f4a565b50326001600160a01b03831614801590610d5157506036546001600160a01b03838116911614155b15610de057600d5461ffff166000908152600e602052604090205460ff1615610dac57600d5460405161ffff909116907fc609046529f8e1aee4d2c19e34766d2271519794dd319b41b8b50d1bb62af0a390600090a2610de0565b600d5460405161ffff909116907fc5759a08f3ae91e06a3538876d932716a76338f6728595134a5c3524be606ead90600090a25b600d54610df290839061ffff166121c1565b5050565b33600090815260396020526040902054819060ff1680610e34575060008181526011602052604090205443600160401b9091046001600160401b0316105b610e505760405162461bcd60e51b81526004016106d7906133c3565b6109068484846121db565b600a54600160a01b900460ff1615610e855760405162461bcd60e51b81526004016106d7906133ee565b3360009081526039602052604090205460ff16610eb45760405162461bcd60e51b81526004016106d79061338c565b32610ebe82610ff7565b6001600160a01b031614610f145760405162461bcd60e51b815260206004820152601760248201527f4f6f707320796f7520646f6e2774206f776e207468617400000000000000000060448201526064016106d7565b6000818152600e602052604090205460ff1615610f5b5760405181907fdbe63f1c27babbb668c6712beea279fdacbf8eece4d96ba925e7a533346d84ca90600090a2610f87565b60405181907fa64e3daf3bbb3268b54caad78160f5b99efffd9dc68a836d8c1dd7c628b6719890600090a25b61080d816121f6565b600080610f9c8361229d565b3360009081526039602052604090205490915060ff1680610fdb575060008181526011602052604090205443600160401b9091046001600160401b0316105b6105e55760405162461bcd60e51b81526004016106d7906133c3565b3360009081526039602052604081205460ff168061103457503260009081526010602052604090205443600160401b9091046001600160401b0316105b6110505760405162461bcd60e51b81526004016106d7906133c3565b33600090815260396020526040902054829060ff168061108e575060008181526011602052604090205443600160401b9091046001600160401b0316105b6110aa5760405162461bcd60e51b81526004016106d7906133c3565b60006110b58461233e565b3360009081526039602052604090205490915060ff16806110fe57506001600160a01b03811660009081526010602052604090205443600160401b9091046001600160401b0316105b6106e95760405162461bcd60e51b81526004016106d7906133c3565b600a546001600160a01b031633146111445760405162461bcd60e51b81526004016106d790613418565b6001600160a01b03166000908152603960205260409020805460ff19166001179055565b3360009081526039602052604081205460ff16806111a557503260009081526010602052604090205443600160401b9091046001600160401b0316105b6111c15760405162461bcd60e51b81526004016106d7906133c3565b3360009081526039602052604090205460ff168061120757506001600160a01b03821660009081526010602052604090205443600160401b9091046001600160401b0316105b6112235760405162461bcd60e51b81526004016106d7906133c3565b6105e5826123b5565b919050565b600a546001600160a01b0316331461125b5760405162461bcd60e51b81526004016106d790613418565b611265600061243c565b565b61126f612e19565b3360009081526039602052604090205460ff16806112ac57503260009081526010602052604090205443600160401b9091046001600160401b0316105b6112c85760405162461bcd60e51b81526004016106d7906133c3565b33600090815260396020526040902054829060ff1680611306575060008181526011602052604090205443600160401b9091046001600160401b0316105b6113225760405162461bcd60e51b81526004016106d7906133c3565b50506000908152600e6020908152604091829020825161014081018452905460ff808216151583526101008083048216948401949094526201000082048116948301949094526301000000810484166060830152640100000000810484166080830152650100000000008104841660a0830152600160301b8104841660c0830152600160381b8104841660e0830152600160401b8104841692820192909252600160481b90910490911661012082015290565b6060600180546105fa9061365f565b3360009081526039602052604090205460ff168061142157503260009081526010602052604090205443600160401b9091046001600160401b0316105b61143d5760405162461bcd60e51b81526004016106d7906133c3565b610df2828261248e565b600a546001600160a01b031633146114715760405162461bcd60e51b81526004016106d790613418565b603780546001600160a01b039485166001600160a01b031991821617909155603680549385169382169390931790925560388054919093169116179055565b33600090815260396020526040902054829060ff16806114ee575060008181526011602052604090205443600160401b9091046001600160401b0316105b61150a5760405162461bcd60e51b81526004016106d7906133c3565b61151685858585612553565b5050505050565b3360009081526039602052604090205460609060ff168061155d57503260009081526010602052604090205443600160401b9091046001600160401b0316105b6115795760405162461bcd60e51b81526004016106d7906133c3565b33600090815260396020526040902054829060ff16806115b7575060008181526011602052604090205443600160401b9091046001600160401b0316105b6115d35760405162461bcd60e51b81526004016106d7906133c3565b6000838152600260205260409020546001600160a01b03166116375760405162461bcd60e51b815260206004820152601760248201527f546f6b656e20494420646f6573206e6f7420657869737400000000000000000060448201526064016106d7565b60375460405163c87b56dd60e01b8152600481018590526001600160a01b039091169063c87b56dd9060240160006040518083038186803b15801561167b57600080fd5b505afa15801561168f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526106e9919081019061315c565b3360009081526039602052604081205460ff16806116f457503260009081526010602052604090205443600160401b9091046001600160401b0316105b6117105760405162461bcd60e51b81526004016106d7906133c3565b6001600160a01b0380841660009081526005602090815260408083209386168352929052205460ff16610a2e565b3360009081526039602052604081205460ff1661176d5760405162461bcd60e51b81526004016106d79061338c565b50600090815260116020526040902054600160401b90046001600160401b031690565b600a546001600160a01b031633146117ba5760405162461bcd60e51b81526004016106d790613418565b6001600160a01b03811661181f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106d7565b61080d8161243c565b33600090815260396020526040812054829060ff1680611866575060008181526011602052604090205443600160401b9091046001600160401b0316105b6118825760405162461bcd60e51b81526004016106d7906133c3565b50506000908152600e6020908152604091829020825161014081018452905460ff80821615158084526101008084048316958501959095526201000083048216958401959095526301000000820481166060840152640100000000820481166080840152650100000000008204811660a0840152600160301b8204811660c0840152600160381b8204811660e0840152600160401b8204811693830193909352600160481b90049091166101209091015290565b60006001600160e01b031982166380ac58cd60e01b148061196757506001600160e01b03198216635b5e139f60e01b145b806105e557506301ffc9a760e01b6001600160e01b03198316146105e5565b6000818152600260205260408120546001600160a01b03166119ff5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016106d7565b506000908152600460205260409020546001600160a01b031690565b6000611a268261233e565b9050806001600160a01b0316836001600160a01b03161415611a945760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016106d7565b336001600160a01b0382161480611ab05750611ab081336116b7565b611b225760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016106d7565b6107568383612584565b600a54600160a01b900460ff1615611b565760405162461bcd60e51b81526004016106d7906133ee565b600a805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611b913390565b6040516001600160a01b03909116815260200160405180910390a1565b600a54600160a01b900460ff16611bfe5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016106d7565b600a805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33611b91565b6000818152600260205260408120546001600160a01b0316611cab5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016106d7565b6000611cb68361233e565b9050806001600160a01b0316846001600160a01b03161480611cf15750836001600160a01b0316611ce68461067d565b6001600160a01b0316145b80611d015750611d0181856116b7565b949350505050565b826001600160a01b0316611d1c8261233e565b6001600160a01b031614611d845760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b60648201526084016106d7565b6001600160a01b038216611de65760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016106d7565b611df18383836125f2565b611dfc600082612584565b6001600160a01b0383166000908152600360205260408120805460019290611e2590849061361c565b90915550506001600160a01b0382166000908152600360205260408120805460019290611e539084906135df565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6000611ebf836123b5565b8210611f215760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016106d7565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b611f52612e19565b611f5b836126aa565b9050600f6000611f6a83612818565b8152602001908152602001600020546000141561212f576000848152600e602090815260408083208451815493860151928601516060870151608088015160a089015160c08a015160e08b0151610100808d01516101208e015161ffff19909c1698151561ff0019169890981760ff9a8b169091021763ffff0000191662010000968a169690960263ff0000001916959095176301000000948916949094029390931765ffff0000000019166401000000009288169290920265ff000000000019169190911765010000000000918716919091021767ffff0000000000001916600160301b9186169190910267ff00000000000000191617600160381b918516919091021769ffff00000000000000001916600160401b9184169190910269ff000000000000000000191617600160481b92909316919091029190911790558490600f906120b784612818565b81526020810191909152604001600020558051156120ff5760405184907faa6881736a25701d6bdd5686a6817a15558d15c393502884aa143924934e5cad90600090a2610a2e565b60405184907f2745547bac7b474cd0c236e2c41d964954718238b4d89f0a09bdfa5324521dba90600090a2610a2e565b611d0184603860009054906101000a90046001600160a01b03166001600160a01b0316635ec01e4d6040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561218357600080fd5b505af1158015612197573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121bb91906131e6565b84611f4a565b610df282826040518060200160405280600081525061287c565b610756838383604051806020016040528060008152506114b0565b60006122018261233e565b905061220f816000846125f2565b61221a600083612584565b6001600160a01b038116600090815260036020526040812080546001929061224390849061361c565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b60006122a860085490565b821061230b5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016106d7565b6008828154811061232c57634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b6000818152600260205260408120546001600160a01b0316806105e55760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016106d7565b60006001600160a01b0382166124205760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016106d7565b506001600160a01b031660009081526003602052604090205490565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b0382163314156124e75760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016106d7565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b61255c336108d9565b6125785760405162461bcd60e51b81526004016106d79061344d565b610906848484846128af565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906125b98261233e565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6001600160a01b03831661264d5761264881600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b612670565b816001600160a01b0316836001600160a01b0316146126705761267083826128e2565b6001600160a01b038216612687576107568161297f565b826001600160a01b0316826001600160a01b031614610756576107568282612a58565b6126b2612e19565b6126c1600a61ffff84166136d1565b15158082526000906126d45760096126d7565b60005b60109390931c9290506126f861ffff84166126f38360006135f7565b612a9c565b60ff16602083015260109290921c9161271a61ffff84166126f38360016135f7565b60ff16604083015260109290921c9161273c61ffff84166126f38360026135f7565b60ff16606083015260109290921c9161275e61ffff84166126f38360036135f7565b60ff16608083015260109290921c9161278061ffff84166126f38360046135f7565b60ff1660a083015260109290921c916127a261ffff84166126f38360056135f7565b60ff1660c083015260109290921c916127c461ffff84166126f38360066135f7565b60ff1661010083015260109290921c916127e761ffff84166126f38360076135f7565b60ff1660e083015260109290921c9161280961ffff84166126f38360086135f7565b60ff1661012083015250919050565b80516020808301516040808501516060860151608087015160a088015160c08901516101008a015160e08b01516101208c0151975160009b61285e9b909a99910161324b565b60408051601f19818403018152919052805160209091012092915050565b6128868383612bbe565b6128936000848484612d0c565b6107565760405162461bcd60e51b81526004016106d79061333a565b6128ba848484611d09565b6128c684848484612d0c565b6109065760405162461bcd60e51b81526004016106d79061333a565b600060016128ef846123b5565b6128f9919061361c565b60008381526007602052604090205490915080821461294c576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906129919060019061361c565b600083815260096020526040812054600880549394509092849081106129c757634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905080600883815481106129f657634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480612a3c57634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b6000612a63836123b5565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b60008060128360ff1660128110612ac357634e487b7160e01b600052603260045260246000fd5b0154612acf90856136e5565b905060128360ff1660128110612af557634e487b7160e01b600052603260045260246000fd5b018160ff1681548110612b1857634e487b7160e01b600052603260045260246000fd5b60009182526020918290209181049091015460ff601f9092166101000a90048116600886901c9091161015612b4e5790506105e5565b60248360ff1660128110612b7257634e487b7160e01b600052603260045260246000fd5b018160ff1681548110612b9557634e487b7160e01b600052603260045260246000fd5b90600052602060002090602091828204019190069054906101000a900460ff1691505092915050565b6001600160a01b038216612c145760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016106d7565b6000818152600260205260409020546001600160a01b031615612c795760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016106d7565b612c85600083836125f2565b6001600160a01b0382166000908152600360205260408120805460019290612cae9084906135df565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001600160a01b0384163b15612e0e57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612d509033908990889088906004016132ea565b602060405180830381600087803b158015612d6a57600080fd5b505af1925050508015612d9a575060408051601f3d908101601f19168201909252612d9791810190613140565b60015b612df4573d808015612dc8576040519150601f19603f3d011682016040523d82523d6000602084013e612dcd565b606091505b508051612dec5760405162461bcd60e51b81526004016106d79061333a565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611d01565b506001949350505050565b6040805161014081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081019190915290565b80356001600160a01b038116811461122c57600080fd5b8035801515811461122c57600080fd5b600060208284031215612ea5578081fd5b610a2e82612e6d565b60008060408385031215612ec0578081fd5b612ec983612e6d565b9150612ed760208401612e6d565b90509250929050565b600080600060608486031215612ef4578081fd5b612efd84612e6d565b9250612f0b60208501612e6d565b9150612f1960408501612e6d565b90509250925092565b600080600060608486031215612f36578283fd5b612f3f84612e6d565b9250612f4d60208501612e6d565b9150604084013590509250925092565b60008060008060808587031215612f72578081fd5b612f7b85612e6d565b9350612f8960208601612e6d565b92506040850135915060608501356001600160401b03811115612faa578182fd5b8501601f81018713612fba578182fd5b8035612fcd612fc882613592565b613562565b818152886020838501011115612fe1578384fd5b81602084016020830137908101602001929092525092959194509250565b60008060408385031215613011578182fd5b61301a83612e6d565b9150612ed760208401612e84565b6000806040838503121561303a578182fd5b61304383612e6d565b946020939093013593505050565b60006020808385031215613063578182fd5b82356001600160401b0380821115613079578384fd5b818501915085601f83011261308c578384fd5b81358181111561309e5761309e613733565b8060051b91506130af848301613562565b8181528481019084860184860187018a10156130c9578788fd5b8795505b838610156130fd578035945061ffff851685146130e8578788fd5b848352600195909501949186019186016130cd565b5098975050505050505050565b60006020828403121561311b578081fd5b610a2e82612e84565b600060208284031215613135578081fd5b8135610a2e81613749565b600060208284031215613151578081fd5b8151610a2e81613749565b60006020828403121561316d578081fd5b81516001600160401b03811115613182578182fd5b8201601f81018413613192578182fd5b80516131a0612fc882613592565b8181528560208385010111156131b4578384fd5b6131c5826020830160208601613633565b95945050505050565b6000602082840312156131df578081fd5b5035919050565b6000602082840312156131f7578081fd5b5051919050565b60008060408385031215613210578182fd5b50508035926020909101359150565b60008151808452613237816020860160208601613633565b601f01601f19169290920160200192915050565b8a151560f890811b82526001600160f81b03198b821b811660018401528a821b8116600284015289821b8116600384015288821b8116600484015287821b8116600584015286821b811660068401529085901b16600782015260006132bf600883018560f81b6001600160f81b0319169052565b6132d8600983018460f81b6001600160f81b0319169052565b50600a019a9950505050505050505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061331d9083018461321f565b9695505050505050565b602081526000610a2e602083018461321f565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526019908201527f4f6e6c792061646d696e732063616e2063616c6c207468697300000000000000604082015260600190565b602080825260119082015270686d6d6d6d207768617420646f696e673f60781b604082015260600190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b815115158152610140810160208301516134bd602084018260ff169052565b5060408301516134d2604084018260ff169052565b5060608301516134e7606084018260ff169052565b5060808301516134fc608084018260ff169052565b5060a083015161351160a084018260ff169052565b5060c083015161352660c084018260ff169052565b5060e083015161353b60e084018260ff169052565b506101008381015160ff908116918401919091526101209384015116929091019190915290565b604051601f8201601f191681016001600160401b038111828210171561358a5761358a613733565b604052919050565b60006001600160401b038211156135ab576135ab613733565b50601f01601f191660200190565b600061ffff8083168185168083038211156135d6576135d6613707565b01949350505050565b600082198211156135f2576135f2613707565b500190565b600060ff821660ff84168060ff0382111561361457613614613707565b019392505050565b60008282101561362e5761362e613707565b500390565b60005b8381101561364e578181015183820152602001613636565b838111156109065750506000910152565b600181811c9082168061367357607f821691505b602082108114156106ec57634e487b7160e01b600052602260045260246000fd5b600061ffff808316818114156136ac576136ac613707565b6001019392505050565b60006000198214156136ca576136ca613707565b5060010190565b6000826136e0576136e061371d565b500690565b600060ff8316806136f8576136f861371d565b8060ff84160691505092915050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b03198116811461080d57600080fdfea26469706673582212208449ffa6ec46fc298b0fe6086274f00a6688a0afbc14b3727e240533dd9e1f5964736f6c63430008040033000000000000000000000000000000000000000000000000000000000000ea60
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061025e5760003560e01c80636abcded111610146578063b88d4fde116100c3578063e831574211610087578063e831574214610540578063e985e9c514610549578063ebd173681461055c578063f10fb58414610587578063f2fde38b1461059a578063ff53f473146105ad57600080fd5b8063b88d4fde146104eb578063c084f540146104fe578063c87b56dd14610507578063ca14df4f1461051a578063e1fc334f1461052d57600080fd5b806394e568471161010a57806394e568471461047d57806395d89b411461049d578063a1b8f374146104a5578063a22cb465146104c5578063b3066d49146104d857600080fd5b80636abcded114610436578063704802751461043e57806370a0823114610451578063715018a6146104645780638da5cb5b1461046c57600080fd5b80633431a753116101df57806342842e0e116101a357806342842e0e146103b757806342966c68146103ca5780634f02c420146103dd5780634f6ccce7146103fe5780635c975abb146104115780636352211e1461042357600080fd5b80633431a7531461036357806335ca838b1461037657806336838391146103895780634018b1f81461039c57806340c10f19146103a457600080fd5b80631785f53c116102265780631785f53c146102f357806318160ddd1461030657806323b872dd146103185780632f745c591461032b57806333df4b2c1461033e57600080fd5b806301ffc9a71461026357806306fdde031461028b578063081812fc146102a0578063095ea7b3146102cb57806316c38b3c146102e0575b600080fd5b610276610271366004613124565b6105c0565b60405190151581526020015b60405180910390f35b6102936105eb565b6040516102829190613327565b6102b36102ae3660046131ce565b61067d565b6040516001600160a01b039091168152602001610282565b6102de6102d9366004613028565b6106f2565b005b6102de6102ee36600461310a565b61075b565b6102de610301366004612e94565b610818565b6008545b604051908152602001610282565b6102de610326366004612f22565b610863565b61030a610339366004613028565b61090c565b61035161034c3660046131fe565b610a35565b60405160ff9091168152602001610282565b6102de6103713660046131ce565b610a7b565b6102de610384366004613051565b610aae565b6103516103973660046131fe565b610bee565b600c5461030a565b6102de6103b2366004613028565b610bfe565b6102de6103c5366004612f22565b610df6565b6102de6103d83660046131ce565b610e5b565b600d546103eb9061ffff1681565b60405161ffff9091168152602001610282565b61030a61040c3660046131ce565b610f90565b600a54600160a01b900460ff16610276565b6102b36104313660046131ce565b610ff7565b600b5461030a565b6102de61044c366004612e94565b61111a565b61030a61045f366004612e94565b611168565b6102de611231565b600a546001600160a01b03166102b3565b61049061048b3660046131ce565b611267565b604051610282919061349e565b6102936113d5565b61030a6104b33660046131ce565b600f6020526000908152604090205481565b6102de6104d3366004612fff565b6113e4565b6102de6104e6366004612ee0565b611447565b6102de6104f9366004612f5d565b6114b0565b61030a600c5481565b6102936105153660046131ce565b61151d565b6036546102b3906001600160a01b031681565b6037546102b3906001600160a01b031681565b61030a600b5481565b610276610557366004612eae565b6116b7565b61056f61056a3660046131ce565b61173e565b6040516001600160401b039091168152602001610282565b6038546102b3906001600160a01b031681565b6102de6105a8366004612e94565b611790565b6102766105bb3660046131ce565b611828565b60006001600160e01b0319821663780e9d6360e01b14806105e557506105e582611936565b92915050565b6060600080546105fa9061365f565b80601f01602080910402602001604051908101604052809291908181526020018280546106269061365f565b80156106735780601f1061064857610100808354040283529160200191610673565b820191906000526020600020905b81548152906001019060200180831161065657829003601f168201915b5050505050905090565b33600090815260396020526040812054829060ff16806106bb575060008181526011602052604090205443600160401b9091046001600160401b0316105b6106e05760405162461bcd60e51b81526004016106d7906133c3565b60405180910390fd5b6106e983611986565b91505b50919050565b33600090815260396020526040902054819060ff1680610730575060008181526011602052604090205443600160401b9091046001600160401b0316105b61074c5760405162461bcd60e51b81526004016106d7906133c3565b6107568383611a1b565b505050565b6037546001600160a01b03161580159061077f57506036546001600160a01b031615155b801561079557506038546001600160a01b031615155b6107d55760405162461bcd60e51b815260206004820152601160248201527010dbdb9d1c9858dd1cc81b9bdd081cd95d607a1b60448201526064016106d7565b600a546001600160a01b031633146107ff5760405162461bcd60e51b81526004016106d790613418565b80156108105761080d611b2c565b50565b61080d611bae565b600a546001600160a01b031633146108425760405162461bcd60e51b81526004016106d790613418565b6001600160a01b03166000908152603960205260409020805460ff19169055565b33600090815260396020526040902054819060ff16806108a1575060008181526011602052604090205443600160401b9091046001600160401b0316105b6108bd5760405162461bcd60e51b81526004016106d7906133c3565b3360009081526039602052604090205460ff166108fb576108df335b83611c32565b6108fb5760405162461bcd60e51b81526004016106d79061344d565b610906848484611d09565b50505050565b3360009081526039602052604081205460ff168061094957503260009081526010602052604090205443600160401b9091046001600160401b0316105b6109655760405162461bcd60e51b81526004016106d7906133c3565b3360009081526039602052604090205460ff16806109ab57506001600160a01b03831660009081526010602052604090205443600160401b9091046001600160401b0316105b6109c75760405162461bcd60e51b81526004016106d7906133c3565b60006109d38484611eb4565b3360009081526039602052604090205490915060ff1680610a12575060008181526011602052604090205443600160401b9091046001600160401b0316105b610a2e5760405162461bcd60e51b81526004016106d7906133c3565b9392505050565b60128260128110610a4557600080fd5b018181548110610a5457600080fd5b9060005260206000209060209182820401919006915091509054906101000a900460ff1681565b600a546001600160a01b03163314610aa55760405162461bcd60e51b81526004016106d790613418565b61ffff16600c55565b3360009081526039602052604090205460ff16610add5760405162461bcd60e51b81526004016106d79061338c565b6040805180820182526001600160401b0342818116835243828116602080860191825232600090815260109091529586209451855491518516600160401b026001600160801b031990921694169390931792909217909255915b8351811015610906576040518060400160405280836001600160401b03168152602001846001600160401b031681525060116000868481518110610b8b57634e487b7160e01b600052603260045260246000fd5b60209081029190910181015161ffff168252818101929092526040016000208251815493909201516001600160401b03908116600160401b026001600160801b031990941692169190911791909117905580610be6816136b6565b915050610b37565b60248260128110610a4557600080fd5b600a54600160a01b900460ff1615610c285760405162461bcd60e51b81526004016106d7906133ee565b3360009081526039602052604090205460ff16610c575760405162461bcd60e51b81526004016106d79061338c565b600b54600d54610c6c9061ffff1660016135b9565b61ffff161115610cb25760405162461bcd60e51b8152602060048201526011602482015270105b1b081d1bdad95b9cc81b5a5b9d1959607a1b60448201526064016106d7565b600d805461ffff16906000610cc683613694565b82546101009290920a61ffff818102199093169183160217909155600d54326000908152601060209081526040918290208251808401909352546001600160401b038082168452600160401b9091041690820152610d2993509116908390611f4a565b50326001600160a01b03831614801590610d5157506036546001600160a01b03838116911614155b15610de057600d5461ffff166000908152600e602052604090205460ff1615610dac57600d5460405161ffff909116907fc609046529f8e1aee4d2c19e34766d2271519794dd319b41b8b50d1bb62af0a390600090a2610de0565b600d5460405161ffff909116907fc5759a08f3ae91e06a3538876d932716a76338f6728595134a5c3524be606ead90600090a25b600d54610df290839061ffff166121c1565b5050565b33600090815260396020526040902054819060ff1680610e34575060008181526011602052604090205443600160401b9091046001600160401b0316105b610e505760405162461bcd60e51b81526004016106d7906133c3565b6109068484846121db565b600a54600160a01b900460ff1615610e855760405162461bcd60e51b81526004016106d7906133ee565b3360009081526039602052604090205460ff16610eb45760405162461bcd60e51b81526004016106d79061338c565b32610ebe82610ff7565b6001600160a01b031614610f145760405162461bcd60e51b815260206004820152601760248201527f4f6f707320796f7520646f6e2774206f776e207468617400000000000000000060448201526064016106d7565b6000818152600e602052604090205460ff1615610f5b5760405181907fdbe63f1c27babbb668c6712beea279fdacbf8eece4d96ba925e7a533346d84ca90600090a2610f87565b60405181907fa64e3daf3bbb3268b54caad78160f5b99efffd9dc68a836d8c1dd7c628b6719890600090a25b61080d816121f6565b600080610f9c8361229d565b3360009081526039602052604090205490915060ff1680610fdb575060008181526011602052604090205443600160401b9091046001600160401b0316105b6105e55760405162461bcd60e51b81526004016106d7906133c3565b3360009081526039602052604081205460ff168061103457503260009081526010602052604090205443600160401b9091046001600160401b0316105b6110505760405162461bcd60e51b81526004016106d7906133c3565b33600090815260396020526040902054829060ff168061108e575060008181526011602052604090205443600160401b9091046001600160401b0316105b6110aa5760405162461bcd60e51b81526004016106d7906133c3565b60006110b58461233e565b3360009081526039602052604090205490915060ff16806110fe57506001600160a01b03811660009081526010602052604090205443600160401b9091046001600160401b0316105b6106e95760405162461bcd60e51b81526004016106d7906133c3565b600a546001600160a01b031633146111445760405162461bcd60e51b81526004016106d790613418565b6001600160a01b03166000908152603960205260409020805460ff19166001179055565b3360009081526039602052604081205460ff16806111a557503260009081526010602052604090205443600160401b9091046001600160401b0316105b6111c15760405162461bcd60e51b81526004016106d7906133c3565b3360009081526039602052604090205460ff168061120757506001600160a01b03821660009081526010602052604090205443600160401b9091046001600160401b0316105b6112235760405162461bcd60e51b81526004016106d7906133c3565b6105e5826123b5565b919050565b600a546001600160a01b0316331461125b5760405162461bcd60e51b81526004016106d790613418565b611265600061243c565b565b61126f612e19565b3360009081526039602052604090205460ff16806112ac57503260009081526010602052604090205443600160401b9091046001600160401b0316105b6112c85760405162461bcd60e51b81526004016106d7906133c3565b33600090815260396020526040902054829060ff1680611306575060008181526011602052604090205443600160401b9091046001600160401b0316105b6113225760405162461bcd60e51b81526004016106d7906133c3565b50506000908152600e6020908152604091829020825161014081018452905460ff808216151583526101008083048216948401949094526201000082048116948301949094526301000000810484166060830152640100000000810484166080830152650100000000008104841660a0830152600160301b8104841660c0830152600160381b8104841660e0830152600160401b8104841692820192909252600160481b90910490911661012082015290565b6060600180546105fa9061365f565b3360009081526039602052604090205460ff168061142157503260009081526010602052604090205443600160401b9091046001600160401b0316105b61143d5760405162461bcd60e51b81526004016106d7906133c3565b610df2828261248e565b600a546001600160a01b031633146114715760405162461bcd60e51b81526004016106d790613418565b603780546001600160a01b039485166001600160a01b031991821617909155603680549385169382169390931790925560388054919093169116179055565b33600090815260396020526040902054829060ff16806114ee575060008181526011602052604090205443600160401b9091046001600160401b0316105b61150a5760405162461bcd60e51b81526004016106d7906133c3565b61151685858585612553565b5050505050565b3360009081526039602052604090205460609060ff168061155d57503260009081526010602052604090205443600160401b9091046001600160401b0316105b6115795760405162461bcd60e51b81526004016106d7906133c3565b33600090815260396020526040902054829060ff16806115b7575060008181526011602052604090205443600160401b9091046001600160401b0316105b6115d35760405162461bcd60e51b81526004016106d7906133c3565b6000838152600260205260409020546001600160a01b03166116375760405162461bcd60e51b815260206004820152601760248201527f546f6b656e20494420646f6573206e6f7420657869737400000000000000000060448201526064016106d7565b60375460405163c87b56dd60e01b8152600481018590526001600160a01b039091169063c87b56dd9060240160006040518083038186803b15801561167b57600080fd5b505afa15801561168f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526106e9919081019061315c565b3360009081526039602052604081205460ff16806116f457503260009081526010602052604090205443600160401b9091046001600160401b0316105b6117105760405162461bcd60e51b81526004016106d7906133c3565b6001600160a01b0380841660009081526005602090815260408083209386168352929052205460ff16610a2e565b3360009081526039602052604081205460ff1661176d5760405162461bcd60e51b81526004016106d79061338c565b50600090815260116020526040902054600160401b90046001600160401b031690565b600a546001600160a01b031633146117ba5760405162461bcd60e51b81526004016106d790613418565b6001600160a01b03811661181f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106d7565b61080d8161243c565b33600090815260396020526040812054829060ff1680611866575060008181526011602052604090205443600160401b9091046001600160401b0316105b6118825760405162461bcd60e51b81526004016106d7906133c3565b50506000908152600e6020908152604091829020825161014081018452905460ff80821615158084526101008084048316958501959095526201000083048216958401959095526301000000820481166060840152640100000000820481166080840152650100000000008204811660a0840152600160301b8204811660c0840152600160381b8204811660e0840152600160401b8204811693830193909352600160481b90049091166101209091015290565b60006001600160e01b031982166380ac58cd60e01b148061196757506001600160e01b03198216635b5e139f60e01b145b806105e557506301ffc9a760e01b6001600160e01b03198316146105e5565b6000818152600260205260408120546001600160a01b03166119ff5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016106d7565b506000908152600460205260409020546001600160a01b031690565b6000611a268261233e565b9050806001600160a01b0316836001600160a01b03161415611a945760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016106d7565b336001600160a01b0382161480611ab05750611ab081336116b7565b611b225760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016106d7565b6107568383612584565b600a54600160a01b900460ff1615611b565760405162461bcd60e51b81526004016106d7906133ee565b600a805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611b913390565b6040516001600160a01b03909116815260200160405180910390a1565b600a54600160a01b900460ff16611bfe5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016106d7565b600a805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33611b91565b6000818152600260205260408120546001600160a01b0316611cab5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016106d7565b6000611cb68361233e565b9050806001600160a01b0316846001600160a01b03161480611cf15750836001600160a01b0316611ce68461067d565b6001600160a01b0316145b80611d015750611d0181856116b7565b949350505050565b826001600160a01b0316611d1c8261233e565b6001600160a01b031614611d845760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b60648201526084016106d7565b6001600160a01b038216611de65760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016106d7565b611df18383836125f2565b611dfc600082612584565b6001600160a01b0383166000908152600360205260408120805460019290611e2590849061361c565b90915550506001600160a01b0382166000908152600360205260408120805460019290611e539084906135df565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6000611ebf836123b5565b8210611f215760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016106d7565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b611f52612e19565b611f5b836126aa565b9050600f6000611f6a83612818565b8152602001908152602001600020546000141561212f576000848152600e602090815260408083208451815493860151928601516060870151608088015160a089015160c08a015160e08b0151610100808d01516101208e015161ffff19909c1698151561ff0019169890981760ff9a8b169091021763ffff0000191662010000968a169690960263ff0000001916959095176301000000948916949094029390931765ffff0000000019166401000000009288169290920265ff000000000019169190911765010000000000918716919091021767ffff0000000000001916600160301b9186169190910267ff00000000000000191617600160381b918516919091021769ffff00000000000000001916600160401b9184169190910269ff000000000000000000191617600160481b92909316919091029190911790558490600f906120b784612818565b81526020810191909152604001600020558051156120ff5760405184907faa6881736a25701d6bdd5686a6817a15558d15c393502884aa143924934e5cad90600090a2610a2e565b60405184907f2745547bac7b474cd0c236e2c41d964954718238b4d89f0a09bdfa5324521dba90600090a2610a2e565b611d0184603860009054906101000a90046001600160a01b03166001600160a01b0316635ec01e4d6040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561218357600080fd5b505af1158015612197573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121bb91906131e6565b84611f4a565b610df282826040518060200160405280600081525061287c565b610756838383604051806020016040528060008152506114b0565b60006122018261233e565b905061220f816000846125f2565b61221a600083612584565b6001600160a01b038116600090815260036020526040812080546001929061224390849061361c565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b60006122a860085490565b821061230b5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016106d7565b6008828154811061232c57634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b6000818152600260205260408120546001600160a01b0316806105e55760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016106d7565b60006001600160a01b0382166124205760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016106d7565b506001600160a01b031660009081526003602052604090205490565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b0382163314156124e75760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016106d7565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b61255c336108d9565b6125785760405162461bcd60e51b81526004016106d79061344d565b610906848484846128af565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906125b98261233e565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6001600160a01b03831661264d5761264881600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b612670565b816001600160a01b0316836001600160a01b0316146126705761267083826128e2565b6001600160a01b038216612687576107568161297f565b826001600160a01b0316826001600160a01b031614610756576107568282612a58565b6126b2612e19565b6126c1600a61ffff84166136d1565b15158082526000906126d45760096126d7565b60005b60109390931c9290506126f861ffff84166126f38360006135f7565b612a9c565b60ff16602083015260109290921c9161271a61ffff84166126f38360016135f7565b60ff16604083015260109290921c9161273c61ffff84166126f38360026135f7565b60ff16606083015260109290921c9161275e61ffff84166126f38360036135f7565b60ff16608083015260109290921c9161278061ffff84166126f38360046135f7565b60ff1660a083015260109290921c916127a261ffff84166126f38360056135f7565b60ff1660c083015260109290921c916127c461ffff84166126f38360066135f7565b60ff1661010083015260109290921c916127e761ffff84166126f38360076135f7565b60ff1660e083015260109290921c9161280961ffff84166126f38360086135f7565b60ff1661012083015250919050565b80516020808301516040808501516060860151608087015160a088015160c08901516101008a015160e08b01516101208c0151975160009b61285e9b909a99910161324b565b60408051601f19818403018152919052805160209091012092915050565b6128868383612bbe565b6128936000848484612d0c565b6107565760405162461bcd60e51b81526004016106d79061333a565b6128ba848484611d09565b6128c684848484612d0c565b6109065760405162461bcd60e51b81526004016106d79061333a565b600060016128ef846123b5565b6128f9919061361c565b60008381526007602052604090205490915080821461294c576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906129919060019061361c565b600083815260096020526040812054600880549394509092849081106129c757634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905080600883815481106129f657634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480612a3c57634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b6000612a63836123b5565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b60008060128360ff1660128110612ac357634e487b7160e01b600052603260045260246000fd5b0154612acf90856136e5565b905060128360ff1660128110612af557634e487b7160e01b600052603260045260246000fd5b018160ff1681548110612b1857634e487b7160e01b600052603260045260246000fd5b60009182526020918290209181049091015460ff601f9092166101000a90048116600886901c9091161015612b4e5790506105e5565b60248360ff1660128110612b7257634e487b7160e01b600052603260045260246000fd5b018160ff1681548110612b9557634e487b7160e01b600052603260045260246000fd5b90600052602060002090602091828204019190069054906101000a900460ff1691505092915050565b6001600160a01b038216612c145760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016106d7565b6000818152600260205260409020546001600160a01b031615612c795760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016106d7565b612c85600083836125f2565b6001600160a01b0382166000908152600360205260408120805460019290612cae9084906135df565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001600160a01b0384163b15612e0e57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612d509033908990889088906004016132ea565b602060405180830381600087803b158015612d6a57600080fd5b505af1925050508015612d9a575060408051601f3d908101601f19168201909252612d9791810190613140565b60015b612df4573d808015612dc8576040519150601f19603f3d011682016040523d82523d6000602084013e612dcd565b606091505b508051612dec5760405162461bcd60e51b81526004016106d79061333a565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611d01565b506001949350505050565b6040805161014081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081019190915290565b80356001600160a01b038116811461122c57600080fd5b8035801515811461122c57600080fd5b600060208284031215612ea5578081fd5b610a2e82612e6d565b60008060408385031215612ec0578081fd5b612ec983612e6d565b9150612ed760208401612e6d565b90509250929050565b600080600060608486031215612ef4578081fd5b612efd84612e6d565b9250612f0b60208501612e6d565b9150612f1960408501612e6d565b90509250925092565b600080600060608486031215612f36578283fd5b612f3f84612e6d565b9250612f4d60208501612e6d565b9150604084013590509250925092565b60008060008060808587031215612f72578081fd5b612f7b85612e6d565b9350612f8960208601612e6d565b92506040850135915060608501356001600160401b03811115612faa578182fd5b8501601f81018713612fba578182fd5b8035612fcd612fc882613592565b613562565b818152886020838501011115612fe1578384fd5b81602084016020830137908101602001929092525092959194509250565b60008060408385031215613011578182fd5b61301a83612e6d565b9150612ed760208401612e84565b6000806040838503121561303a578182fd5b61304383612e6d565b946020939093013593505050565b60006020808385031215613063578182fd5b82356001600160401b0380821115613079578384fd5b818501915085601f83011261308c578384fd5b81358181111561309e5761309e613733565b8060051b91506130af848301613562565b8181528481019084860184860187018a10156130c9578788fd5b8795505b838610156130fd578035945061ffff851685146130e8578788fd5b848352600195909501949186019186016130cd565b5098975050505050505050565b60006020828403121561311b578081fd5b610a2e82612e84565b600060208284031215613135578081fd5b8135610a2e81613749565b600060208284031215613151578081fd5b8151610a2e81613749565b60006020828403121561316d578081fd5b81516001600160401b03811115613182578182fd5b8201601f81018413613192578182fd5b80516131a0612fc882613592565b8181528560208385010111156131b4578384fd5b6131c5826020830160208601613633565b95945050505050565b6000602082840312156131df578081fd5b5035919050565b6000602082840312156131f7578081fd5b5051919050565b60008060408385031215613210578182fd5b50508035926020909101359150565b60008151808452613237816020860160208601613633565b601f01601f19169290920160200192915050565b8a151560f890811b82526001600160f81b03198b821b811660018401528a821b8116600284015289821b8116600384015288821b8116600484015287821b8116600584015286821b811660068401529085901b16600782015260006132bf600883018560f81b6001600160f81b0319169052565b6132d8600983018460f81b6001600160f81b0319169052565b50600a019a9950505050505050505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061331d9083018461321f565b9695505050505050565b602081526000610a2e602083018461321f565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526019908201527f4f6e6c792061646d696e732063616e2063616c6c207468697300000000000000604082015260600190565b602080825260119082015270686d6d6d6d207768617420646f696e673f60781b604082015260600190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b815115158152610140810160208301516134bd602084018260ff169052565b5060408301516134d2604084018260ff169052565b5060608301516134e7606084018260ff169052565b5060808301516134fc608084018260ff169052565b5060a083015161351160a084018260ff169052565b5060c083015161352660c084018260ff169052565b5060e083015161353b60e084018260ff169052565b506101008381015160ff908116918401919091526101209384015116929091019190915290565b604051601f8201601f191681016001600160401b038111828210171561358a5761358a613733565b604052919050565b60006001600160401b038211156135ab576135ab613733565b50601f01601f191660200190565b600061ffff8083168185168083038211156135d6576135d6613707565b01949350505050565b600082198211156135f2576135f2613707565b500190565b600060ff821660ff84168060ff0382111561361457613614613707565b019392505050565b60008282101561362e5761362e613707565b500390565b60005b8381101561364e578181015183820152602001613636565b838111156109065750506000910152565b600181811c9082168061367357607f821691505b602082108114156106ec57634e487b7160e01b600052602260045260246000fd5b600061ffff808316818114156136ac576136ac613707565b6001019392505050565b60006000198214156136ca576136ca613707565b5060010190565b6000826136e0576136e061371d565b500690565b600060ff8316806136f8576136f861371d565b8060ff84160691505092915050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b03198116811461080d57600080fdfea26469706673582212208449ffa6ec46fc298b0fe6086274f00a6688a0afbc14b3727e240533dd9e1f5964736f6c63430008040033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000ea60
-----Decoded View---------------
Arg [0] : _maxTokens (uint256): 60000
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000000000000000000000000000000000000000ea60
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.