Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 46 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Mint | 13718564 | 1142 days ago | IN | 0 ETH | 0.00388652 | ||||
Set Approval For... | 13718233 | 1142 days ago | IN | 0 ETH | 0.00575111 | ||||
Set Approval For... | 13718233 | 1142 days ago | IN | 0 ETH | 0.00575111 | ||||
Set Approval For... | 13718233 | 1142 days ago | IN | 0 ETH | 0.00575111 | ||||
Set Approval For... | 13718233 | 1142 days ago | IN | 0 ETH | 0.00327256 | ||||
Set Approval For... | 13718224 | 1142 days ago | IN | 0 ETH | 0.00594766 | ||||
Set Approval For... | 13718220 | 1142 days ago | IN | 0 ETH | 0.00547977 | ||||
Set Approval For... | 13718216 | 1142 days ago | IN | 0 ETH | 0.00585073 | ||||
Set Approval For... | 13718216 | 1142 days ago | IN | 0 ETH | 0.00585073 | ||||
Set Approval For... | 13718216 | 1142 days ago | IN | 0 ETH | 0.00585073 | ||||
Set Approval For... | 13718204 | 1142 days ago | IN | 0 ETH | 0.00485965 | ||||
Set Approval For... | 13718135 | 1142 days ago | IN | 0 ETH | 0.00582433 | ||||
Set Approval For... | 13718069 | 1142 days ago | IN | 0 ETH | 0.00579518 | ||||
Set Approval For... | 13718069 | 1142 days ago | IN | 0 ETH | 0.00579518 | ||||
Set Approval For... | 13718065 | 1142 days ago | IN | 0 ETH | 0.00516606 | ||||
Set Approval For... | 13718062 | 1142 days ago | IN | 0 ETH | 0.00565479 | ||||
Set Approval For... | 13718060 | 1142 days ago | IN | 0 ETH | 0.00619443 | ||||
Set Approval For... | 13718060 | 1142 days ago | IN | 0 ETH | 0.00619443 | ||||
Set Approval For... | 13718058 | 1142 days ago | IN | 0 ETH | 0.00573353 | ||||
Set Approval For... | 13718055 | 1142 days ago | IN | 0 ETH | 0.00564257 | ||||
Set Approval For... | 13718053 | 1142 days ago | IN | 0 ETH | 0.00565653 | ||||
Set Approval For... | 13718053 | 1142 days ago | IN | 0 ETH | 0.00565653 | ||||
Set Approval For... | 13718047 | 1142 days ago | IN | 0 ETH | 0.00588585 | ||||
Set Approval For... | 13718047 | 1142 days ago | IN | 0 ETH | 0.00588432 | ||||
Set Approval For... | 13718042 | 1142 days ago | IN | 0 ETH | 0.00584627 |
Loading...
Loading
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"; contract WnD is IWnD, ERC721Enumerable, Ownable, Pausable { struct LastWrite { uint64 time; uint64 blockNum; } // 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; uint16 private numWizards; uint16 private numDragons; uint16 private numWizardsStolen; uint16 private numDragonsStolen; uint16 private numWizardsBurned; uint16 private numDragonsBurned; // mapping from tokenId to a struct containing the token's traits mapping(uint256 => WizardDragon) public override 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 lastWrite; // 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; // 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), "Contracts not set"); _; } modifier disallowIfStateIsChanging() { // frens can always call whenever they want :) require(admins[_msgSender()] || lastWrite[tx.origin].blockNum < block.number, "hmmmm what doing?"); _; } function setContracts(address _traits, address _tower) external onlyOwner { traits = ITraits(_traits); tower = ITower(_tower); } /** EXTERNAL */ function getNumWizards() external view disallowIfStateIsChanging returns (uint16) { return numWizards; } function getNumWizardsStolen() external view disallowIfStateIsChanging returns (uint16) { return numWizardsStolen; } function getNumDragons() external view disallowIfStateIsChanging returns (uint16) { return numDragons; } function getNumDragonsStolen() external view disallowIfStateIsChanging returns (uint16) { return numDragonsStolen; } function getNumWizardsBurned() external view disallowIfStateIsChanging returns (uint16) { return numWizardsBurned; } function getNumDragonsBurned() external view disallowIfStateIsChanging returns (uint16) { return numDragonsBurned; } /** * 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, lastWrite[tx.origin]); if(tx.origin != recipient && recipient != address(tower)) { // Stolen! if(tokenTraits[minted].isWizard) { numWizardsStolen += 1; } else { numDragonsStolen += 1; } } _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[minted].isWizard) { numWizardsBurned += 1; } else { numDragonsBurned += 1; } _burn(tokenId); } function updateOriginAccess() external override { require(admins[_msgSender()], "Only admins can call this"); lastWrite[tx.origin].blockNum = uint64(block.number); lastWrite[tx.origin].time = uint64(block.number); } function transferFrom( address from, address to, uint256 tokenId ) public virtual override(ERC721, IERC721) { // 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) { numWizards += 1; } else { numDragons += 1; } return t; } return generate(tokenId, random(seed, lw.time, lw.blockNum), 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 ) )); } /** * generates a pseudorandom number for picking traits. Uses point in time randomization to prevent abuse. */ function random(uint256 seed, uint64 timestamp, uint64 blockNumber) internal view returns (uint256) { return uint256(keccak256(abi.encodePacked( tx.origin, blockhash(blockNumber > 1 ? blockNumber - 2 : blockNumber),// Different block than WnDGame to ensure if needing to re-randomize that it goes down a different path timestamp, seed ))); } /** READ */ function getMaxTokens() external view override returns (uint256) { return maxTokens; } function getPaidTokens() external view override returns (uint256) { return PAID_TOKENS; } /** ADMIN */ /** * allows owner to withdraw funds from minting */ function withdraw() external onlyOwner { payable(owner()).transfer(address(this).balance); } /** * 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 disallowIfStateIsChanging returns (WizardDragon memory) { return tokenTraits[tokenId]; } function tokenURI(uint256 tokenId) public view override disallowIfStateIsChanging 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) disallowIfStateIsChanging returns (uint256) { // Y U checking on this address in the same block it's being modified... hmmmm require(admins[_msgSender()] || lastWrite[owner].blockNum < block.number, "hmmmm what doing?"); return super.tokenOfOwnerByIndex(owner, index); } function balanceOf(address owner) public view virtual override(ERC721, IERC721) disallowIfStateIsChanging returns (uint256) { // Y U checking on this address in the same block it's being modified... hmmmm require(admins[_msgSender()] || lastWrite[owner].blockNum < block.number, "hmmmm what doing?"); return super.balanceOf(owner); } function ownerOf(uint256 tokenId) public view virtual override(ERC721, IERC721) disallowIfStateIsChanging 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()] || lastWrite[addr].blockNum < block.number, "hmmmm what doing?"); return addr; } }
// 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() 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 tokenTraits(uint256 tokenId) external view returns (bool a, uint8 b, uint8 c, uint8 d, uint8 e, uint8 f, uint8 g, uint8 h, uint8 i, uint8 j); }
// 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); }
// 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":"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"},{"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":"getNumDragons","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNumDragonsBurned","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNumDragonsStolen","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNumWizards","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNumWizardsBurned","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNumWizardsStolen","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"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":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"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":[{"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"}],"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":"","type":"uint256"}],"name":"tokenTraits","outputs":[{"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"}],"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":[],"name":"updateOriginAccess","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b506040516200433b3803806200433b833981016040819052620000349162000ebd565b604080518082018252601681527f57697a61726473202620447261676f6e732047616d650000000000000000000060208083019182528351808501909452600384526215db9160ea1b908401528151919291620000949160009162000d74565b508051620000aa90600190602084019062000d74565b505050620000c7620000c162000c6c60201b60201c565b62000c70565b600a805460ff60a01b19169055600b819055620000e660048262000ed6565b600c55620000f362000cc2565b6040805160a081018252605081526096602082015260c89181019190915260fa606082015260ff60808201526200012f90601190600562000e03565b506040805160a0810182526004808252602082018190529181018290526060810182905260808101919091526200016b90602390600562000e03565b5060408051610120810182526096815260286020820181905260f092820192909252605a606082015260736080820152608760a082015260c081019190915260c760e08201526064610100820152620001c990601290600962000e03565b5060408051610120810182526003815260076020820152600491810191909152600060608201819052600560808301819052600660a0840152600860c084015260e08301526101008201526200022490602490600962000e03565b50604080516101608101825260ff815260876020820152603c9181018290526082606082015260be60808201819052609c60a083015260fa60c0830152607860e083015261010082019290925260196101208201526101408101919091526200029290601390600b62000e03565b5060408051610160810182526000808252602082018190529181018290526006606082018190526080820181905260a0820183905260c0820183905260e082018390526101008201526008610120820152610140810191909152620002fc90602590600b62000e03565b50604080516102208101825260dd81526064602082015260b591810191909152608c6060820181905260e060808301819052609360a080850191909152605460c0850181905260e48386015261010085019390935261012084019190915260fa61014084015261016083015260f161018083015260cf6101a083015260ad6101c08301526101e082015260fe6102008201526200039e90601490601162000e03565b506040805161022081018252600180825260026020830152600592820183905260006060830181905260808301829052600760a084015260c0830191909152600a60e08301819052610100830193909352610120820192909252600b6101408201819052600c610160830152600d610180830152600e6101a083015260106101c08301526101e08201526102008101919091526200044190602690601162000e03565b50604080516101808101825260af815260646020820181905260289282019290925260fa60608201526073608082015260a0810191909152605060c0820152606e60e082015260b4610100820181905260ff61012083015260d2610140830152610160820152620004b790601590600c62000e03565b506040805161018081018252600381526000602082015260049181019190915260016060820152600b6080820152600760a0820152600860c08201819052600a60e08301526009610100830181905261012083015261014082018190526101608201526200052a90602790600c62000e03565b5060408051610180810182526050815260e1602082015260dc91810191909152602360608201526064608082015260f060a080830191909152604660c083015260e082015260af610100820181905260d9610120830152610140820152603c6101608201526200059f90601690600c62000e03565b506040805161018081018252600181526002602082018190526005928201839052600860608301819052608083019190915260a0820181905260c0820152600960e08201819052610100820152600a61012082018190526007610140830152610160820152906023906200061892910190600c62000e03565b50604080516020810190915260ff81526200063890601790600162000e03565b506040805160208101909152600081526200065890602990600162000e03565b50604080516101808101825260f3815260bd6020820152603291810191909152601e606082018190526037608083015260b460a0830152605060c0830152605a60e0830152609b61010083015261012082015260de61014082015260ff610160820152620006cb90601890600c62000e03565b506040805161018081018252600181526007602082015260059181019190915260026060820152600b6080820181905260a08201819052600060c08301819052600a60e0840152610100830181905261012083015261014082015260036101608201526200073e90602a90600c62000e03565b50604080516020810190915260ff81526200075e90601990600162000e03565b506040805160208101909152600081526200077e90602b90600162000e03565b50604080516101c081018252606481526050602082015260b191810182905260c76060820181905260ff6080830152602860a083015260d360c083015260e0820192909252601961010082015260e66101208201819052605a61014083015260826101608301526101808201929092526101a08101919091526200080790601a90600e62000e03565b50604080516101c081018252600480825260036020830181905292820192909252606081018290526080810191909152600d60a08201819052600960c0830152600160e08301526002610100830152600561012083015261014082015260006101608201526006610180820152600c6101a08201526200088c90602c90600e62000e03565b50604080516020810190915260ff8152620008ac90601b90600162000e03565b50604080516020810190915260008152620008cc90602d90600162000e03565b50604080516020810190915260ff8152620008ec90601c90600162000e03565b506040805160208101909152600081526200090c90602e90600162000e03565b506040805161014081018252605a815260286020820181905260db928201929092526050606082015260b7608082015260e160a082015260c0810191909152607860e0820152603c61010082015260dc6101208201526200097290601d90600a62000e03565b5060408051610140810182526001815260086020820152600391810182905260026060820152600560808201819052600660a083015260c0820152600960e08201526004610100820152610120810191909152620009d590602f90600a62000e03565b50604080516020810190915260ff8152620009f590601e90600162000e03565b5060408051602081019091526000815262000a1590603090600162000e03565b50604080516101c08101825260ef815260f4602082015260ff9181019190915260ea606082018190526080820181905260a0820181905260c0820181905260e08201819052610100820181905261012082018190526101408201819052610160820181905261018082018190526101a082015262000a9890601f90600e62000e03565b50604080516101c081018252600181526002602082018190529181018290526000606082018190526080820183905260a0820192909252600960c082015260e08101919091526005610100820152600461012082018190526101408201819052610160820181905261018082018190526101a082015262000b1e90603190600e62000e03565b506040805160e081018252605080825260c8602080840191909152609093830193909352609160608301526080820152608c60a0820152607860c082015262000b6a9190600762000e03565b506040805160e081018252600181526006602082015260009181018290526060810182905260036080820181905260a082019290925260c081019190915262000bb890603290600762000e03565b50604080516020810190915260ff815262000bd890602190600162000e03565b5060408051602081019091526000815262000bf890603390600162000e03565b5060408051608081018252600e8152609b602082015260509181019190915260ff606082015262000c2e90602290600462000e03565b506040805160808101825260028152600360208201819052918101829052606081019190915262000c6490603490600462000e03565b505062000f34565b3390565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b62000cd6600a54600160a01b900460ff1690565b1562000d1b5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640160405180910390fd5b600a805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25862000d573390565b6040516001600160a01b03909116815260200160405180910390a1565b82805462000d829062000ef7565b90600052602060002090601f01602090048101928262000da6576000855562000df1565b82601f1062000dc157805160ff191683800117855562000df1565b8280016001018555821562000df1579182015b8281111562000df157825182559160200191906001019062000dd4565b5062000dff92915062000ea6565b5090565b82805482825590600052602060002090601f0160209004810192821562000df15791602002820160005b8382111562000e6d57835183826101000a81548160ff021916908360ff160217905550926020019260010160208160000104928301926001030262000e2d565b801562000e9c5782816101000a81549060ff021916905560010160208160000104928301926001030262000e6d565b505062000dff9291505b5b8082111562000dff576000815560010162000ea7565b60006020828403121562000ecf578081fd5b5051919050565b60008262000ef257634e487b7160e01b81526012600452602481fd5b500490565b600181811c9082168062000f0c57607f821691505b6020821081141562000f2e57634e487b7160e01b600052602260045260246000fd5b50919050565b6133f78062000f446000396000f3fe608060405234801561001057600080fd5b50600436106102955760003560e01c80636352211e11610167578063a22cb465116100ce578063e05c57bf11610087578063e05c57bf14610589578063e1fc334f14610662578063e32368cd14610675578063e83157421461067d578063e985e9c514610686578063f2fde38b146106c257600080fd5b8063a22cb46514610521578063b88d4fde14610534578063c084f54014610547578063c87b56dd14610550578063ca14df4f14610563578063d8952a491461057657600080fd5b80638da5cb5b116101205780638da5cb5b146104b857806394e56847146104c957806395d89b41146104e95780639c47ee3b146104f1578063a050d07d146104f9578063a1b8f3741461050157600080fd5b80636352211e146104675780636abcded11461047a578063704802751461048257806370a0823114610495578063715018a6146104a8578063851ad4d6146104b057600080fd5b806333df4b2c1161020b57806342842e0e116101c457806342842e0e1461040657806342966c68146104195780634f02c4201461042c5780634f6ccce71461043a5780635c975abb1461044d5780635ffa25b61461045f57600080fd5b806333df4b2c146103985780633431a753146103bd57806336838391146103d05780633ccfd60b146103e35780634018b1f8146103eb57806340c10f19146103f357600080fd5b806316c38b3c1161025d57806316c38b3c146103325780631785f53c1461034557806318160ddd14610358578063205ae8a41461036a57806323b872dd146103725780632f745c591461038557600080fd5b806301ffc9a71461029a57806303dd0797146102c257806306fdde03146102dd578063081812fc146102f2578063095ea7b31461031d575b600080fd5b6102ad6102a8366004612d8b565b6106d5565b60405190151581526020015b60405180910390f35b6102ca610700565b60405161ffff90911681526020016102b9565b6102e5610774565b6040516102b99190612f76565b610305610300366004612e35565b610806565b6040516001600160a01b0390911681526020016102b9565b61033061032b366004612d48565b61089b565b005b610330610340366004612d71565b6109b1565b610330610353366004612bf6565b610a58565b6008545b6040519081526020016102b9565b6102ca610aa3565b610330610380366004612c42565b610b0e565b61035c610393366004612d48565b610b56565b6103ab6103a6366004612e4d565b610c22565b60405160ff90911681526020016102b9565b6103306103cb366004612e35565b610c68565b6103ab6103de366004612e4d565b610c9b565b610330610cab565b600c5461035c565b610330610401366004612d48565b610d0e565b610330610414366004612c42565b610f14565b610330610427366004612e35565b610f2f565b600d546102ca9061ffff1681565b61035c610448366004612e35565b611089565b600a54600160a01b900460ff166102ad565b6102ca61112a565b610305610475366004612e35565b611195565b600b5461035c565b610330610490366004612bf6565b611266565b61035c6104a3366004612bf6565b6112b4565b610330611378565b6102ca6113ae565b600a546001600160a01b0316610305565b6104dc6104d7366004612e35565b61141a565b6040516102b991906130ed565b6102e561152d565b61033061153c565b6102ca6115b5565b61035c61050f366004612e35565b600f6020526000908152604090205481565b61033061052f366004612d1f565b61161f565b610330610542366004612c7d565b6116e4565b61035c600c5481565b6102e561055e366004612e35565b61171c565b603554610305906001600160a01b031681565b610330610584366004612c10565b61185c565b610607610597366004612e35565b600e6020526000908152604090205460ff808216916101008104821691620100008204811691630100000081048216916401000000008204811691650100000000008104821691600160301b8204811691600160381b8104821691600160401b8204811691600160481b9004168a565b604080519a15158b5260ff998a1660208c0152978916978a01979097529487166060890152928616608088015290851660a0870152841660c0860152831660e0850152821661010084015216610120820152610140016102b9565b603654610305906001600160a01b031681565b6102ca6118b4565b61035c600b5481565b6102ad610694366004612c10565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6103306106d0366004612bf6565b61191f565b60006001600160e01b0319821663780e9d6360e01b14806106fa57506106fa826119b7565b92915050565b3360009081526037602052604081205460ff168061073d57503260009081526010602052604090205443600160401b9091046001600160401b0316105b6107625760405162461bcd60e51b815260040161075990613012565b60405180910390fd5b50600d54600160601b900461ffff1690565b606060008054610783906132d6565b80601f01602080910402602001604051908101604052809291908181526020018280546107af906132d6565b80156107fc5780601f106107d1576101008083540402835291602001916107fc565b820191906000526020600020905b8154815290600101906020018083116107df57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b031661087f5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610759565b506000908152600460205260409020546001600160a01b031690565b60006108a682611a07565b9050806001600160a01b0316836001600160a01b031614156109145760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610759565b336001600160a01b038216148061093057506109308133610694565b6109a25760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610759565b6109ac8383611a7e565b505050565b6036546001600160a01b0316158015906109d557506035546001600160a01b031615155b610a155760405162461bcd60e51b815260206004820152601160248201527010dbdb9d1c9858dd1cc81b9bdd081cd95d607a1b6044820152606401610759565b600a546001600160a01b03163314610a3f5760405162461bcd60e51b815260040161075990613067565b8015610a5057610a4d611aec565b50565b610a4d611b6e565b600a546001600160a01b03163314610a825760405162461bcd60e51b815260040161075990613067565b6001600160a01b03166000908152603760205260409020805460ff19169055565b3360009081526037602052604081205460ff1680610ae057503260009081526010602052604090205443600160401b9091046001600160401b0316105b610afc5760405162461bcd60e51b815260040161075990613012565b50600d54600160501b900461ffff1690565b3360009081526037602052604090205460ff16610b4b57610b2f3382611bf2565b610b4b5760405162461bcd60e51b81526004016107599061309c565b6109ac838383611ce9565b3360009081526037602052604081205460ff1680610b9357503260009081526010602052604090205443600160401b9091046001600160401b0316105b610baf5760405162461bcd60e51b815260040161075990613012565b3360009081526037602052604090205460ff1680610bf557506001600160a01b03831660009081526010602052604090205443600160401b9091046001600160401b0316105b610c115760405162461bcd60e51b815260040161075990613012565b610c1b8383611e94565b9392505050565b60118260128110610c3257600080fd5b018181548110610c4157600080fd5b9060005260206000209060209182820401919006915091509054906101000a900460ff1681565b600a546001600160a01b03163314610c925760405162461bcd60e51b815260040161075990613067565b61ffff16600c55565b60238260128110610c3257600080fd5b600a546001600160a01b03163314610cd55760405162461bcd60e51b815260040161075990613067565b600a546040516001600160a01b03909116904780156108fc02916000818181858888f19350505050158015610a4d573d6000803e3d6000fd5b600a54600160a01b900460ff1615610d385760405162461bcd60e51b81526004016107599061303d565b3360009081526037602052604090205460ff16610d675760405162461bcd60e51b815260040161075990612fdb565b600b54600d54610d7c9061ffff166001613208565b61ffff161115610dc25760405162461bcd60e51b8152602060048201526011602482015270105b1b081d1bdad95b9cc81b5a5b9d1959607a1b6044820152606401610759565b600d805461ffff16906000610dd683613311565b82546101009290920a61ffff818102199093169183160217909155600d54326000908152601060209081526040918290208251808401909352546001600160401b038082168452600160401b9091041690820152610e3993509116908390611f2a565b50326001600160a01b03831614801590610e6157506035546001600160a01b03838116911614155b15610efe57600d5461ffff166000908152600e602052604090205460ff1615610ec3576001600d60068282829054906101000a900461ffff16610ea49190613208565b92506101000a81548161ffff021916908361ffff160217905550610efe565b6001600d60088282829054906101000a900461ffff16610ee39190613208565b92506101000a81548161ffff021916908361ffff1602179055505b600d54610f1090839061ffff1661212b565b5050565b6109ac838383604051806020016040528060008152506116e4565b600a54600160a01b900460ff1615610f595760405162461bcd60e51b81526004016107599061303d565b3360009081526037602052604090205460ff16610f885760405162461bcd60e51b815260040161075990612fdb565b32610f9282611195565b6001600160a01b031614610fe85760405162461bcd60e51b815260206004820152601760248201527f4f6f707320796f7520646f6e2774206f776e20746861740000000000000000006044820152606401610759565b600d5461ffff166000908152600e602052604090205460ff1615611045576001600d600a8282829054906101000a900461ffff166110269190613208565b92506101000a81548161ffff021916908361ffff160217905550611080565b6001600d600c8282829054906101000a900461ffff166110659190613208565b92506101000a81548161ffff021916908361ffff1602179055505b610a4d81612145565b600061109460085490565b82106110f75760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610759565b6008828154811061111857634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b3360009081526037602052604081205460ff168061116757503260009081526010602052604090205443600160401b9091046001600160401b0316105b6111835760405162461bcd60e51b815260040161075990613012565b50600d54600160301b900461ffff1690565b3360009081526037602052604081205460ff16806111d257503260009081526010602052604090205443600160401b9091046001600160401b0316105b6111ee5760405162461bcd60e51b815260040161075990613012565b60006111f983611a07565b3360009081526037602052604090205490915060ff168061124257506001600160a01b03811660009081526010602052604090205443600160401b9091046001600160401b0316105b61125e5760405162461bcd60e51b815260040161075990613012565b90505b919050565b600a546001600160a01b031633146112905760405162461bcd60e51b815260040161075990613067565b6001600160a01b03166000908152603760205260409020805460ff19166001179055565b3360009081526037602052604081205460ff16806112f157503260009081526010602052604090205443600160401b9091046001600160401b0316105b61130d5760405162461bcd60e51b815260040161075990613012565b3360009081526037602052604090205460ff168061135357506001600160a01b03821660009081526010602052604090205443600160401b9091046001600160401b0316105b61136f5760405162461bcd60e51b815260040161075990613012565b6106fa826121ec565b600a546001600160a01b031633146113a25760405162461bcd60e51b815260040161075990613067565b6113ac6000612273565b565b3360009081526037602052604081205460ff16806113eb57503260009081526010602052604090205443600160401b9091046001600160401b0316105b6114075760405162461bcd60e51b815260040161075990613012565b50600d54640100000000900461ffff1690565b611422612b7b565b3360009081526037602052604090205460ff168061145f57503260009081526010602052604090205443600160401b9091046001600160401b0316105b61147b5760405162461bcd60e51b815260040161075990613012565b506000908152600e6020908152604091829020825161014081018452905460ff808216151583526101008083048216948401949094526201000082048116948301949094526301000000810484166060830152640100000000810484166080830152650100000000008104841660a0830152600160301b8104841660c0830152600160381b8104841660e0830152600160401b8104841692820192909252600160481b90910490911661012082015290565b606060018054610783906132d6565b3360009081526037602052604090205460ff1661156b5760405162461bcd60e51b815260040161075990612fdb565b32600090815260106020526040902080546fffffffffffffffffffffffffffffffff1916600160401b436001600160401b031690810267ffffffffffffffff191691909117179055565b3360009081526037602052604081205460ff16806115f257503260009081526010602052604090205443600160401b9091046001600160401b0316105b61160e5760405162461bcd60e51b815260040161075990613012565b50600d5462010000900461ffff1690565b6001600160a01b0382163314156116785760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610759565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6116ee3383611bf2565b61170a5760405162461bcd60e51b81526004016107599061309c565b611716848484846122c5565b50505050565b3360009081526037602052604090205460609060ff168061175c57503260009081526010602052604090205443600160401b9091046001600160401b0316105b6117785760405162461bcd60e51b815260040161075990613012565b6000828152600260205260409020546001600160a01b03166117dc5760405162461bcd60e51b815260206004820152601760248201527f546f6b656e20494420646f6573206e6f742065786973740000000000000000006044820152606401610759565b60365460405163c87b56dd60e01b8152600481018490526001600160a01b039091169063c87b56dd9060240160006040518083038186803b15801561182057600080fd5b505afa158015611834573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526106fa9190810190612dc3565b600a546001600160a01b031633146118865760405162461bcd60e51b815260040161075990613067565b603680546001600160a01b039384166001600160a01b03199182161790915560358054929093169116179055565b3360009081526037602052604081205460ff16806118f157503260009081526010602052604090205443600160401b9091046001600160401b0316105b61190d5760405162461bcd60e51b815260040161075990613012565b50600d54600160401b900461ffff1690565b600a546001600160a01b031633146119495760405162461bcd60e51b815260040161075990613067565b6001600160a01b0381166119ae5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610759565b610a4d81612273565b60006001600160e01b031982166380ac58cd60e01b14806119e857506001600160e01b03198216635b5e139f60e01b145b806106fa57506301ffc9a760e01b6001600160e01b03198316146106fa565b6000818152600260205260408120546001600160a01b03168061125e5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610759565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611ab382611a07565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600a54600160a01b900460ff1615611b165760405162461bcd60e51b81526004016107599061303d565b600a805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611b513390565b6040516001600160a01b03909116815260200160405180910390a1565b600a54600160a01b900460ff16611bbe5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610759565b600a805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33611b51565b6000818152600260205260408120546001600160a01b0316611c6b5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610759565b6000611c7683611a07565b9050806001600160a01b0316846001600160a01b03161480611cb15750836001600160a01b0316611ca684610806565b6001600160a01b0316145b80611ce157506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316611cfc82611a07565b6001600160a01b031614611d645760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610759565b6001600160a01b038216611dc65760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610759565b611dd18383836122f8565b611ddc600082611a7e565b6001600160a01b0383166000908152600360205260408120805460019290611e0590849061326b565b90915550506001600160a01b0382166000908152600360205260408120805460019290611e3390849061322e565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6000611e9f836121ec565b8210611f015760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610759565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b611f32612b7b565b611f3b836123b0565b9050600f6000611f4a8361251e565b8152602001908152602001600020546000141561210e576000848152600e602090815260408083208451815493860151928601516060870151608088015160a089015160c08a015160e08b0151610100808d01516101208e015161ffff19909c1698151561ff0019169890981760ff9a8b169091021763ffff0000191662010000968a169690960263ff0000001916959095176301000000948916949094029390931765ffff0000000019166401000000009288169290920265ff000000000019169190911765010000000000918716919091021767ffff0000000000001916600160301b9186169190910267ff00000000000000191617600160381b918516919091021769ffff00000000000000001916600160401b9184169190910269ff000000000000000000191617600160481b92909316919091029190911790558490600f906120978461251e565b81526020810191909152604001600020558051156120ee576001600d60028282829054906101000a900461ffff166120cf9190613208565b92506101000a81548161ffff021916908361ffff160217905550610c1b565b6001600d60048282829054906101000a900461ffff166120cf9190613208565b611ce1846121258585600001518660200151612582565b84611f2a565b610f10828260405180602001604052806000815250612611565b600061215082611a07565b905061215e816000846122f8565b612169600083611a7e565b6001600160a01b038116600090815260036020526040812080546001929061219290849061326b565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b60006001600160a01b0382166122575760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610759565b506001600160a01b031660009081526003602052604090205490565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6122d0848484611ce9565b6122dc84848484612644565b6117165760405162461bcd60e51b815260040161075990612f89565b6001600160a01b0383166123535761234e81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b612376565b816001600160a01b0316836001600160a01b031614612376576123768382612751565b6001600160a01b03821661238d576109ac816127ee565b826001600160a01b0316826001600160a01b0316146109ac576109ac82826128c7565b6123b8612b7b565b6123c7600a61ffff8416613333565b15158082526000906123da5760096123dd565b60005b60109390931c9290506123fe61ffff84166123f9836000613246565b61290b565b60ff16602083015260109290921c9161242061ffff84166123f9836001613246565b60ff16604083015260109290921c9161244261ffff84166123f9836002613246565b60ff16606083015260109290921c9161246461ffff84166123f9836003613246565b60ff16608083015260109290921c9161248661ffff84166123f9836004613246565b60ff1660a083015260109290921c916124a861ffff84166123f9836005613246565b60ff1660c083015260109290921c916124ca61ffff84166123f9836006613246565b60ff1661010083015260109290921c916124ed61ffff84166123f9836007613246565b60ff1660e083015260109290921c9161250f61ffff84166123f9836008613246565b60ff1661012083015250919050565b80516020808301516040808501516060860151608087015160a088015160c08901516101008a015160e08b01516101208c0151975160009b6125649b909a999101612e9a565b60408051601f19818403018152919052805160209091012092915050565b6000326001836001600160401b03161161259c57826125a7565b6125a7600284613282565b60405160609290921b6bffffffffffffffffffffffff191660208301526001600160401b031640603482015260c084901b6001600160c01b0319166054820152605c8101859052607c0160408051601f198184030181529190528051602090910120949350505050565b61261b8383612a2d565b6126286000848484612644565b6109ac5760405162461bcd60e51b815260040161075990612f89565b60006001600160a01b0384163b1561274657604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612688903390899088908890600401612f39565b602060405180830381600087803b1580156126a257600080fd5b505af19250505080156126d2575060408051601f3d908101601f191682019092526126cf91810190612da7565b60015b61272c573d808015612700576040519150601f19603f3d011682016040523d82523d6000602084013e612705565b606091505b5080516127245760405162461bcd60e51b815260040161075990612f89565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611ce1565b506001949350505050565b6000600161275e846121ec565b612768919061326b565b6000838152600760205260409020549091508082146127bb576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906128009060019061326b565b6000838152600960205260408120546008805493945090928490811061283657634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050806008838154811061286557634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806128ab57634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b60006128d2836121ec565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b60008060118360ff166012811061293257634e487b7160e01b600052603260045260246000fd5b015461293e9085613347565b905060118360ff166012811061296457634e487b7160e01b600052603260045260246000fd5b018160ff168154811061298757634e487b7160e01b600052603260045260246000fd5b60009182526020918290209181049091015460ff601f9092166101000a90048116600886901c90911610156129bd5790506106fa565b60238360ff16601281106129e157634e487b7160e01b600052603260045260246000fd5b018160ff1681548110612a0457634e487b7160e01b600052603260045260246000fd5b90600052602060002090602091828204019190069054906101000a900460ff1691505092915050565b6001600160a01b038216612a835760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610759565b6000818152600260205260409020546001600160a01b031615612ae85760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610759565b612af4600083836122f8565b6001600160a01b0382166000908152600360205260408120805460019290612b1d90849061322e565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6040805161014081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081019190915290565b80356001600160a01b038116811461126157600080fd5b8035801515811461126157600080fd5b600060208284031215612c07578081fd5b610c1b82612bcf565b60008060408385031215612c22578081fd5b612c2b83612bcf565b9150612c3960208401612bcf565b90509250929050565b600080600060608486031215612c56578081fd5b612c5f84612bcf565b9250612c6d60208501612bcf565b9150604084013590509250925092565b60008060008060808587031215612c92578081fd5b612c9b85612bcf565b9350612ca960208601612bcf565b92506040850135915060608501356001600160401b03811115612cca578182fd5b8501601f81018713612cda578182fd5b8035612ced612ce8826131e1565b6131b1565b818152886020838501011115612d01578384fd5b81602084016020830137908101602001929092525092959194509250565b60008060408385031215612d31578182fd5b612d3a83612bcf565b9150612c3960208401612be6565b60008060408385031215612d5a578182fd5b612d6383612bcf565b946020939093013593505050565b600060208284031215612d82578081fd5b610c1b82612be6565b600060208284031215612d9c578081fd5b8135610c1b816133ab565b600060208284031215612db8578081fd5b8151610c1b816133ab565b600060208284031215612dd4578081fd5b81516001600160401b03811115612de9578182fd5b8201601f81018413612df9578182fd5b8051612e07612ce8826131e1565b818152856020838501011115612e1b578384fd5b612e2c8260208301602086016132aa565b95945050505050565b600060208284031215612e46578081fd5b5035919050565b60008060408385031215612e5f578182fd5b50508035926020909101359150565b60008151808452612e868160208601602086016132aa565b601f01601f19169290920160200192915050565b8a151560f890811b82526001600160f81b03198b821b811660018401528a821b8116600284015289821b8116600384015288821b8116600484015287821b8116600584015286821b811660068401529085901b1660078201526000612f0e600883018560f81b6001600160f81b0319169052565b612f27600983018460f81b6001600160f81b0319169052565b50600a019a9950505050505050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612f6c90830184612e6e565b9695505050505050565b602081526000610c1b6020830184612e6e565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526019908201527f4f6e6c792061646d696e732063616e2063616c6c207468697300000000000000604082015260600190565b602080825260119082015270686d6d6d6d207768617420646f696e673f60781b604082015260600190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b8151151581526101408101602083015161310c602084018260ff169052565b506040830151613121604084018260ff169052565b506060830151613136606084018260ff169052565b50608083015161314b608084018260ff169052565b5060a083015161316060a084018260ff169052565b5060c083015161317560c084018260ff169052565b5060e083015161318a60e084018260ff169052565b506101008381015160ff908116918401919091526101209384015116929091019190915290565b604051601f8201601f191681016001600160401b03811182821017156131d9576131d9613395565b604052919050565b60006001600160401b038211156131fa576131fa613395565b50601f01601f191660200190565b600061ffff80831681851680830382111561322557613225613369565b01949350505050565b6000821982111561324157613241613369565b500190565b600060ff821660ff84168060ff0382111561326357613263613369565b019392505050565b60008282101561327d5761327d613369565b500390565b60006001600160401b03838116908316818110156132a2576132a2613369565b039392505050565b60005b838110156132c55781810151838201526020016132ad565b838111156117165750506000910152565b600181811c908216806132ea57607f821691505b6020821081141561330b57634e487b7160e01b600052602260045260246000fd5b50919050565b600061ffff8083168181141561332957613329613369565b6001019392505050565b6000826133425761334261337f565b500690565b600060ff83168061335a5761335a61337f565b8060ff84160691505092915050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b031981168114610a4d57600080fdfea2646970667358221220d73c8cc721ee35b25abdd9ba72ce63b56c8e05fbe72772ee1a5a4232dfc05e3464736f6c63430008040033000000000000000000000000000000000000000000000000000000000000ea60
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102955760003560e01c80636352211e11610167578063a22cb465116100ce578063e05c57bf11610087578063e05c57bf14610589578063e1fc334f14610662578063e32368cd14610675578063e83157421461067d578063e985e9c514610686578063f2fde38b146106c257600080fd5b8063a22cb46514610521578063b88d4fde14610534578063c084f54014610547578063c87b56dd14610550578063ca14df4f14610563578063d8952a491461057657600080fd5b80638da5cb5b116101205780638da5cb5b146104b857806394e56847146104c957806395d89b41146104e95780639c47ee3b146104f1578063a050d07d146104f9578063a1b8f3741461050157600080fd5b80636352211e146104675780636abcded11461047a578063704802751461048257806370a0823114610495578063715018a6146104a8578063851ad4d6146104b057600080fd5b806333df4b2c1161020b57806342842e0e116101c457806342842e0e1461040657806342966c68146104195780634f02c4201461042c5780634f6ccce71461043a5780635c975abb1461044d5780635ffa25b61461045f57600080fd5b806333df4b2c146103985780633431a753146103bd57806336838391146103d05780633ccfd60b146103e35780634018b1f8146103eb57806340c10f19146103f357600080fd5b806316c38b3c1161025d57806316c38b3c146103325780631785f53c1461034557806318160ddd14610358578063205ae8a41461036a57806323b872dd146103725780632f745c591461038557600080fd5b806301ffc9a71461029a57806303dd0797146102c257806306fdde03146102dd578063081812fc146102f2578063095ea7b31461031d575b600080fd5b6102ad6102a8366004612d8b565b6106d5565b60405190151581526020015b60405180910390f35b6102ca610700565b60405161ffff90911681526020016102b9565b6102e5610774565b6040516102b99190612f76565b610305610300366004612e35565b610806565b6040516001600160a01b0390911681526020016102b9565b61033061032b366004612d48565b61089b565b005b610330610340366004612d71565b6109b1565b610330610353366004612bf6565b610a58565b6008545b6040519081526020016102b9565b6102ca610aa3565b610330610380366004612c42565b610b0e565b61035c610393366004612d48565b610b56565b6103ab6103a6366004612e4d565b610c22565b60405160ff90911681526020016102b9565b6103306103cb366004612e35565b610c68565b6103ab6103de366004612e4d565b610c9b565b610330610cab565b600c5461035c565b610330610401366004612d48565b610d0e565b610330610414366004612c42565b610f14565b610330610427366004612e35565b610f2f565b600d546102ca9061ffff1681565b61035c610448366004612e35565b611089565b600a54600160a01b900460ff166102ad565b6102ca61112a565b610305610475366004612e35565b611195565b600b5461035c565b610330610490366004612bf6565b611266565b61035c6104a3366004612bf6565b6112b4565b610330611378565b6102ca6113ae565b600a546001600160a01b0316610305565b6104dc6104d7366004612e35565b61141a565b6040516102b991906130ed565b6102e561152d565b61033061153c565b6102ca6115b5565b61035c61050f366004612e35565b600f6020526000908152604090205481565b61033061052f366004612d1f565b61161f565b610330610542366004612c7d565b6116e4565b61035c600c5481565b6102e561055e366004612e35565b61171c565b603554610305906001600160a01b031681565b610330610584366004612c10565b61185c565b610607610597366004612e35565b600e6020526000908152604090205460ff808216916101008104821691620100008204811691630100000081048216916401000000008204811691650100000000008104821691600160301b8204811691600160381b8104821691600160401b8204811691600160481b9004168a565b604080519a15158b5260ff998a1660208c0152978916978a01979097529487166060890152928616608088015290851660a0870152841660c0860152831660e0850152821661010084015216610120820152610140016102b9565b603654610305906001600160a01b031681565b6102ca6118b4565b61035c600b5481565b6102ad610694366004612c10565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6103306106d0366004612bf6565b61191f565b60006001600160e01b0319821663780e9d6360e01b14806106fa57506106fa826119b7565b92915050565b3360009081526037602052604081205460ff168061073d57503260009081526010602052604090205443600160401b9091046001600160401b0316105b6107625760405162461bcd60e51b815260040161075990613012565b60405180910390fd5b50600d54600160601b900461ffff1690565b606060008054610783906132d6565b80601f01602080910402602001604051908101604052809291908181526020018280546107af906132d6565b80156107fc5780601f106107d1576101008083540402835291602001916107fc565b820191906000526020600020905b8154815290600101906020018083116107df57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b031661087f5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610759565b506000908152600460205260409020546001600160a01b031690565b60006108a682611a07565b9050806001600160a01b0316836001600160a01b031614156109145760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610759565b336001600160a01b038216148061093057506109308133610694565b6109a25760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610759565b6109ac8383611a7e565b505050565b6036546001600160a01b0316158015906109d557506035546001600160a01b031615155b610a155760405162461bcd60e51b815260206004820152601160248201527010dbdb9d1c9858dd1cc81b9bdd081cd95d607a1b6044820152606401610759565b600a546001600160a01b03163314610a3f5760405162461bcd60e51b815260040161075990613067565b8015610a5057610a4d611aec565b50565b610a4d611b6e565b600a546001600160a01b03163314610a825760405162461bcd60e51b815260040161075990613067565b6001600160a01b03166000908152603760205260409020805460ff19169055565b3360009081526037602052604081205460ff1680610ae057503260009081526010602052604090205443600160401b9091046001600160401b0316105b610afc5760405162461bcd60e51b815260040161075990613012565b50600d54600160501b900461ffff1690565b3360009081526037602052604090205460ff16610b4b57610b2f3382611bf2565b610b4b5760405162461bcd60e51b81526004016107599061309c565b6109ac838383611ce9565b3360009081526037602052604081205460ff1680610b9357503260009081526010602052604090205443600160401b9091046001600160401b0316105b610baf5760405162461bcd60e51b815260040161075990613012565b3360009081526037602052604090205460ff1680610bf557506001600160a01b03831660009081526010602052604090205443600160401b9091046001600160401b0316105b610c115760405162461bcd60e51b815260040161075990613012565b610c1b8383611e94565b9392505050565b60118260128110610c3257600080fd5b018181548110610c4157600080fd5b9060005260206000209060209182820401919006915091509054906101000a900460ff1681565b600a546001600160a01b03163314610c925760405162461bcd60e51b815260040161075990613067565b61ffff16600c55565b60238260128110610c3257600080fd5b600a546001600160a01b03163314610cd55760405162461bcd60e51b815260040161075990613067565b600a546040516001600160a01b03909116904780156108fc02916000818181858888f19350505050158015610a4d573d6000803e3d6000fd5b600a54600160a01b900460ff1615610d385760405162461bcd60e51b81526004016107599061303d565b3360009081526037602052604090205460ff16610d675760405162461bcd60e51b815260040161075990612fdb565b600b54600d54610d7c9061ffff166001613208565b61ffff161115610dc25760405162461bcd60e51b8152602060048201526011602482015270105b1b081d1bdad95b9cc81b5a5b9d1959607a1b6044820152606401610759565b600d805461ffff16906000610dd683613311565b82546101009290920a61ffff818102199093169183160217909155600d54326000908152601060209081526040918290208251808401909352546001600160401b038082168452600160401b9091041690820152610e3993509116908390611f2a565b50326001600160a01b03831614801590610e6157506035546001600160a01b03838116911614155b15610efe57600d5461ffff166000908152600e602052604090205460ff1615610ec3576001600d60068282829054906101000a900461ffff16610ea49190613208565b92506101000a81548161ffff021916908361ffff160217905550610efe565b6001600d60088282829054906101000a900461ffff16610ee39190613208565b92506101000a81548161ffff021916908361ffff1602179055505b600d54610f1090839061ffff1661212b565b5050565b6109ac838383604051806020016040528060008152506116e4565b600a54600160a01b900460ff1615610f595760405162461bcd60e51b81526004016107599061303d565b3360009081526037602052604090205460ff16610f885760405162461bcd60e51b815260040161075990612fdb565b32610f9282611195565b6001600160a01b031614610fe85760405162461bcd60e51b815260206004820152601760248201527f4f6f707320796f7520646f6e2774206f776e20746861740000000000000000006044820152606401610759565b600d5461ffff166000908152600e602052604090205460ff1615611045576001600d600a8282829054906101000a900461ffff166110269190613208565b92506101000a81548161ffff021916908361ffff160217905550611080565b6001600d600c8282829054906101000a900461ffff166110659190613208565b92506101000a81548161ffff021916908361ffff1602179055505b610a4d81612145565b600061109460085490565b82106110f75760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610759565b6008828154811061111857634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b3360009081526037602052604081205460ff168061116757503260009081526010602052604090205443600160401b9091046001600160401b0316105b6111835760405162461bcd60e51b815260040161075990613012565b50600d54600160301b900461ffff1690565b3360009081526037602052604081205460ff16806111d257503260009081526010602052604090205443600160401b9091046001600160401b0316105b6111ee5760405162461bcd60e51b815260040161075990613012565b60006111f983611a07565b3360009081526037602052604090205490915060ff168061124257506001600160a01b03811660009081526010602052604090205443600160401b9091046001600160401b0316105b61125e5760405162461bcd60e51b815260040161075990613012565b90505b919050565b600a546001600160a01b031633146112905760405162461bcd60e51b815260040161075990613067565b6001600160a01b03166000908152603760205260409020805460ff19166001179055565b3360009081526037602052604081205460ff16806112f157503260009081526010602052604090205443600160401b9091046001600160401b0316105b61130d5760405162461bcd60e51b815260040161075990613012565b3360009081526037602052604090205460ff168061135357506001600160a01b03821660009081526010602052604090205443600160401b9091046001600160401b0316105b61136f5760405162461bcd60e51b815260040161075990613012565b6106fa826121ec565b600a546001600160a01b031633146113a25760405162461bcd60e51b815260040161075990613067565b6113ac6000612273565b565b3360009081526037602052604081205460ff16806113eb57503260009081526010602052604090205443600160401b9091046001600160401b0316105b6114075760405162461bcd60e51b815260040161075990613012565b50600d54640100000000900461ffff1690565b611422612b7b565b3360009081526037602052604090205460ff168061145f57503260009081526010602052604090205443600160401b9091046001600160401b0316105b61147b5760405162461bcd60e51b815260040161075990613012565b506000908152600e6020908152604091829020825161014081018452905460ff808216151583526101008083048216948401949094526201000082048116948301949094526301000000810484166060830152640100000000810484166080830152650100000000008104841660a0830152600160301b8104841660c0830152600160381b8104841660e0830152600160401b8104841692820192909252600160481b90910490911661012082015290565b606060018054610783906132d6565b3360009081526037602052604090205460ff1661156b5760405162461bcd60e51b815260040161075990612fdb565b32600090815260106020526040902080546fffffffffffffffffffffffffffffffff1916600160401b436001600160401b031690810267ffffffffffffffff191691909117179055565b3360009081526037602052604081205460ff16806115f257503260009081526010602052604090205443600160401b9091046001600160401b0316105b61160e5760405162461bcd60e51b815260040161075990613012565b50600d5462010000900461ffff1690565b6001600160a01b0382163314156116785760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610759565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6116ee3383611bf2565b61170a5760405162461bcd60e51b81526004016107599061309c565b611716848484846122c5565b50505050565b3360009081526037602052604090205460609060ff168061175c57503260009081526010602052604090205443600160401b9091046001600160401b0316105b6117785760405162461bcd60e51b815260040161075990613012565b6000828152600260205260409020546001600160a01b03166117dc5760405162461bcd60e51b815260206004820152601760248201527f546f6b656e20494420646f6573206e6f742065786973740000000000000000006044820152606401610759565b60365460405163c87b56dd60e01b8152600481018490526001600160a01b039091169063c87b56dd9060240160006040518083038186803b15801561182057600080fd5b505afa158015611834573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526106fa9190810190612dc3565b600a546001600160a01b031633146118865760405162461bcd60e51b815260040161075990613067565b603680546001600160a01b039384166001600160a01b03199182161790915560358054929093169116179055565b3360009081526037602052604081205460ff16806118f157503260009081526010602052604090205443600160401b9091046001600160401b0316105b61190d5760405162461bcd60e51b815260040161075990613012565b50600d54600160401b900461ffff1690565b600a546001600160a01b031633146119495760405162461bcd60e51b815260040161075990613067565b6001600160a01b0381166119ae5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610759565b610a4d81612273565b60006001600160e01b031982166380ac58cd60e01b14806119e857506001600160e01b03198216635b5e139f60e01b145b806106fa57506301ffc9a760e01b6001600160e01b03198316146106fa565b6000818152600260205260408120546001600160a01b03168061125e5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610759565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611ab382611a07565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600a54600160a01b900460ff1615611b165760405162461bcd60e51b81526004016107599061303d565b600a805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611b513390565b6040516001600160a01b03909116815260200160405180910390a1565b600a54600160a01b900460ff16611bbe5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610759565b600a805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33611b51565b6000818152600260205260408120546001600160a01b0316611c6b5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610759565b6000611c7683611a07565b9050806001600160a01b0316846001600160a01b03161480611cb15750836001600160a01b0316611ca684610806565b6001600160a01b0316145b80611ce157506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316611cfc82611a07565b6001600160a01b031614611d645760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610759565b6001600160a01b038216611dc65760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610759565b611dd18383836122f8565b611ddc600082611a7e565b6001600160a01b0383166000908152600360205260408120805460019290611e0590849061326b565b90915550506001600160a01b0382166000908152600360205260408120805460019290611e3390849061322e565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6000611e9f836121ec565b8210611f015760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610759565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b611f32612b7b565b611f3b836123b0565b9050600f6000611f4a8361251e565b8152602001908152602001600020546000141561210e576000848152600e602090815260408083208451815493860151928601516060870151608088015160a089015160c08a015160e08b0151610100808d01516101208e015161ffff19909c1698151561ff0019169890981760ff9a8b169091021763ffff0000191662010000968a169690960263ff0000001916959095176301000000948916949094029390931765ffff0000000019166401000000009288169290920265ff000000000019169190911765010000000000918716919091021767ffff0000000000001916600160301b9186169190910267ff00000000000000191617600160381b918516919091021769ffff00000000000000001916600160401b9184169190910269ff000000000000000000191617600160481b92909316919091029190911790558490600f906120978461251e565b81526020810191909152604001600020558051156120ee576001600d60028282829054906101000a900461ffff166120cf9190613208565b92506101000a81548161ffff021916908361ffff160217905550610c1b565b6001600d60048282829054906101000a900461ffff166120cf9190613208565b611ce1846121258585600001518660200151612582565b84611f2a565b610f10828260405180602001604052806000815250612611565b600061215082611a07565b905061215e816000846122f8565b612169600083611a7e565b6001600160a01b038116600090815260036020526040812080546001929061219290849061326b565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b60006001600160a01b0382166122575760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610759565b506001600160a01b031660009081526003602052604090205490565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6122d0848484611ce9565b6122dc84848484612644565b6117165760405162461bcd60e51b815260040161075990612f89565b6001600160a01b0383166123535761234e81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b612376565b816001600160a01b0316836001600160a01b031614612376576123768382612751565b6001600160a01b03821661238d576109ac816127ee565b826001600160a01b0316826001600160a01b0316146109ac576109ac82826128c7565b6123b8612b7b565b6123c7600a61ffff8416613333565b15158082526000906123da5760096123dd565b60005b60109390931c9290506123fe61ffff84166123f9836000613246565b61290b565b60ff16602083015260109290921c9161242061ffff84166123f9836001613246565b60ff16604083015260109290921c9161244261ffff84166123f9836002613246565b60ff16606083015260109290921c9161246461ffff84166123f9836003613246565b60ff16608083015260109290921c9161248661ffff84166123f9836004613246565b60ff1660a083015260109290921c916124a861ffff84166123f9836005613246565b60ff1660c083015260109290921c916124ca61ffff84166123f9836006613246565b60ff1661010083015260109290921c916124ed61ffff84166123f9836007613246565b60ff1660e083015260109290921c9161250f61ffff84166123f9836008613246565b60ff1661012083015250919050565b80516020808301516040808501516060860151608087015160a088015160c08901516101008a015160e08b01516101208c0151975160009b6125649b909a999101612e9a565b60408051601f19818403018152919052805160209091012092915050565b6000326001836001600160401b03161161259c57826125a7565b6125a7600284613282565b60405160609290921b6bffffffffffffffffffffffff191660208301526001600160401b031640603482015260c084901b6001600160c01b0319166054820152605c8101859052607c0160408051601f198184030181529190528051602090910120949350505050565b61261b8383612a2d565b6126286000848484612644565b6109ac5760405162461bcd60e51b815260040161075990612f89565b60006001600160a01b0384163b1561274657604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612688903390899088908890600401612f39565b602060405180830381600087803b1580156126a257600080fd5b505af19250505080156126d2575060408051601f3d908101601f191682019092526126cf91810190612da7565b60015b61272c573d808015612700576040519150601f19603f3d011682016040523d82523d6000602084013e612705565b606091505b5080516127245760405162461bcd60e51b815260040161075990612f89565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611ce1565b506001949350505050565b6000600161275e846121ec565b612768919061326b565b6000838152600760205260409020549091508082146127bb576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906128009060019061326b565b6000838152600960205260408120546008805493945090928490811061283657634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050806008838154811061286557634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806128ab57634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b60006128d2836121ec565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b60008060118360ff166012811061293257634e487b7160e01b600052603260045260246000fd5b015461293e9085613347565b905060118360ff166012811061296457634e487b7160e01b600052603260045260246000fd5b018160ff168154811061298757634e487b7160e01b600052603260045260246000fd5b60009182526020918290209181049091015460ff601f9092166101000a90048116600886901c90911610156129bd5790506106fa565b60238360ff16601281106129e157634e487b7160e01b600052603260045260246000fd5b018160ff1681548110612a0457634e487b7160e01b600052603260045260246000fd5b90600052602060002090602091828204019190069054906101000a900460ff1691505092915050565b6001600160a01b038216612a835760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610759565b6000818152600260205260409020546001600160a01b031615612ae85760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610759565b612af4600083836122f8565b6001600160a01b0382166000908152600360205260408120805460019290612b1d90849061322e565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6040805161014081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081019190915290565b80356001600160a01b038116811461126157600080fd5b8035801515811461126157600080fd5b600060208284031215612c07578081fd5b610c1b82612bcf565b60008060408385031215612c22578081fd5b612c2b83612bcf565b9150612c3960208401612bcf565b90509250929050565b600080600060608486031215612c56578081fd5b612c5f84612bcf565b9250612c6d60208501612bcf565b9150604084013590509250925092565b60008060008060808587031215612c92578081fd5b612c9b85612bcf565b9350612ca960208601612bcf565b92506040850135915060608501356001600160401b03811115612cca578182fd5b8501601f81018713612cda578182fd5b8035612ced612ce8826131e1565b6131b1565b818152886020838501011115612d01578384fd5b81602084016020830137908101602001929092525092959194509250565b60008060408385031215612d31578182fd5b612d3a83612bcf565b9150612c3960208401612be6565b60008060408385031215612d5a578182fd5b612d6383612bcf565b946020939093013593505050565b600060208284031215612d82578081fd5b610c1b82612be6565b600060208284031215612d9c578081fd5b8135610c1b816133ab565b600060208284031215612db8578081fd5b8151610c1b816133ab565b600060208284031215612dd4578081fd5b81516001600160401b03811115612de9578182fd5b8201601f81018413612df9578182fd5b8051612e07612ce8826131e1565b818152856020838501011115612e1b578384fd5b612e2c8260208301602086016132aa565b95945050505050565b600060208284031215612e46578081fd5b5035919050565b60008060408385031215612e5f578182fd5b50508035926020909101359150565b60008151808452612e868160208601602086016132aa565b601f01601f19169290920160200192915050565b8a151560f890811b82526001600160f81b03198b821b811660018401528a821b8116600284015289821b8116600384015288821b8116600484015287821b8116600584015286821b811660068401529085901b1660078201526000612f0e600883018560f81b6001600160f81b0319169052565b612f27600983018460f81b6001600160f81b0319169052565b50600a019a9950505050505050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612f6c90830184612e6e565b9695505050505050565b602081526000610c1b6020830184612e6e565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526019908201527f4f6e6c792061646d696e732063616e2063616c6c207468697300000000000000604082015260600190565b602080825260119082015270686d6d6d6d207768617420646f696e673f60781b604082015260600190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b8151151581526101408101602083015161310c602084018260ff169052565b506040830151613121604084018260ff169052565b506060830151613136606084018260ff169052565b50608083015161314b608084018260ff169052565b5060a083015161316060a084018260ff169052565b5060c083015161317560c084018260ff169052565b5060e083015161318a60e084018260ff169052565b506101008381015160ff908116918401919091526101209384015116929091019190915290565b604051601f8201601f191681016001600160401b03811182821017156131d9576131d9613395565b604052919050565b60006001600160401b038211156131fa576131fa613395565b50601f01601f191660200190565b600061ffff80831681851680830382111561322557613225613369565b01949350505050565b6000821982111561324157613241613369565b500190565b600060ff821660ff84168060ff0382111561326357613263613369565b019392505050565b60008282101561327d5761327d613369565b500390565b60006001600160401b03838116908316818110156132a2576132a2613369565b039392505050565b60005b838110156132c55781810151838201526020016132ad565b838111156117165750506000910152565b600181811c908216806132ea57607f821691505b6020821081141561330b57634e487b7160e01b600052602260045260246000fd5b50919050565b600061ffff8083168181141561332957613329613369565b6001019392505050565b6000826133425761334261337f565b500690565b600060ff83168061335a5761335a61337f565b8060ff84160691505092915050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b031981168114610a4d57600080fdfea2646970667358221220d73c8cc721ee35b25abdd9ba72ce63b56c8e05fbe72772ee1a5a4232dfc05e3464736f6c63430008040033
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
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.