Overview
TokenID
422
Total Transfers
-
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Metapass
Compiler Version
v0.8.12+commit.f00d7308
Optimization Enabled:
Yes with 800 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.12; import {ERC721OwnershipBasedStaking} from "../token/ERC721/extensions/ERC721OwnershipBasedStaking.sol"; import {ERC721Royalty} from "../token/ERC721/extensions/ERC721Royalty.sol"; import {ERC721} from "../token/ERC721/ERC721.sol"; import {MintGate} from "../token/libraries/MintGate.sol"; import {Withdrawable} from "../utilities/Withdrawable.sol"; error AddressNotWhitelisted(); contract Metapass is ERC721OwnershipBasedStaking, ERC721Royalty, Withdrawable { uint256 public constant GAME_RESERVE = 250; uint256 public constant MAX_MINT_PER_WALLET = 2; uint256 public constant MAX_SUPPLY = 5000; // April 17, 2022 - 9:00 AM PST uint256 public constant MINT_END_TIME = 1650211200; // April 16, 2022 - 9:00 AM PST uint256 public constant MINT_START_TIME = 1650124800; uint256 public constant PUBLIC_PRICE = 0.2 ether; uint256 public constant VAULT_RESERVE = 750; address public constant VAULT_WALLET = 0x24D9EC1327eE15cD102ba72Fe98B580A7424af8B; bytes32 public constant WHITELIST_MERKLE_ROOT = 0xce40398c6324370b2faa1f4b6080e79641d61160efbb67c338bdde85a78e5313; uint256 public constant WHITELIST_PRICE = 0.15 ether; // April 15, 2022 - 9:00 AM PST uint256 public constant WHITELIST_START_TIME = 1650038400; constructor() ERC721OwnershipBasedStaking("Metapass", "metapass") ERC721Royalty(_msgSender(), 750) { setConfig(ERC721OwnershipBasedStaking.Config({ fusible: false, listingFee: 0, resetOnTransfer: true, rewardsPerWeek: 3, // ( Rewards per week ) * ( 4 weeks ) * ( 6 months ) * ( x4 Minter Multiplier ) upgradeFee: (3 * 4 * 3 * 4) })); setMultipliers(ERC721OwnershipBasedStaking.Multipliers({ level: 1000, max: 80000, minter: 40000, // Once 'MINTER_MULTIPLIER' is lost it should take 4 months to regain month: 10000 })); } function _afterTokenTransfers(address from, address to, uint256 startTokenId, uint256 quantity) internal override(ERC721, ERC721OwnershipBasedStaking) virtual { super._afterTokenTransfers(from, to, startTokenId, quantity); } function mintPublic(uint256 quantity) external nonReentrant payable { uint256 available = MAX_SUPPLY - GAME_RESERVE - VAULT_RESERVE - totalMinted(); address buyer = _msgSender(); MintGate.price(buyer, PUBLIC_PRICE, quantity, msg.value); MintGate.supply(available, MAX_MINT_PER_WALLET, uint256(_owner(buyer).minted), quantity); MintGate.time(MINT_END_TIME, MINT_START_TIME); _safeMint(buyer, quantity); } function mintToGameWallet(uint256 quantity) external nonReentrant onlyOwner { MintGate.supply((MAX_SUPPLY - totalMinted()), GAME_RESERVE, uint256(_owner(_msgSender()).minted), quantity); _safeMint(_msgSender(), quantity); } function mintToVaultWallet(uint256 quantity) external nonReentrant onlyOwner { MintGate.supply((MAX_SUPPLY - totalMinted()), VAULT_RESERVE, uint256(_owner(VAULT_WALLET).minted), quantity); _safeMint(VAULT_WALLET, quantity); } function mintUnsoldToVaultWallet() external nonReentrant onlyOwner { uint256 quantity = MAX_SUPPLY - totalMinted(); if (MINT_END_TIME > block.timestamp || quantity == 0) { revert(); } if (quantity > 10) { quantity = 10; } _safeMint(VAULT_WALLET, quantity); } function mintWhitelist(bytes32[] calldata proof, uint256 quantity) external nonReentrant payable { uint256 available = MAX_SUPPLY - GAME_RESERVE - VAULT_RESERVE - totalMinted(); address buyer = _msgSender(); if (proof.length == 0 || !MintGate.isWhitelisted(buyer, proof, WHITELIST_MERKLE_ROOT)) { revert AddressNotWhitelisted(); } MintGate.price(buyer, WHITELIST_PRICE, quantity, msg.value); MintGate.supply(available, MAX_MINT_PER_WALLET, _owner(buyer).minted, quantity); MintGate.time(MINT_START_TIME, WHITELIST_START_TIME); _safeMint(buyer, quantity); } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721OwnershipBasedStaking, ERC721Royalty) returns (bool) { return super.supportsInterface(interfaceId); } function withdraw() external onlyOwner nonReentrant whenNotPaused { _withdraw(owner(), address(this).balance); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.12; import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import {Admin} from "../../../utilities/Admin.sol"; import {CallerNotOwnerNorApproved, ERC721} from "../ERC721.sol"; error AmountExceedsAccountBalance(string method); error FeatureIsDisabled(); error ZeroRewards(); abstract contract ERC721OwnershipBasedStaking is Admin, ERC721, ReentrancyGuard { event Charged(uint256 indexed tokenId, uint64 amount, address indexed sender); event Deposited(uint256 indexed tokenId, uint64 amount, address indexed sender); event LevelUpdated(uint256 indexed tokenId, uint64 current, uint64 previous); struct Account { uint64 balance; uint64 claimedAt; uint64 level; } struct Config { // If true NFT can be fused with another within the collection bool fusible; // Fee charged ( in staking rewards ) when creating a token swap for staking rewards uint64 listingFee; // Reset staking rewards on transfer if true, otherwise false bool resetOnTransfer; // Staking rewards earned per week uint64 rewardsPerWeek; // Fee charged to upgrade the level of NFT // - Grants access to better perks in the system uint64 upgradeFee; } struct Multipliers { // Level staking multiplier ( in Basis Points ) uint64 level; // Max staking multiplier ( in Basis Points ) uint64 max; // Original minter multiplier ( in Basis Points ) uint64 minter; // Multiplier per month owned ( in Basis Points ) uint64 month; } mapping(uint256 => Account) private _accounts; Config private _config; Multipliers private _multipliers; constructor(string memory name_, string memory symbol_) ERC721(name_, symbol_) ReentrancyGuard() { } function _afterTokenTransfers(address from, address to, uint256 startTokenId, uint256 quantity) internal override(ERC721) virtual { super._afterTokenTransfers(from, to, startTokenId, quantity); if (!_config.resetOnTransfer) { return; } for (uint256 i = 0; i < quantity; i++) { _accounts[startTokenId + i].balance = 0; } } function _charge(uint256 tokenId, uint64 amount, string memory method) private returns (uint256) { unchecked { Account storage account = _accounts[tokenId]; if (account.balance < amount) { revert AmountExceedsAccountBalance({ method: method }); } account.balance -= amount; return uint256(account.balance); } } function calculateStakingRewards(uint256 tokenId) public view returns (uint256) { Account memory account = _accounts[tokenId]; Multipliers memory m = _multipliers; Token memory token = _token(tokenId); unchecked { uint64 claimedAt = account.claimedAt; uint64 timestamp = uint64(block.timestamp); if (claimedAt < token.updatedAt) { claimedAt = token.updatedAt; } if (timestamp < claimedAt) { return 0; } // Convert level to bonus in Basis Points ( Level 1 * 1000 = 10% bonus ) uint64 multiplier = 10000 + (account.level * m.level); uint64 points = _config.rewardsPerWeek * ((timestamp - claimedAt) / uint64(1 weeks)); // Apply original minter/owner multiplier if (token.state == ERC721.STATE_MINTED) { multiplier += m.minter; } multiplier += m.month * ((timestamp - token.updatedAt) / uint64(4 weeks)); if (multiplier > m.max) { multiplier = m.max; } return uint256(points + (points * multiplier / 10000)); } } function charge(uint256 tokenId, uint64 amount) external nonReentrant returns (uint256) { address sender = _msgSender(); if (!_isAdmin(sender)) { revert CallerNotOwnerNorApproved({ method: 'charge' }); } emit Charged(tokenId, amount, sender); return _charge(tokenId, amount, 'charge'); } function claimStakingRewards(uint256 tokenId) external nonReentrant returns (uint256) { address sender = _msgSender(); if (!_isApprovedOrOwner(tokenId, sender)) { revert CallerNotOwnerNorApproved({ method: 'claimStakingRewards' }); } unchecked { uint256 rewards = calculateStakingRewards(tokenId); if (rewards == 0) { revert ZeroRewards(); } Account storage account = _accounts[tokenId]; account.balance += uint64(rewards); account.claimedAt = uint64(block.timestamp); return uint256(account.balance); } } function config() external view returns (bool, uint64, bool, uint64, uint64) { return ( _config.fusible, _config.listingFee, _config.resetOnTransfer, _config.rewardsPerWeek, _config.upgradeFee ); } function deposit(uint256 tokenId, uint64 amount) private returns (uint64) { address sender = _msgSender(); if (!_isAdmin(sender)) { revert CallerNotOwnerNorApproved({ method: 'deposit' }); } emit Deposited(tokenId, amount, sender); unchecked { Account storage account = _accounts[tokenId]; account.balance += amount; return account.balance; } } function fuse(uint256 a, uint256 b) external nonReentrant virtual { if (!_config.fusible) { revert FeatureIsDisabled(); } address sender = _msgSender(); if (!_isAdmin(sender) && (ownerOf(a) != sender || ownerOf(b) != sender)) { revert CallerNotOwnerNorApproved({ method: 'fuse' }); } Account storage A = _accounts[a]; // Balances shouldn't be merged during fusing. Fused passes would become // too OP. They would have the ability to stake -> fuse -> continously // sweep the vault. // - Primary purpose of fusing should be to achieve max multiplier // and access items available to rarer passes. // - In order to gain the above perks you will have to sacrifice the // staking rewards in pass b. unchecked { uint64 previous = A.level; A.level += _accounts[b].level + 1; emit LevelUpdated(a, A.level, previous); } _burn(b, false); delete _accounts[b]; } function multipliers() external view returns (uint64, uint64, uint64, uint64) { return ( _multipliers.level, _multipliers.max, _multipliers.minter, _multipliers.month ); } function rewardsOf(uint256 tokenId) external view returns (uint64) { return _accounts[tokenId].balance; } function rewardsOf(uint256[] memory tokenIds) external view returns (uint64[] memory) { uint64[] memory balances; uint256 n = tokenIds.length; for (uint256 i = 0; i < n; i++) { balances[i] = _accounts[tokenIds[i]].balance; } return balances; } function setConfig(Config memory data) onlyOwner public { _config = data; } function setMultipliers(Multipliers memory data) onlyOwner public { _multipliers = data; } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721) returns (bool) { return super.supportsInterface(interfaceId); } function upgrade(uint256 tokenId) external nonReentrant virtual { uint64 fee = _config.upgradeFee; if (fee == 0) { revert FeatureIsDisabled(); } address sender = _msgSender(); if (ownerOf(tokenId) != sender) { revert CallerNotOwnerNorApproved({ method: 'upgrade' }); } _charge(tokenId, fee, 'upgrade'); unchecked { Account storage account = _accounts[tokenId]; uint64 previous = account.level; account.level += 1; emit LevelUpdated(tokenId, account.level, previous); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.12; import {ERC2981} from "../../ERC2981/ERC2981.sol"; import {ERC721} from "../ERC721.sol"; abstract contract ERC721Royalty is ERC721, ERC2981 { constructor(address receiver, uint256 fee) ERC2981(receiver, fee) {} function setDefaultRoyaltyInfo(address receiver, uint256 fee) internal onlyOwner { _setDefaultRoyaltyInfo(receiver, fee); } function setRoyaltyInfo(uint256 tokenId, address receiver, uint256 fee) internal onlyOwner { _setRoyaltyInfo(tokenId, receiver, fee); } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC2981) returns (bool) { return super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT // Fork of ERC721A created by Chiru Labs pragma solidity ^0.8.12; import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {Pausable} from "@openzeppelin/contracts/security/Pausable.sol"; import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import {IERC721Metadata} from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import {IERC721Receiver} from "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import {ERC165, IERC165} from "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import {Address} from "@openzeppelin/contracts/utils/Address.sol"; import {Context} from "@openzeppelin/contracts/utils/Context.sol"; import {Strings} from "@openzeppelin/contracts/utils/Strings.sol"; error ApproveToCaller(); error ApprovalToCurrentOwner(); error CallerNotOwnerNorApproved(string method); error MethodReceivedZeroAddress(string method); error MintZeroQuantity(); error QueryForNonexistentToken(string method); error TokenQueryProducedVariant(); error TransferFromIncorrectOwner(); error TransferToNonERC721ReceiverImplementer(); /** * Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3...) * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * Assumes that the maximum token tokenId cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, Ownable, Pausable { using Address for address; using Strings for uint256; uint32 public constant MINT_BATCH_SIZE = 8; uint32 public constant STATE_BURNED = 1; uint32 public constant STATE_MINTED = 2; uint32 public constant STATE_TRANSFERRED = 3; struct Approvals { // Owner Address => [Operator Address => Approved if true, otherwise false] mapping(address => mapping(address => bool)) operators; // Token Id => Approved Address mapping(uint256 => address) tokens; } struct Owner { uint64 balance; uint64 burned; uint64 minted; uint64 misc; } struct Token { address owner; uint32 state; uint64 updatedAt; } string internal _baseURI; uint256 private _burned; string internal _name; uint256 private _nextId; string internal _symbol; // Namespaced Approval Data Approvals private _approvals; // Owner Address => Owner Data mapping(address => Owner) private _owners; // Token Id => Token Data mapping(uint256 => Token) private _tokens; mapping(uint256 => string) private _tokenURI; constructor(string memory name_, string memory symbol_) Ownable() Pausable() { _name = name_; _nextId = _startTokenId(); _symbol = symbol_; } /** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * And also called after one token has been burned. * * startTokenId - the first token tokenId to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers(address from, address to, uint256 startTokenId, uint256 quantity) internal virtual {} /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address from, address to, uint256 tokenId) private { _approvals.tokens[tokenId] = to; emit Approval(from, to, tokenId); } /** * @dev Hook that is called before a set of serially-ordered token ids are * about to be transferred. This includes minting. And also called before * burning one token. * * startTokenId - the first token tokenId to be transferred * quantity - the amount to be transferred * * 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, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers(address from, address to, uint256 startTokenId, uint256 quantity) internal virtual {} /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool verifyApproved) internal virtual whenNotPaused { Token memory token = _token(tokenId); if (verifyApproved && !_isApprovedOrOwner(tokenId, _msgSender())) { revert CallerNotOwnerNorApproved({ method: '_burn' }); } _beforeTokenTransfers(token.owner, address(0), tokenId, 1); // Clear approvals from the previous owner _approve(token.owner, address(0), tokenId); // Update next 'tokenId' if owned by 'from' _setDeferredOwnership(tokenId, token); // Underflow of the sender's balance is impossible because we check for // token above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { Owner storage owner = _owners[token.owner]; owner.balance -= 1; owner.burned += 1; _burned += 1; } // Keep track of last owner _tokens[tokenId] = Token({ owner: token.owner, state: STATE_BURNED, updatedAt: uint64(block.timestamp) }); emit Transfer(token.owner, address(0), tokenId); _afterTokenTransfers(token.owner, address(0), tokenId, 1); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * @param from address representing the previous owner of the given token tokenId * @param to target address that will receive the tokens * @param tokenId uint256 tokenId 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 _checkContractOnERC721Received(address from, address to, uint256 tokenId, bytes memory data) private returns (bool) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) { return retval == IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } assembly { revert(add(32, reason), mload(reason)) } } } /** * @dev Returns whether `tokenId` exists. * * Tokens start existing when they are minted (`_mint`), */ function _exists(uint256 tokenId) internal view returns (bool) { return (tokenId + 1) > _startTokenId() && tokenId < _nextId && _tokens[tokenId].state != STATE_BURNED; } function _isApprovedOrOwner(uint256 tokenId, address sender) internal view returns (bool) { address owner = ownerOf(tokenId); return sender == owner || getApproved(tokenId) == sender || isApprovedForAll(owner, sender); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _mint(address to, uint256 quantity, bytes memory data, bool safe) internal whenNotPaused { uint256 start = _nextId; if (to == address(0)) { revert MethodReceivedZeroAddress({ method: '_mint' }); } if (quantity == 0) { revert MintZeroQuantity(); } _beforeTokenTransfers(address(0), to, start, quantity); // Overflows are incredibly unrealistic. // balance or minted overflow if current value of either + quantity > 1.8e19 (2**64) - 1 // tokenId overflows if _nextId + quantity > 1.2e77 (2**256) - 1 unchecked { Owner storage owner = _owners[to]; owner.balance += uint64(quantity); owner.minted += uint64(quantity); uint256 batches = quantity / MINT_BATCH_SIZE; if (quantity % MINT_BATCH_SIZE != 0) { batches += 1; } for (uint256 batch = 0; batch < batches; batch++) { _tokens[start + (MINT_BATCH_SIZE * batch)] = Token({ owner: to, state: STATE_MINTED, updatedAt: uint64(block.timestamp) }); } uint256 current = start; uint256 last = current + quantity; if (safe && to.isContract()) { do { emit Transfer(address(0), to, current); if (!_checkContractOnERC721Received(address(0), to, current++, data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (current != last); // Reentrancy protection if (_nextId != start) { revert(); } } else { do { emit Transfer(address(0), to, current++); } while (current != last); } _nextId = current; } _afterTokenTransfers(address(0), to, start, quantity); } function _owner(address owner) internal view returns (Owner memory) { return _owners[owner]; } function _safeMint(address to, uint256 quantity) internal { _safeMint(to, quantity, ''); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 quantity, bytes memory data) internal { _mint(to, quantity, data, true); } /** * If the token slot of tokenId+1 is not explicitly set, that means the * transfer initiator owns it. Set the slot of tokenId+1 explicitly in * storage to maintain correctness for ownerOf(tokenId+1) calls. */ function _setDeferredOwnership(uint256 tokenId, Token memory token) private { uint256 next = tokenId + 1; if (_exists(next) && _tokens[next].owner == address(0)) { _tokens[next] = token; } } function _startTokenId() internal view virtual returns (uint256) { return 1; } /** * Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around in the collection over time. */ function _token(uint256 tokenId) internal view returns (Token memory) { if (!_exists(tokenId)) { revert QueryForNonexistentToken({ method: '_token' }); } unchecked { uint256 batch = MINT_BATCH_SIZE + 1; uint256 n = _startTokenId(); if (tokenId > batch) { n = tokenId - batch; } for (uint256 i = tokenId; i > n; i--) { Token memory token = _tokens[i]; if (token.owner != address(0)) { return token; } } } revert TokenQueryProducedVariant(); } /** * @dev Transfers `tokenId` from `from` to `to`. * * 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) private whenNotPaused { Token memory token = _token(tokenId); if (to == address(0)) { revert MethodReceivedZeroAddress({ method: '_transfer' }); } if (token.owner != from) { revert TransferFromIncorrectOwner(); } if (!_isApprovedOrOwner(tokenId, _msgSender())) { revert CallerNotOwnerNorApproved({ method: '_transfer' }); } _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner _approve(token.owner, address(0), tokenId); // Update next tokenId if owned by 'from' _setDeferredOwnership(tokenId, token); // Underflow of the sender's balance is impossible because we check for // token above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { _owners[from].balance -= 1; _owners[to].balance += 1; } _tokens[tokenId] = Token({ owner: to, state: uint32(STATE_TRANSFERRED), updatedAt: uint64(block.timestamp) }); emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev See {IERC721-approve} */ function approve(address to, uint256 tokenId) override public { address owner = ownerOf(tokenId); address sender = _msgSender(); if (to == owner) { revert ApprovalToCurrentOwner(); } if (sender != owner && !isApprovedForAll(owner, sender)) { revert CallerNotOwnerNorApproved({ method: 'approve' }); } _approve(owner, to, tokenId); } /** * @dev See {IERC721-balanceOf} */ function balanceOf(address owner) override public view returns (uint256) { if (owner == address(0)) { revert MethodReceivedZeroAddress({ method: 'balanceOf' }); } return uint256(_owners[owner].balance); } /** * @dev See {IERC721-getApproved} */ function getApproved(uint256 tokenId) override public view returns (address) { if (!_exists(tokenId)) { revert QueryForNonexistentToken({ method: 'getApproved' }); } return _approvals.tokens[tokenId]; } /** * @dev See {IERC721-isApprovedForAll} */ function isApprovedForAll(address owner, address operator) override public view virtual returns (bool) { return _approvals.operators[owner][operator]; } function name() override(IERC721Metadata) public view virtual returns (string memory) { return _name; } /** * @dev See {IERC721-ownerOf} */ function ownerOf(uint256 tokenId) override public view returns (address) { return _token(tokenId).owner; } function pause() external onlyOwner { _pause(); } /** * @dev See {IERC721-safeTransferFrom} */ function safeTransferFrom(address from, address to, uint256 tokenId) override public virtual { safeTransferFrom(from, to, tokenId, ''); } /** * @dev See {IERC721-safeTransferFrom} */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) override public virtual { _transfer(from, to, tokenId); if (to.isContract() && !_checkContractOnERC721Received(from, to, tokenId, data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @dev See {IERC721-setApprovalForAll} */ function setApprovalForAll(address operator, bool approved) override public virtual { address sender = _msgSender(); if (operator == sender) { revert ApproveToCaller(); } _approvals.operators[sender][operator] = approved; emit ApprovalForAll(sender, operator, approved); } function setBaseURI(string memory uri) public onlyOwner virtual { _baseURI = uri; } function setTokenURI(uint256 tokenId, string memory uri) public onlyOwner virtual { if (!_exists(tokenId)) { revert QueryForNonexistentToken({ method: 'setTokenURI' }); } _tokenURI[tokenId] = uri; } /** * @dev See {IERC165-supportsInterface} */ function supportsInterface(bytes4 interfaceId) override(ERC165, IERC165) public view virtual returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } function symbol() override(IERC721Metadata) public view virtual returns (string memory) { return _symbol; } function tokensOf(address owner, uint256 cursor, uint256 size) external view returns (uint256[] memory, uint256) { uint256 balance = balanceOf(owner); uint256 max = _nextId; if (balance == 0) { return (new uint256[](0), cursor); } unchecked { if (cursor < _startTokenId()) { cursor = _startTokenId(); } uint256 length = size; if (length > max - cursor) { length = max - cursor; } uint256[] memory ids = new uint256[](balance); // Cursor token may not be 'initialized' due to ERC721A design, use // normal token fetching function to find owner of token. Token memory token = _token(cursor); address current; if (token.state != STATE_BURNED) { current = token.owner; } uint256 j; for (uint256 i = cursor; i != length && j != balance; i++) { token = _tokens[i]; if (token.owner == address(0) || token.state == STATE_BURNED) { continue; } current = token.owner; if (current == owner) { ids[j++] = i; } } // Downsize the array to fit assembly { mstore(ids, j) } return (ids, (cursor + size)); } } function tokenURI(uint256 tokenId) override(IERC721Metadata) public view virtual returns (string memory) { if (!_exists(tokenId)) { revert QueryForNonexistentToken({ method: 'tokenURI' }); } string memory base = _baseURI; string memory token = _tokenURI[tokenId]; if (bytes(token).length == 0) { token = tokenId.toString(); } if (bytes(base).length != 0) { return string(abi.encodePacked(base, token)); } return token; } function totalBurned() public view returns (uint256) { return _burned; } function totalMinted() public view returns (uint256) { unchecked { return _nextId - _startTokenId(); } } function totalSupply() public view returns (uint256) { unchecked { return _nextId - _burned - _startTokenId(); } } /** * @dev See {IERC721-transferFrom} */ function transferFrom(address from, address to, uint256 tokenId) override public virtual { safeTransferFrom(from, to, tokenId); } function unpause() external onlyOwner { _unpause(); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.12; import {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; error CannotMintMoreThan(uint256 amount); error MaxMintPerWalletWouldBeReached(uint256 max); error NeedToSendMoreETH(); error QuantityWouldExceedMaxSupply(); error SaleHasNotStarted(); error SaleHasEnded(); library MintGate { function isWhitelisted(address buyer, bytes32[] calldata proof, bytes32 root) internal pure returns (bool) { return MerkleProof.verify(proof, root, keccak256(abi.encodePacked(buyer))); } function price(address buyer, uint256 cost, uint256 quantity, uint256 received) internal { unchecked { uint256 total = cost * quantity; if (total < received) { revert NeedToSendMoreETH(); } // Refund remaining value if (received > total) { payable(buyer).transfer(received - total); } } } function supply(uint256 available, uint256 max, uint256 minted, uint256 quantity) internal pure { if (quantity > available) { revert QuantityWouldExceedMaxSupply(); } if (max > 0) { if (quantity > max) { revert CannotMintMoreThan({ amount: max }); } if ((minted + quantity) > max) { revert MaxMintPerWalletWouldBeReached({ max: max }); } } } function time(uint256 end, uint256 start) internal view { if (block.timestamp < start) { revert SaleHasNotStarted(); } if (end != 0 && block.timestamp > end) { revert SaleHasEnded(); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.12; error AlreadyWithdrawnForThisMonth(); error AmountExceedsBalance(string method); error TransferFailed(); error WithdrawLockupActive(); abstract contract Withdrawable { bool private _locked; mapping(uint256 => bool) private _months; function _withdraw(address receiver, uint256 amount) internal { if (address(this).balance < amount) { revert AmountExceedsBalance({ method: '_withdraw' }); } (bool success, ) = payable(receiver).call{value: amount}(""); if (!success) { revert TransferFailed(); } } // Withdraw x% once per month function _withdrawOncePerMonth(address receiver, uint256 bips, uint256 deployedAt) internal { unchecked { uint256 amount = address(this).balance; uint256 month = ((block.timestamp - deployedAt) / 4 weeks) + 1; if (_months[month]) { revert AlreadyWithdrawnForThisMonth(); } _months[month] = true; _withdraw(receiver, (amount * bips) / 10000); } } // Withdraw With x% Lockup // - x% available for withdraw on sale // - x% held by contract until `timestamp` function _withdrawWithLockup(address receiver, uint256 bips, uint256 unlockAt) internal { unchecked { uint256 amount = address(this).balance; if (amount < ((amount * bips) / 10000)) { revert AmountExceedsBalance({ method: '_withdrawWithLockup' }); } // x% can be withdrawn to kickstart project; Remaining x% will be // held throughout `lockup` period if (!_locked) { amount = (amount * bips) / 10000; _locked = true; } else if (block.timestamp < unlockAt) { revert WithdrawLockupActive(); } _withdraw(receiver, amount); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.12; abstract contract Admin { mapping(address => bool) private _admin; function _isAdmin(address operator) internal view returns (bool) { return _admin[operator]; } function _setAdmin(address operator, bool admin) internal { _admin[operator] = admin; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/Pausable.sol) 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 // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.12; import {IERC2981} from "@openzeppelin/contracts/interfaces/IERC2981.sol"; import {ERC165, IERC165} from "@openzeppelin/contracts/utils/introspection/ERC165.sol"; abstract contract ERC2981 is ERC165, IERC2981 { struct RoyaltyInfo { // Fee in Basis Points uint256 fee; address receiver; } RoyaltyInfo private _default; mapping(uint256 => RoyaltyInfo) private _info; constructor(address receiver, uint256 fee) { _default = RoyaltyInfo({ fee: fee, receiver: receiver }); } function _setDefaultRoyaltyInfo(address receiver, uint256 fee) internal { _default = RoyaltyInfo({ fee: fee, receiver: receiver }); } function _setRoyaltyInfo(uint256 tokenId, address receiver, uint256 fee) internal { _info[tokenId] = RoyaltyInfo({ fee: fee, receiver: receiver }); } function royaltyInfo(uint256 tokenId, uint256 amount) external view override(IERC2981) returns (address, uint256) { uint256 fee = _info[tokenId].fee; address receiver = _info[tokenId].receiver; if (receiver == address(0) || fee == 0) { fee = _default.fee; receiver = _default.receiver; } return (receiver, (amount * fee / 10000)); } function supportsInterface(bytes4 interfaceId) override(ERC165, IERC165) public view virtual returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be payed in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Trees proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merklee tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { bytes32 proofElement = proof[i]; if (computedHash <= proofElement) { // Hash(current computed hash + current element of the proof) computedHash = _efficientHash(computedHash, proofElement); } else { // Hash(current element of the proof + current computed hash) computedHash = _efficientHash(proofElement, computedHash); } } return computedHash; } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
{ "optimizer": { "enabled": true, "runs": 800 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AddressNotWhitelisted","type":"error"},{"inputs":[{"internalType":"string","name":"method","type":"string"}],"name":"AmountExceedsAccountBalance","type":"error"},{"inputs":[{"internalType":"string","name":"method","type":"string"}],"name":"AmountExceedsBalance","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[{"internalType":"string","name":"method","type":"string"}],"name":"CallerNotOwnerNorApproved","type":"error"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"CannotMintMoreThan","type":"error"},{"inputs":[],"name":"FeatureIsDisabled","type":"error"},{"inputs":[{"internalType":"uint256","name":"max","type":"uint256"}],"name":"MaxMintPerWalletWouldBeReached","type":"error"},{"inputs":[{"internalType":"string","name":"method","type":"string"}],"name":"MethodReceivedZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"NeedToSendMoreETH","type":"error"},{"inputs":[],"name":"QuantityWouldExceedMaxSupply","type":"error"},{"inputs":[{"internalType":"string","name":"method","type":"string"}],"name":"QueryForNonexistentToken","type":"error"},{"inputs":[],"name":"SaleHasEnded","type":"error"},{"inputs":[],"name":"SaleHasNotStarted","type":"error"},{"inputs":[],"name":"TokenQueryProducedVariant","type":"error"},{"inputs":[],"name":"TransferFailed","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"ZeroRewards","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint64","name":"amount","type":"uint64"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"Charged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint64","name":"amount","type":"uint64"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"Deposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint64","name":"current","type":"uint64"},{"indexed":false,"internalType":"uint64","name":"previous","type":"uint64"}],"name":"LevelUpdated","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":"GAME_RESERVE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_MINT_PER_WALLET","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINT_BATCH_SIZE","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINT_END_TIME","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINT_START_TIME","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PUBLIC_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STATE_BURNED","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STATE_MINTED","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STATE_TRANSFERRED","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VAULT_RESERVE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VAULT_WALLET","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WHITELIST_MERKLE_ROOT","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WHITELIST_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WHITELIST_START_TIME","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"calculateStakingRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint64","name":"amount","type":"uint64"}],"name":"charge","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"claimStakingRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"config","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"uint64","name":"","type":"uint64"},{"internalType":"bool","name":"","type":"bool"},{"internalType":"uint64","name":"","type":"uint64"},{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"a","type":"uint256"},{"internalType":"uint256","name":"b","type":"uint256"}],"name":"fuse","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"mintPublic","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"mintToGameWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"mintToVaultWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintUnsoldToVaultWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"mintWhitelist","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"multipliers","outputs":[{"internalType":"uint64","name":"","type":"uint64"},{"internalType":"uint64","name":"","type":"uint64"},{"internalType":"uint64","name":"","type":"uint64"},{"internalType":"uint64","name":"","type":"uint64"}],"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":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"rewardsOf","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"rewardsOf","outputs":[{"internalType":"uint64[]","name":"","type":"uint64[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"bool","name":"fusible","type":"bool"},{"internalType":"uint64","name":"listingFee","type":"uint64"},{"internalType":"bool","name":"resetOnTransfer","type":"bool"},{"internalType":"uint64","name":"rewardsPerWeek","type":"uint64"},{"internalType":"uint64","name":"upgradeFee","type":"uint64"}],"internalType":"struct ERC721OwnershipBasedStaking.Config","name":"data","type":"tuple"}],"name":"setConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint64","name":"level","type":"uint64"},{"internalType":"uint64","name":"max","type":"uint64"},{"internalType":"uint64","name":"minter","type":"uint64"},{"internalType":"uint64","name":"month","type":"uint64"}],"internalType":"struct ERC721OwnershipBasedStaking.Multipliers","name":"data","type":"tuple"}],"name":"setMultipliers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"uri","type":"string"}],"name":"setTokenURI","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":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"cursor","type":"uint256"},{"internalType":"uint256","name":"size","type":"uint256"}],"name":"tokensOf","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalBurned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"upgrade","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b50336102ee8181604051806040016040528060088152602001674d6574617061737360c01b815250604051806040016040528060088152602001676d6574617061737360c01b815250818162000076620000706200016a60201b60201c565b6200016e565b6001805460ff60a01b1916905581516200009890600490602085019062000380565b5060016005558051620000b390600690602084019062000380565b50506001600c8190556040805180820182528681526001600160a01b039097166020978801819052601096909655601180546001600160a01b031916909617909555845160a0810186526000808252968101969096529385019390935250506003606083015250609060808201526200012f92509050620001c0565b604080516080810182526103e88152620138806020820152619c409181019190915261271060608201526200016490620002c1565b62000463565b3390565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001546001600160a01b031633146200020f5760405162461bcd60e51b81526020600482018190526024820152600080516020620045a683398151915260448201526064015b60405180910390fd5b8051600e80546020840151604085015160608601516080909601516001600160401b03908116600160901b02600160901b600160d01b03199782166a010000000000000000000002600160501b600160901b031993151569010000000000000000000293909316600160481b600160901b03199290941661010002610100600160481b0319971515979097166001600160481b0319909516949094179590951794909416179290921792909216179055565b6001546001600160a01b031633146200030c5760405162461bcd60e51b81526020600482018190526024820152600080516020620045a6833981519152604482015260640162000206565b8051600f8054602084015160408501516060909501516001600160401b03908116600160c01b026001600160c01b03968216600160801b02969096166001600160801b0392821668010000000000000000026001600160801b03199094169190951617919091171691909117919091179055565b8280546200038e9062000426565b90600052602060002090601f016020900481019282620003b25760008555620003fd565b82601f10620003cd57805160ff1916838001178555620003fd565b82800160010185558215620003fd579182015b82811115620003fd578251825591602001919060010190620003e0565b506200040b9291506200040f565b5090565b5b808211156200040b576000815560010162000410565b600181811c908216806200043b57607f821691505b602082108114156200045d57634e487b7160e01b600052602260045260246000fd5b50919050565b61413380620004736000396000f3fe6080604052600436106103815760003560e01c80636352211e116101d1578063a664eb9011610102578063d5302120116100a0578063e985e9c51161006f578063e985e9c514610acb578063efd0cbf914610b14578063f2fde38b14610b27578063f68858e414610b4757600080fd5b8063d530212014610a54578063d66da10d14610a69578063d89135cd14610a96578063e902d60a14610aab57600080fd5b8063b19960e6116100dc578063b19960e6146109ea578063b88d4fde146109ff578063b9fcd7da14610a1f578063c87b56dd14610a3457600080fd5b8063a664eb901461098e578063a6d612f9146109c2578063adceef07146109d557600080fd5b80638456cb591161016f57806395d89b411161014957806395d89b41146108eb5780639d7d666714610900578063a22cb46514610955578063a2309ff81461097557600080fd5b80638456cb59146108985780638da5cb5b146108ad5780638fad2627146108cb57600080fd5b806379502c55116101ab57806379502c55146107d55780637e2ade0c1461084a5780638315f17314610862578063840f0b921461088257600080fd5b80636352211e1461078057806370a08231146107a0578063715018a6146107c057600080fd5b80631ca43564116102b65780634127a3991161025457806355f804b31161022357806355f804b314610710578063564f71ed146107305780635c975abb14610745578063611f3f101461076457600080fd5b80634127a3991461069857806342842e0e146106b857806345977d03146106d857806351847ed5146106f857600080fd5b80632a55205a116102905780632a55205a1461061957806332cb6b0c146106585780633ccfd60b1461066e5780633f4ba83a1461068357600080fd5b80631ca43564146105b657806323185dc9146105cb57806323b872dd146105f957600080fd5b80630bce12841161032357806317e7f295116102fd57806317e7f2951461053557806318160ddd146105515780631a129b221461056e5780631ba41e271461059657600080fd5b80630bce1284146104a75780630ee2bb31146104f5578063162094c41461051557600080fd5b806307bd63221161035f57806307bd6322146103ff578063081812fc14610425578063095ea7b31461045d5780630a3cefaa1461047d57600080fd5b806301ffc9a71461038657806302b13e5f146103bb57806306fdde03146103dd575b600080fd5b34801561039257600080fd5b506103a66103a136600461387e565b610b67565b60405190151581526020015b60405180910390f35b3480156103c757600080fd5b506103db6103d636600461389b565b610b78565b005b3480156103e957600080fd5b506103f2610c57565b6040516103b2919061390c565b34801561040b57600080fd5b5061041763625c398081565b6040519081526020016103b2565b34801561043157600080fd5b5061044561044036600461389b565b610ce9565b6040516001600160a01b0390911681526020016103b2565b34801561046957600080fd5b506103db61047836600461393b565b610d5d565b34801561048957600080fd5b50610492600281565b60405163ffffffff90911681526020016103b2565b3480156104b357600080fd5b506104dd6104c236600461389b565b6000908152600d60205260409020546001600160401b031690565b6040516001600160401b0390911681526020016103b2565b34801561050157600080fd5b5061041761051036600461389b565b610e3f565b34801561052157600080fd5b506103db610530366004613a22565b610fe6565b34801561054157600080fd5b50610417670214e8348c4f000081565b34801561055d57600080fd5b506003546005540360001901610417565b34801561057a57600080fd5b506104457324d9ec1327ee15cd102ba72fe98b580a7424af8b81565b3480156105a257600080fd5b506104176105b1366004613a7f565b6110a8565b3480156105c257600080fd5b50610492600381565b3480156105d757600080fd5b506105eb6105e6366004613aab565b6111b8565b6040516103b2929190613ade565b34801561060557600080fd5b506103db610614366004613b26565b61136a565b34801561062557600080fd5b50610639610634366004613b62565b611375565b604080516001600160a01b0390931683526020830191909152016103b2565b34801561066457600080fd5b5061041761138881565b34801561067a57600080fd5b506103db6113de565b34801561068f57600080fd5b506103db6114db565b3480156106a457600080fd5b506103db6106b3366004613b94565b61152d565b3480156106c457600080fd5b506103db6106d3366004613b26565b61164f565b3480156106e457600080fd5b506103db6106f336600461389b565b61166a565b34801561070457600080fd5b50610417636259968081565b34801561071c57600080fd5b506103db61072b366004613c21565b6117e7565b34801561073c57600080fd5b5061041760fa81565b34801561075157600080fd5b50600154600160a01b900460ff166103a6565b34801561077057600080fd5b506104176702c68af0bb14000081565b34801561078c57600080fd5b5061044561079b36600461389b565b611846565b3480156107ac57600080fd5b506104176107bb366004613c55565b611858565b3480156107cc57600080fd5b506103db6118d6565b3480156107e157600080fd5b50600e546040805160ff808416151582526001600160401b03610100850481166020840152690100000000000000000085049091161515928201929092526a0100000000000000000000830482166060820152600160901b90920416608082015260a0016103b2565b34801561085657600080fd5b5061041763625ae80081565b34801561086e57600080fd5b506103db61087d36600461389b565b611928565b34801561088e57600080fd5b506104176102ee81565b3480156108a457600080fd5b506103db611a10565b3480156108b957600080fd5b506001546001600160a01b0316610445565b3480156108d757600080fd5b506104176108e636600461389b565b611a60565b3480156108f757600080fd5b506103f2611b7f565b34801561090c57600080fd5b50600f54604080516001600160401b038084168252600160401b840481166020830152600160801b8404811692820192909252600160c01b9092041660608201526080016103b2565b34801561096157600080fd5b506103db610970366004613c70565b611b8e565b34801561098157600080fd5b5060055460001901610417565b34801561099a57600080fd5b506104177fce40398c6324370b2faa1f4b6080e79641d61160efbb67c338bdde85a78e531381565b6103db6109d0366004613c9a565b611c26565b3480156109e157600080fd5b50610492600881565b3480156109f657600080fd5b50610417600281565b348015610a0b57600080fd5b506103db610a1a366004613d14565b611d54565b348015610a2b57600080fd5b50610492600181565b348015610a4057600080fd5b506103f2610a4f36600461389b565b611d9f565b348015610a6057600080fd5b506103db611f75565b348015610a7557600080fd5b50610a89610a84366004613d8f565b612064565b6040516103b29190613e34565b348015610aa257600080fd5b50600354610417565b348015610ab757600080fd5b506103db610ac6366004613e81565b6120fe565b348015610ad757600080fd5b506103a6610ae6366004613efd565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b6103db610b2236600461389b565b6121c7565b348015610b3357600080fd5b506103db610b42366004613c55565b61228c565b348015610b5357600080fd5b506103db610b62366004613b62565b61235c565b6000610b728261251e565b92915050565b6002600c541415610bbe5760405162461bcd60e51b815260206004820152601f60248201526000805160206140be83398151915260448201526064015b60405180910390fd5b6002600c556001546001600160a01b03163314610c0b5760405162461bcd60e51b815260206004820181905260248201526000805160206140de8339815191526044820152606401610bb5565b610c45610c1b6005546000190190565b610c2790611388613f3d565b60fa610c3233612529565b604001516001600160401b0316846125b1565b610c4f3382612629565b506001600c55565b606060048054610c6690613f54565b80601f0160208091040260200160405190810160405280929190818152602001828054610c9290613f54565b8015610cdf5780601f10610cb457610100808354040283529160200191610cdf565b820191906000526020600020905b815481529060010190602001808311610cc257829003601f168201915b5050505050905090565b6000610cf482612643565b610d4157604051636f722ce560e11b815260206004820152600b60248201527f676574417070726f7665640000000000000000000000000000000000000000006044820152606401610bb5565b506000908152600860205260409020546001600160a01b031690565b6000610d6882611846565b9050336001600160a01b038481169083161415610d985760405163250fdee360e21b815260040160405180910390fd5b816001600160a01b0316816001600160a01b031614158015610de057506001600160a01b0380831660009081526007602090815260408083209385168352929052205460ff16155b15610e2e576040516335b366b560e21b815260206004820152600760248201527f617070726f7665000000000000000000000000000000000000000000000000006044820152606401610bb5565b610e3982858561268d565b50505050565b6000818152600d6020908152604080832081516060808201845291546001600160401b038082168352600160401b808304821684880152600160801b928390048216848701528551608081018752600f548084168252918204831697810197909752918204811694860194909452600160c01b9004909216908301529082610ec6856126f6565b602084015160408201519192509042906001600160401b039081169083161015610ef257826040015191505b816001600160401b0316816001600160401b03161015610f19575060009695505050505050565b835160408601510261271001600062093a806001600160401b038585031604600e600001600a9054906101000a90046001600160401b0316029050600263ffffffff16856020015163ffffffff161415610f77578560400151820191505b60408501516224ea009084036001600160401b0316048660600151028201915085602001516001600160401b0316826001600160401b03161115610fbd57856020015191505b6127106001600160401b03828402160481016001600160401b0316975050505050505050919050565b6001546001600160a01b0316331461102e5760405162461bcd60e51b815260206004820181905260248201526000805160206140de8339815191526044820152606401610bb5565b61103782612643565b61108457604051636f722ce560e11b815260206004820152600b60248201527f736574546f6b656e5552490000000000000000000000000000000000000000006044820152606401610bb5565b6000828152600b6020908152604090912082516110a3928401906137cf565b505050565b60006002600c5414156110eb5760405162461bcd60e51b815260206004820152601f60248201526000805160206140be8339815191526044820152606401610bb5565b6002600c553360008181526020819052604090205460ff16611139576040516335b366b560e21b815260206004820152600660248201526563686172676560d01b6044820152606401610bb5565b6040516001600160401b03841681526001600160a01b0382169085907f3ef487a00a30e9a6a081fa5b92e4a6df9ccd7c07f55b3b05877b9cc486f9b1cc9060200160405180910390a36111ab84846040518060400160405280600681526020016563686172676560d01b81525061280c565b6001600c55949350505050565b60606000806111c686611858565b600554909150816111ec5750506040805160008152602081019091529150839050611362565b60018610156111fa57600195505b8486820381111561120a57508581035b6000836001600160401b0381111561122457611224613965565b60405190808252806020026020018201604052801561124d578160200160208202803683370190505b509050600061125b896126f6565b90506000600163ffffffff16826020015163ffffffff161461127b575080515b60008a5b85811415801561128f5750878214155b15611351576000818152600a6020908152604091829020825160608101845290546001600160a01b038116808352600160a01b820463ffffffff1693830193909352600160c01b90046001600160401b03169281019290925290945015806113015750602084015163ffffffff166001145b1561130b57611349565b835192506001600160a01b03808416908e161415611349578085838060010194508151811061133c5761133c613fa5565b6020026020010181815250505b60010161127f565b508352509095505050858501925050505b935093915050565b6110a383838361164f565b600082815260126020526040812080546001909101548291906001600160a01b03168015806113a2575081155b156113b95750506010546011546001600160a01b03165b806127106113c78488613fbb565b6113d19190613fda565b9350935050509250929050565b6001546001600160a01b031633146114265760405162461bcd60e51b815260206004820181905260248201526000805160206140de8339815191526044820152606401610bb5565b6002600c5414156114675760405162461bcd60e51b815260206004820152601f60248201526000805160206140be8339815191526044820152606401610bb5565b6002600c55600154600160a01b900460ff16156114b95760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610bb5565b6114d46114ce6001546001600160a01b031690565b47612875565b6001600c55565b6001546001600160a01b031633146115235760405162461bcd60e51b815260206004820181905260248201526000805160206140de8339815191526044820152606401610bb5565b61152b61293a565b565b6001546001600160a01b031633146115755760405162461bcd60e51b815260206004820181905260248201526000805160206140de8339815191526044820152606401610bb5565b8051600e80546020840151604085015160608601516080909601516001600160401b03908116600160901b027fffffffffffff0000000000000000ffffffffffffffffffffffffffffffffffff9782166a01000000000000000000000271ffffffffffffffff00000000000000000000199315156901000000000000000000029390931671ffffffffffffffffff00000000000000000019929094166101000268ffffffffffffffff00199715159790971668ffffffffffffffffff19909516949094179590951794909416179290921792909216179055565b6110a383838360405180602001604052806000815250611d54565b6002600c5414156116ab5760405162461bcd60e51b815260206004820152601f60248201526000805160206140be8339815191526044820152606401610bb5565b6002600c55600e54600160901b90046001600160401b0316806116e1576040516327e0d19f60e11b815260040160405180910390fd5b33806116ec84611846565b6001600160a01b03161461172d576040516335b366b560e21b81526020600482015260076024820152667570677261646560c81b6044820152606401610bb5565b6117578383604051806040016040528060078152602001667570677261646560c81b81525061280c565b506000838152600d6020908152604091829020805467ffffffffffffffff60801b198116600160801b918290046001600160401b039081166001810182168402929092178085558651939004168252928101839052909286917f4adad2a0fb0c6b6ed3fc3243fe02729f9c643b4b41e96e0c853635d0f211d04f910160405180910390a250506001600c55505050565b6001546001600160a01b0316331461182f5760405162461bcd60e51b815260206004820181905260248201526000805160206140de8339815191526044820152606401610bb5565b80516118429060029060208401906137cf565b5050565b6000611851826126f6565b5192915050565b60006001600160a01b0382166118b15760405163227c9e7d60e01b815260206004820152600960248201527f62616c616e63654f6600000000000000000000000000000000000000000000006044820152606401610bb5565b506001600160a01b03166000908152600960205260409020546001600160401b031690565b6001546001600160a01b0316331461191e5760405162461bcd60e51b815260206004820181905260248201526000805160206140de8339815191526044820152606401610bb5565b61152b60006129e0565b6002600c5414156119695760405162461bcd60e51b815260206004820152601f60248201526000805160206140be8339815191526044820152606401610bb5565b6002600c556001546001600160a01b031633146119b65760405162461bcd60e51b815260206004820181905260248201526000805160206140de8339815191526044820152606401610bb5565b6119f26119c66005546000190190565b6119d290611388613f3d565b6102ee610c327324d9ec1327ee15cd102ba72fe98b580a7424af8b612529565b610c4f7324d9ec1327ee15cd102ba72fe98b580a7424af8b82612629565b6001546001600160a01b03163314611a585760405162461bcd60e51b815260206004820181905260248201526000805160206140de8339815191526044820152606401610bb5565b61152b612a3f565b60006002600c541415611aa35760405162461bcd60e51b815260206004820152601f60248201526000805160206140be8339815191526044820152606401610bb5565b6002600c5533611ab38382612ac7565b611b00576040516335b366b560e21b815260206004820152601360248201527f636c61696d5374616b696e6752657761726473000000000000000000000000006044820152606401610bb5565b6000611b0b84610e3f565b905080611b2b5760405163899aaa9d60e01b815260040160405180910390fd5b6000938452600d602052604090932080546001600160401b038082169590950185166fffffffffffffffffffffffffffffffff1990911617600160401b4286160217908190556001600c5590921692915050565b606060068054610c6690613f54565b336001600160a01b038316811415611bb95760405163b06307db60e01b815260040160405180910390fd5b6001600160a01b03818116600081815260076020908152604080832094881680845294825291829020805460ff191687151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6002600c541415611c675760405162461bcd60e51b815260206004820152601f60248201526000805160206140be8339815191526044820152606401610bb5565b6002600c556000611c7b6005546000190190565b6102ee611c8b60fa611388613f3d565b611c959190613f3d565b611c9f9190613f3d565b905033831580611cd85750611cd68186867fce40398c6324370b2faa1f4b6080e79641d61160efbb67c338bdde85a78e5313612b46565b155b15611cf65760405163ad7acb4760e01b815260040160405180910390fd5b611d0a81670214e8348c4f00008534612bc4565b611d2c826002611d1984612529565b604001516001600160401b0316866125b1565b611d3e63625ae8006362599680612c32565b611d488184612629565b50506001600c55505050565b611d5f848484612c7f565b6001600160a01b0383163b15158015611d815750611d7f84848484612eae565b155b15610e39576040516368d2bf6b60e11b815260040160405180910390fd5b6060611daa82612643565b611df757604051636f722ce560e11b815260206004820152600860248201527f746f6b656e5552490000000000000000000000000000000000000000000000006044820152606401610bb5565b600060028054611e0690613f54565b80601f0160208091040260200160405190810160405280929190818152602001828054611e3290613f54565b8015611e7f5780601f10611e5457610100808354040283529160200191611e7f565b820191906000526020600020905b815481529060010190602001808311611e6257829003601f168201915b505050505090506000600b60008581526020019081526020016000208054611ea690613f54565b80601f0160208091040260200160405190810160405280929190818152602001828054611ed290613f54565b8015611f1f5780601f10611ef457610100808354040283529160200191611f1f565b820191906000526020600020905b815481529060010190602001808311611f0257829003601f168201915b50505050509050805160001415611f3c57611f3984612f93565b90505b815115611f6e578181604051602001611f56929190613fee565b60405160208183030381529060405292505050919050565b9392505050565b6002600c541415611fb65760405162461bcd60e51b815260206004820152601f60248201526000805160206140be8339815191526044820152606401610bb5565b6002600c556001546001600160a01b031633146120035760405162461bcd60e51b815260206004820181905260248201526000805160206140de8339815191526044820152606401610bb5565b60006120126005546000190190565b61201e90611388613f3d565b90504263625c39801180612030575080155b1561203a57600080fd5b600a8111156119f25750600a610c4f7324d9ec1327ee15cd102ba72fe98b580a7424af8b82612629565b8051606090819060005b818110156120f557600d600086838151811061208c5761208c613fa5565b6020026020010151815260200190815260200160002060000160009054906101000a90046001600160401b03168382815181106120cb576120cb613fa5565b6001600160401b0390921660209283029190910190910152806120ed8161401d565b91505061206e565b50909392505050565b6001546001600160a01b031633146121465760405162461bcd60e51b815260206004820181905260248201526000805160206140de8339815191526044820152606401610bb5565b8051600f8054602084015160408501516060909501516001600160401b03908116600160c01b026001600160c01b03968216600160801b02969096166fffffffffffffffffffffffffffffffff928216600160401b026fffffffffffffffffffffffffffffffff199094169190951617919091171691909117919091179055565b6002600c5414156122085760405162461bcd60e51b815260206004820152601f60248201526000805160206140be8339815191526044820152606401610bb5565b6002600c55600061221c6005546000190190565b6102ee61222c60fa611388613f3d565b6122369190613f3d565b6122409190613f3d565b905033612257816702c68af0bb1400008534612bc4565b612266826002611d1984612529565b61227863625c398063625ae800612c32565b6122828184612629565b50506001600c5550565b6001546001600160a01b031633146122d45760405162461bcd60e51b815260206004820181905260248201526000805160206140de8339815191526044820152606401610bb5565b6001600160a01b0381166123505760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610bb5565b612359816129e0565b50565b6002600c54141561239d5760405162461bcd60e51b815260206004820152601f60248201526000805160206140be8339815191526044820152606401610bb5565b6002600c55600e5460ff166123c5576040516327e0d19f60e11b815260040160405180910390fd5b3360008181526020819052604090205460ff161580156124235750806001600160a01b03166123f384611846565b6001600160a01b03161415806124235750806001600160a01b031661241783611846565b6001600160a01b031614155b1561245a576040516335b366b560e21b8152600401610bb5906020808252600490820152636675736560e01b604082015260600190565b6000838152600d6020908152604080832080548685529382902054600160801b908190046001600160401b0390811682870482169081016001018216830267ffffffffffffffff60801b19909716969096178084558451929004168152928301849052929186917f4adad2a0fb0c6b6ed3fc3243fe02729f9c643b4b41e96e0c853635d0f211d04f910160405180910390a2506124f88360006130a8565b50506000908152600d6020526040902080546001600160c01b0319169055506001600c55565b6000610b72826132a8565b604080516080810182526000808252602082018190529181018290526060810191909152506001600160a01b0316600090815260096020908152604091829020825160808101845290546001600160401b038082168352600160401b8204811693830193909352600160801b8104831693820193909352600160c01b90920416606082015290565b838111156125d257604051633a78f32b60e01b815260040160405180910390fd5b8215610e3957828111156125fc57604051632f5e4a3760e21b815260048101849052602401610bb5565b826126078284614038565b1115610e3957604051630e25ce9560e41b815260048101849052602401610bb5565b6118428282604051806020016040528060008152506132cd565b60006001612652836001614038565b118015612660575060055482105b8015610b7257506000828152600a6020526040902054600160a01b900463ffffffff166001141592915050565b600081815260086020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0386811691821790925591518493918716917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b604080516060810182526000808252602082018190529181019190915261271c82612643565b61276957604051636f722ce560e11b815260206004820152600660248201527f5f746f6b656e00000000000000000000000000000000000000000000000000006044820152606401610bb5565b600960018184111561277a57508083035b835b818111156127f0576000818152600a6020908152604091829020825160608101845290546001600160a01b038116808352600160a01b820463ffffffff1693830193909352600160c01b90046001600160401b031692810192909252156127e65795945050505050565b506000190161277c565b505050604051633ae7416760e01b815260040160405180910390fd5b6000838152600d6020526040812080546001600160401b038086169116101561284a578260405163fd365fcb60e01b8152600401610bb5919061390c565b805467ffffffffffffffff1981166001600160401b0391821695909503169384179055509092915050565b804710156128c657604051637249410960e01b815260206004820152600960248201527f5f776974686472617700000000000000000000000000000000000000000000006044820152606401610bb5565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612913576040519150601f19603f3d011682016040523d82523d6000602084013e612918565b606091505b50509050806110a3576040516312171d8360e31b815260040160405180910390fd5b600154600160a01b900460ff166129935760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610bb5565b6001805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600180546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600154600160a01b900460ff1615612a8c5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610bb5565b6001805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586129c33390565b600080612ad384611846565b9050806001600160a01b0316836001600160a01b03161480612b0e5750826001600160a01b0316612b0385610ce9565b6001600160a01b0316145b80612b3e57506001600160a01b0380821660009081526007602090815260408083209387168352929052205460ff165b949350505050565b6000612bbb848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506040516bffffffffffffffffffffffff1960608b901b1660208201528692506034019050604051602081830303815290604052805190602001206132da565b95945050505050565b82820281811015612be857604051630486d58d60e01b815260040160405180910390fd5b80821115612c2b576040516001600160a01b038616908383146108fc0290838503906000818181858888f19350505050158015612c29573d6000803e3d6000fd5b505b5050505050565b80421015612c53576040516374626dc160e11b815260040160405180910390fd5b8115801590612c6157508142115b1561184257604051634298ddab60e11b815260040160405180910390fd5b600154600160a01b900460ff1615612ccc5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610bb5565b6000612cd7826126f6565b90506001600160a01b038316612d1c5760405163227c9e7d60e01b81526020600482015260096024820152682fba3930b739b332b960b91b6044820152606401610bb5565b836001600160a01b031681600001516001600160a01b031614612d515760405162a1148160e81b815260040160405180910390fd5b612d5b8233612ac7565b612d94576040516335b366b560e21b81526020600482015260096024820152682fba3930b739b332b960b91b6044820152606401610bb5565b8051612da29060008461268d565b612dac82826132f0565b6001600160a01b038481166000818152600960209081526040808320805467ffffffffffffffff198082166001600160401b03928316600019018316179092558987168086528386208054938416938316600101831693909317909255825160608101845282815260038186019081524283168286019081528b8852600a909652848720915182549151965199166001600160c01b031990911617600160a01b63ffffffff90961695909502949094176001600160c01b0316600160c01b97909116969096029590951790915551859392917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4610e39848484600161339c565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290612ee3903390899088908890600401614050565b6020604051808303816000875af1925050508015612f1e575060408051601f3d908101601f19168201909252612f1b9181019061408c565b60015b612f79573d808015612f4c576040519150601f19603f3d011682016040523d82523d6000602084013e612f51565b606091505b508051612f71576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612b3e565b606081612fb75750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612fe15780612fcb8161401d565b9150612fda9050600a83613fda565b9150612fbb565b6000816001600160401b03811115612ffb57612ffb613965565b6040519080825280601f01601f191660200182016040528015613025576020820181803683370190505b5090505b8415612b3e5761303a600183613f3d565b9150613047600a866140a9565b613052906030614038565b60f81b81838151811061306757613067613fa5565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506130a1600a86613fda565b9450613029565b600154600160a01b900460ff16156130f55760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610bb5565b6000613100836126f6565b905081801561311657506131148333612ac7565b155b15613164576040516335b366b560e21b815260206004820152600560248201527f5f6275726e0000000000000000000000000000000000000000000000000000006044820152606401610bb5565b80516131729060008561268d565b61317c83826132f0565b80516001600160a01b03908116600090815260096020908152604080832080546fffffffffffffffffffffffffffffffff1981166001600160401b038083166000190181169182176001600160401b67ffffffffffffffff1990951690931784900482168301821690930292909217909255600380548301905582516060810184528751871681528085019283524282168185019081528a8752600a90955283862090518154935195519088166001600160c01b031990941693909317600160a01b63ffffffff90961695909502949094176001600160c01b0316600160c01b92909116919091021790915583519051869391909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a480516110a390600085600161339c565b60006001600160e01b0319821663152a902d60e11b1480610b725750610b72826133a8565b6110a383838360016133b3565b6000826132e78584613694565b14949350505050565b60006132fd836001614038565b905061330881612643565b801561332957506000818152600a60205260409020546001600160a01b0316155b156110a3576000818152600a60209081526040918290208451815492860151938601516001600160401b0316600160c01b026001600160c01b0363ffffffff909516600160a01b026001600160c01b03199094166001600160a01b03909216919091179290921792909216179055505050565b610e3984848484613708565b6000610b728261377f565b600154600160a01b900460ff16156134005760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610bb5565b6005546001600160a01b03851661345a5760405163227c9e7d60e01b815260206004820152600560248201527f5f6d696e740000000000000000000000000000000000000000000000000000006044820152606401610bb5565b836134785760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03851660009081526009602052604090208054600160801b67ffffffffffffffff1982166001600160401b038084168901811691821783900481168901169091027fffffffffffffffff0000000000000000ffffffffffffffff0000000000000000909216171781556008850460078616156134f9576001015b60005b8181101561359657604080516060810182526001600160a01b03808b168252600260208084019182526001600160401b03428116858701908152600888028b016000908152600a909352959091209351845492519551909116600160c01b026001600160c01b0363ffffffff96909616600160a01b026001600160c01b0319909316919093161717929092169190911790556001016134fc565b50828681018580156135b157506001600160a01b0389163b15155b1561363a575b60405182906001600160a01b038b16906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a461360260008a848060010195508a612eae565b61361f576040516368d2bf6b60e11b815260040160405180910390fd5b808214156135b757846005541461363557600080fd5b613680565b5b6040516001830192906001600160a01b038b16906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a48082141561363b575b5060055550612c2b9050600086838761339c565b600081815b84518110156137005760008582815181106136b6576136b6613fa5565b602002602001015190508083116136dc57600083815260208290526040902092506136ed565b600081815260208490526040902092505b50806136f88161401d565b915050613699565b509392505050565b600e546901000000000000000000900460ff1661372457610e39565b60005b81811015612c2b576000600d8161373e8487614038565b81526020810191909152604001600020805467ffffffffffffffff19166001600160401b0392909216919091179055806137778161401d565b915050613727565b60006001600160e01b031982166380ac58cd60e01b14806137b057506001600160e01b03198216635b5e139f60e01b145b80610b7257506301ffc9a760e01b6001600160e01b0319831614610b72565b8280546137db90613f54565b90600052602060002090601f0160209004810192826137fd5760008555613843565b82601f1061381657805160ff1916838001178555613843565b82800160010185558215613843579182015b82811115613843578251825591602001919060010190613828565b5061384f929150613853565b5090565b5b8082111561384f5760008155600101613854565b6001600160e01b03198116811461235957600080fd5b60006020828403121561389057600080fd5b8135611f6e81613868565b6000602082840312156138ad57600080fd5b5035919050565b60005b838110156138cf5781810151838201526020016138b7565b83811115610e395750506000910152565b600081518084526138f88160208601602086016138b4565b601f01601f19169290920160200192915050565b602081526000611f6e60208301846138e0565b80356001600160a01b038116811461393657600080fd5b919050565b6000806040838503121561394e57600080fd5b6139578361391f565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156139a3576139a3613965565b604052919050565b60006001600160401b038311156139c4576139c4613965565b6139d7601f8401601f191660200161397b565b90508281528383830111156139eb57600080fd5b828260208301376000602084830101529392505050565b600082601f830112613a1357600080fd5b611f6e838335602085016139ab565b60008060408385031215613a3557600080fd5b8235915060208301356001600160401b03811115613a5257600080fd5b613a5e85828601613a02565b9150509250929050565b80356001600160401b038116811461393657600080fd5b60008060408385031215613a9257600080fd5b82359150613aa260208401613a68565b90509250929050565b600080600060608486031215613ac057600080fd5b613ac98461391f565b95602085013595506040909401359392505050565b604080825283519082018190526000906020906060840190828701845b82811015613b1757815184529284019290840190600101613afb565b50505092019290925292915050565b600080600060608486031215613b3b57600080fd5b613b448461391f565b9250613b526020850161391f565b9150604084013590509250925092565b60008060408385031215613b7557600080fd5b50508035926020909101359150565b8035801515811461393657600080fd5b600060a08284031215613ba657600080fd5b60405160a081018181106001600160401b0382111715613bc857613bc8613965565b604052613bd483613b84565b8152613be260208401613a68565b6020820152613bf360408401613b84565b6040820152613c0460608401613a68565b6060820152613c1560808401613a68565b60808201529392505050565b600060208284031215613c3357600080fd5b81356001600160401b03811115613c4957600080fd5b612b3e84828501613a02565b600060208284031215613c6757600080fd5b611f6e8261391f565b60008060408385031215613c8357600080fd5b613c8c8361391f565b9150613aa260208401613b84565b600080600060408486031215613caf57600080fd5b83356001600160401b0380821115613cc657600080fd5b818601915086601f830112613cda57600080fd5b813581811115613ce957600080fd5b8760208260051b8501011115613cfe57600080fd5b6020928301989097509590910135949350505050565b60008060008060808587031215613d2a57600080fd5b613d338561391f565b9350613d416020860161391f565b92506040850135915060608501356001600160401b03811115613d6357600080fd5b8501601f81018713613d7457600080fd5b613d83878235602084016139ab565b91505092959194509250565b60006020808385031215613da257600080fd5b82356001600160401b0380821115613db957600080fd5b818501915085601f830112613dcd57600080fd5b813581811115613ddf57613ddf613965565b8060051b9150613df084830161397b565b8181529183018401918481019088841115613e0a57600080fd5b938501935b83851015613e2857843582529385019390850190613e0f565b98975050505050505050565b6020808252825182820181905260009190848201906040850190845b81811015613e755783516001600160401b031683529284019291840191600101613e50565b50909695505050505050565b600060808284031215613e9357600080fd5b604051608081018181106001600160401b0382111715613eb557613eb5613965565b604052613ec183613a68565b8152613ecf60208401613a68565b6020820152613ee060408401613a68565b6040820152613ef160608401613a68565b60608201529392505050565b60008060408385031215613f1057600080fd5b613f198361391f565b9150613aa26020840161391f565b634e487b7160e01b600052601160045260246000fd5b600082821015613f4f57613f4f613f27565b500390565b600181811c90821680613f6857607f821691505b60208210811415613f8957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000816000190483118215151615613fd557613fd5613f27565b500290565b600082613fe957613fe9613f8f565b500490565b600083516140008184602088016138b4565b8351908301906140148183602088016138b4565b01949350505050565b600060001982141561403157614031613f27565b5060010190565b6000821982111561404b5761404b613f27565b500190565b60006001600160a01b0380871683528086166020840152508360408301526080606083015261408260808301846138e0565b9695505050505050565b60006020828403121561409e57600080fd5b8151611f6e81613868565b6000826140b8576140b8613f8f565b50069056fe5265656e7472616e637947756172643a207265656e7472616e742063616c6c004f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a264697066735822122056b5b2f8fbde0073067209f3e414d0bb1f0b19707aa6f51b0122f46ae5e0e22964736f6c634300080c00334f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572
Deployed Bytecode
0x6080604052600436106103815760003560e01c80636352211e116101d1578063a664eb9011610102578063d5302120116100a0578063e985e9c51161006f578063e985e9c514610acb578063efd0cbf914610b14578063f2fde38b14610b27578063f68858e414610b4757600080fd5b8063d530212014610a54578063d66da10d14610a69578063d89135cd14610a96578063e902d60a14610aab57600080fd5b8063b19960e6116100dc578063b19960e6146109ea578063b88d4fde146109ff578063b9fcd7da14610a1f578063c87b56dd14610a3457600080fd5b8063a664eb901461098e578063a6d612f9146109c2578063adceef07146109d557600080fd5b80638456cb591161016f57806395d89b411161014957806395d89b41146108eb5780639d7d666714610900578063a22cb46514610955578063a2309ff81461097557600080fd5b80638456cb59146108985780638da5cb5b146108ad5780638fad2627146108cb57600080fd5b806379502c55116101ab57806379502c55146107d55780637e2ade0c1461084a5780638315f17314610862578063840f0b921461088257600080fd5b80636352211e1461078057806370a08231146107a0578063715018a6146107c057600080fd5b80631ca43564116102b65780634127a3991161025457806355f804b31161022357806355f804b314610710578063564f71ed146107305780635c975abb14610745578063611f3f101461076457600080fd5b80634127a3991461069857806342842e0e146106b857806345977d03146106d857806351847ed5146106f857600080fd5b80632a55205a116102905780632a55205a1461061957806332cb6b0c146106585780633ccfd60b1461066e5780633f4ba83a1461068357600080fd5b80631ca43564146105b657806323185dc9146105cb57806323b872dd146105f957600080fd5b80630bce12841161032357806317e7f295116102fd57806317e7f2951461053557806318160ddd146105515780631a129b221461056e5780631ba41e271461059657600080fd5b80630bce1284146104a75780630ee2bb31146104f5578063162094c41461051557600080fd5b806307bd63221161035f57806307bd6322146103ff578063081812fc14610425578063095ea7b31461045d5780630a3cefaa1461047d57600080fd5b806301ffc9a71461038657806302b13e5f146103bb57806306fdde03146103dd575b600080fd5b34801561039257600080fd5b506103a66103a136600461387e565b610b67565b60405190151581526020015b60405180910390f35b3480156103c757600080fd5b506103db6103d636600461389b565b610b78565b005b3480156103e957600080fd5b506103f2610c57565b6040516103b2919061390c565b34801561040b57600080fd5b5061041763625c398081565b6040519081526020016103b2565b34801561043157600080fd5b5061044561044036600461389b565b610ce9565b6040516001600160a01b0390911681526020016103b2565b34801561046957600080fd5b506103db61047836600461393b565b610d5d565b34801561048957600080fd5b50610492600281565b60405163ffffffff90911681526020016103b2565b3480156104b357600080fd5b506104dd6104c236600461389b565b6000908152600d60205260409020546001600160401b031690565b6040516001600160401b0390911681526020016103b2565b34801561050157600080fd5b5061041761051036600461389b565b610e3f565b34801561052157600080fd5b506103db610530366004613a22565b610fe6565b34801561054157600080fd5b50610417670214e8348c4f000081565b34801561055d57600080fd5b506003546005540360001901610417565b34801561057a57600080fd5b506104457324d9ec1327ee15cd102ba72fe98b580a7424af8b81565b3480156105a257600080fd5b506104176105b1366004613a7f565b6110a8565b3480156105c257600080fd5b50610492600381565b3480156105d757600080fd5b506105eb6105e6366004613aab565b6111b8565b6040516103b2929190613ade565b34801561060557600080fd5b506103db610614366004613b26565b61136a565b34801561062557600080fd5b50610639610634366004613b62565b611375565b604080516001600160a01b0390931683526020830191909152016103b2565b34801561066457600080fd5b5061041761138881565b34801561067a57600080fd5b506103db6113de565b34801561068f57600080fd5b506103db6114db565b3480156106a457600080fd5b506103db6106b3366004613b94565b61152d565b3480156106c457600080fd5b506103db6106d3366004613b26565b61164f565b3480156106e457600080fd5b506103db6106f336600461389b565b61166a565b34801561070457600080fd5b50610417636259968081565b34801561071c57600080fd5b506103db61072b366004613c21565b6117e7565b34801561073c57600080fd5b5061041760fa81565b34801561075157600080fd5b50600154600160a01b900460ff166103a6565b34801561077057600080fd5b506104176702c68af0bb14000081565b34801561078c57600080fd5b5061044561079b36600461389b565b611846565b3480156107ac57600080fd5b506104176107bb366004613c55565b611858565b3480156107cc57600080fd5b506103db6118d6565b3480156107e157600080fd5b50600e546040805160ff808416151582526001600160401b03610100850481166020840152690100000000000000000085049091161515928201929092526a0100000000000000000000830482166060820152600160901b90920416608082015260a0016103b2565b34801561085657600080fd5b5061041763625ae80081565b34801561086e57600080fd5b506103db61087d36600461389b565b611928565b34801561088e57600080fd5b506104176102ee81565b3480156108a457600080fd5b506103db611a10565b3480156108b957600080fd5b506001546001600160a01b0316610445565b3480156108d757600080fd5b506104176108e636600461389b565b611a60565b3480156108f757600080fd5b506103f2611b7f565b34801561090c57600080fd5b50600f54604080516001600160401b038084168252600160401b840481166020830152600160801b8404811692820192909252600160c01b9092041660608201526080016103b2565b34801561096157600080fd5b506103db610970366004613c70565b611b8e565b34801561098157600080fd5b5060055460001901610417565b34801561099a57600080fd5b506104177fce40398c6324370b2faa1f4b6080e79641d61160efbb67c338bdde85a78e531381565b6103db6109d0366004613c9a565b611c26565b3480156109e157600080fd5b50610492600881565b3480156109f657600080fd5b50610417600281565b348015610a0b57600080fd5b506103db610a1a366004613d14565b611d54565b348015610a2b57600080fd5b50610492600181565b348015610a4057600080fd5b506103f2610a4f36600461389b565b611d9f565b348015610a6057600080fd5b506103db611f75565b348015610a7557600080fd5b50610a89610a84366004613d8f565b612064565b6040516103b29190613e34565b348015610aa257600080fd5b50600354610417565b348015610ab757600080fd5b506103db610ac6366004613e81565b6120fe565b348015610ad757600080fd5b506103a6610ae6366004613efd565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b6103db610b2236600461389b565b6121c7565b348015610b3357600080fd5b506103db610b42366004613c55565b61228c565b348015610b5357600080fd5b506103db610b62366004613b62565b61235c565b6000610b728261251e565b92915050565b6002600c541415610bbe5760405162461bcd60e51b815260206004820152601f60248201526000805160206140be83398151915260448201526064015b60405180910390fd5b6002600c556001546001600160a01b03163314610c0b5760405162461bcd60e51b815260206004820181905260248201526000805160206140de8339815191526044820152606401610bb5565b610c45610c1b6005546000190190565b610c2790611388613f3d565b60fa610c3233612529565b604001516001600160401b0316846125b1565b610c4f3382612629565b506001600c55565b606060048054610c6690613f54565b80601f0160208091040260200160405190810160405280929190818152602001828054610c9290613f54565b8015610cdf5780601f10610cb457610100808354040283529160200191610cdf565b820191906000526020600020905b815481529060010190602001808311610cc257829003601f168201915b5050505050905090565b6000610cf482612643565b610d4157604051636f722ce560e11b815260206004820152600b60248201527f676574417070726f7665640000000000000000000000000000000000000000006044820152606401610bb5565b506000908152600860205260409020546001600160a01b031690565b6000610d6882611846565b9050336001600160a01b038481169083161415610d985760405163250fdee360e21b815260040160405180910390fd5b816001600160a01b0316816001600160a01b031614158015610de057506001600160a01b0380831660009081526007602090815260408083209385168352929052205460ff16155b15610e2e576040516335b366b560e21b815260206004820152600760248201527f617070726f7665000000000000000000000000000000000000000000000000006044820152606401610bb5565b610e3982858561268d565b50505050565b6000818152600d6020908152604080832081516060808201845291546001600160401b038082168352600160401b808304821684880152600160801b928390048216848701528551608081018752600f548084168252918204831697810197909752918204811694860194909452600160c01b9004909216908301529082610ec6856126f6565b602084015160408201519192509042906001600160401b039081169083161015610ef257826040015191505b816001600160401b0316816001600160401b03161015610f19575060009695505050505050565b835160408601510261271001600062093a806001600160401b038585031604600e600001600a9054906101000a90046001600160401b0316029050600263ffffffff16856020015163ffffffff161415610f77578560400151820191505b60408501516224ea009084036001600160401b0316048660600151028201915085602001516001600160401b0316826001600160401b03161115610fbd57856020015191505b6127106001600160401b03828402160481016001600160401b0316975050505050505050919050565b6001546001600160a01b0316331461102e5760405162461bcd60e51b815260206004820181905260248201526000805160206140de8339815191526044820152606401610bb5565b61103782612643565b61108457604051636f722ce560e11b815260206004820152600b60248201527f736574546f6b656e5552490000000000000000000000000000000000000000006044820152606401610bb5565b6000828152600b6020908152604090912082516110a3928401906137cf565b505050565b60006002600c5414156110eb5760405162461bcd60e51b815260206004820152601f60248201526000805160206140be8339815191526044820152606401610bb5565b6002600c553360008181526020819052604090205460ff16611139576040516335b366b560e21b815260206004820152600660248201526563686172676560d01b6044820152606401610bb5565b6040516001600160401b03841681526001600160a01b0382169085907f3ef487a00a30e9a6a081fa5b92e4a6df9ccd7c07f55b3b05877b9cc486f9b1cc9060200160405180910390a36111ab84846040518060400160405280600681526020016563686172676560d01b81525061280c565b6001600c55949350505050565b60606000806111c686611858565b600554909150816111ec5750506040805160008152602081019091529150839050611362565b60018610156111fa57600195505b8486820381111561120a57508581035b6000836001600160401b0381111561122457611224613965565b60405190808252806020026020018201604052801561124d578160200160208202803683370190505b509050600061125b896126f6565b90506000600163ffffffff16826020015163ffffffff161461127b575080515b60008a5b85811415801561128f5750878214155b15611351576000818152600a6020908152604091829020825160608101845290546001600160a01b038116808352600160a01b820463ffffffff1693830193909352600160c01b90046001600160401b03169281019290925290945015806113015750602084015163ffffffff166001145b1561130b57611349565b835192506001600160a01b03808416908e161415611349578085838060010194508151811061133c5761133c613fa5565b6020026020010181815250505b60010161127f565b508352509095505050858501925050505b935093915050565b6110a383838361164f565b600082815260126020526040812080546001909101548291906001600160a01b03168015806113a2575081155b156113b95750506010546011546001600160a01b03165b806127106113c78488613fbb565b6113d19190613fda565b9350935050509250929050565b6001546001600160a01b031633146114265760405162461bcd60e51b815260206004820181905260248201526000805160206140de8339815191526044820152606401610bb5565b6002600c5414156114675760405162461bcd60e51b815260206004820152601f60248201526000805160206140be8339815191526044820152606401610bb5565b6002600c55600154600160a01b900460ff16156114b95760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610bb5565b6114d46114ce6001546001600160a01b031690565b47612875565b6001600c55565b6001546001600160a01b031633146115235760405162461bcd60e51b815260206004820181905260248201526000805160206140de8339815191526044820152606401610bb5565b61152b61293a565b565b6001546001600160a01b031633146115755760405162461bcd60e51b815260206004820181905260248201526000805160206140de8339815191526044820152606401610bb5565b8051600e80546020840151604085015160608601516080909601516001600160401b03908116600160901b027fffffffffffff0000000000000000ffffffffffffffffffffffffffffffffffff9782166a01000000000000000000000271ffffffffffffffff00000000000000000000199315156901000000000000000000029390931671ffffffffffffffffff00000000000000000019929094166101000268ffffffffffffffff00199715159790971668ffffffffffffffffff19909516949094179590951794909416179290921792909216179055565b6110a383838360405180602001604052806000815250611d54565b6002600c5414156116ab5760405162461bcd60e51b815260206004820152601f60248201526000805160206140be8339815191526044820152606401610bb5565b6002600c55600e54600160901b90046001600160401b0316806116e1576040516327e0d19f60e11b815260040160405180910390fd5b33806116ec84611846565b6001600160a01b03161461172d576040516335b366b560e21b81526020600482015260076024820152667570677261646560c81b6044820152606401610bb5565b6117578383604051806040016040528060078152602001667570677261646560c81b81525061280c565b506000838152600d6020908152604091829020805467ffffffffffffffff60801b198116600160801b918290046001600160401b039081166001810182168402929092178085558651939004168252928101839052909286917f4adad2a0fb0c6b6ed3fc3243fe02729f9c643b4b41e96e0c853635d0f211d04f910160405180910390a250506001600c55505050565b6001546001600160a01b0316331461182f5760405162461bcd60e51b815260206004820181905260248201526000805160206140de8339815191526044820152606401610bb5565b80516118429060029060208401906137cf565b5050565b6000611851826126f6565b5192915050565b60006001600160a01b0382166118b15760405163227c9e7d60e01b815260206004820152600960248201527f62616c616e63654f6600000000000000000000000000000000000000000000006044820152606401610bb5565b506001600160a01b03166000908152600960205260409020546001600160401b031690565b6001546001600160a01b0316331461191e5760405162461bcd60e51b815260206004820181905260248201526000805160206140de8339815191526044820152606401610bb5565b61152b60006129e0565b6002600c5414156119695760405162461bcd60e51b815260206004820152601f60248201526000805160206140be8339815191526044820152606401610bb5565b6002600c556001546001600160a01b031633146119b65760405162461bcd60e51b815260206004820181905260248201526000805160206140de8339815191526044820152606401610bb5565b6119f26119c66005546000190190565b6119d290611388613f3d565b6102ee610c327324d9ec1327ee15cd102ba72fe98b580a7424af8b612529565b610c4f7324d9ec1327ee15cd102ba72fe98b580a7424af8b82612629565b6001546001600160a01b03163314611a585760405162461bcd60e51b815260206004820181905260248201526000805160206140de8339815191526044820152606401610bb5565b61152b612a3f565b60006002600c541415611aa35760405162461bcd60e51b815260206004820152601f60248201526000805160206140be8339815191526044820152606401610bb5565b6002600c5533611ab38382612ac7565b611b00576040516335b366b560e21b815260206004820152601360248201527f636c61696d5374616b696e6752657761726473000000000000000000000000006044820152606401610bb5565b6000611b0b84610e3f565b905080611b2b5760405163899aaa9d60e01b815260040160405180910390fd5b6000938452600d602052604090932080546001600160401b038082169590950185166fffffffffffffffffffffffffffffffff1990911617600160401b4286160217908190556001600c5590921692915050565b606060068054610c6690613f54565b336001600160a01b038316811415611bb95760405163b06307db60e01b815260040160405180910390fd5b6001600160a01b03818116600081815260076020908152604080832094881680845294825291829020805460ff191687151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6002600c541415611c675760405162461bcd60e51b815260206004820152601f60248201526000805160206140be8339815191526044820152606401610bb5565b6002600c556000611c7b6005546000190190565b6102ee611c8b60fa611388613f3d565b611c959190613f3d565b611c9f9190613f3d565b905033831580611cd85750611cd68186867fce40398c6324370b2faa1f4b6080e79641d61160efbb67c338bdde85a78e5313612b46565b155b15611cf65760405163ad7acb4760e01b815260040160405180910390fd5b611d0a81670214e8348c4f00008534612bc4565b611d2c826002611d1984612529565b604001516001600160401b0316866125b1565b611d3e63625ae8006362599680612c32565b611d488184612629565b50506001600c55505050565b611d5f848484612c7f565b6001600160a01b0383163b15158015611d815750611d7f84848484612eae565b155b15610e39576040516368d2bf6b60e11b815260040160405180910390fd5b6060611daa82612643565b611df757604051636f722ce560e11b815260206004820152600860248201527f746f6b656e5552490000000000000000000000000000000000000000000000006044820152606401610bb5565b600060028054611e0690613f54565b80601f0160208091040260200160405190810160405280929190818152602001828054611e3290613f54565b8015611e7f5780601f10611e5457610100808354040283529160200191611e7f565b820191906000526020600020905b815481529060010190602001808311611e6257829003601f168201915b505050505090506000600b60008581526020019081526020016000208054611ea690613f54565b80601f0160208091040260200160405190810160405280929190818152602001828054611ed290613f54565b8015611f1f5780601f10611ef457610100808354040283529160200191611f1f565b820191906000526020600020905b815481529060010190602001808311611f0257829003601f168201915b50505050509050805160001415611f3c57611f3984612f93565b90505b815115611f6e578181604051602001611f56929190613fee565b60405160208183030381529060405292505050919050565b9392505050565b6002600c541415611fb65760405162461bcd60e51b815260206004820152601f60248201526000805160206140be8339815191526044820152606401610bb5565b6002600c556001546001600160a01b031633146120035760405162461bcd60e51b815260206004820181905260248201526000805160206140de8339815191526044820152606401610bb5565b60006120126005546000190190565b61201e90611388613f3d565b90504263625c39801180612030575080155b1561203a57600080fd5b600a8111156119f25750600a610c4f7324d9ec1327ee15cd102ba72fe98b580a7424af8b82612629565b8051606090819060005b818110156120f557600d600086838151811061208c5761208c613fa5565b6020026020010151815260200190815260200160002060000160009054906101000a90046001600160401b03168382815181106120cb576120cb613fa5565b6001600160401b0390921660209283029190910190910152806120ed8161401d565b91505061206e565b50909392505050565b6001546001600160a01b031633146121465760405162461bcd60e51b815260206004820181905260248201526000805160206140de8339815191526044820152606401610bb5565b8051600f8054602084015160408501516060909501516001600160401b03908116600160c01b026001600160c01b03968216600160801b02969096166fffffffffffffffffffffffffffffffff928216600160401b026fffffffffffffffffffffffffffffffff199094169190951617919091171691909117919091179055565b6002600c5414156122085760405162461bcd60e51b815260206004820152601f60248201526000805160206140be8339815191526044820152606401610bb5565b6002600c55600061221c6005546000190190565b6102ee61222c60fa611388613f3d565b6122369190613f3d565b6122409190613f3d565b905033612257816702c68af0bb1400008534612bc4565b612266826002611d1984612529565b61227863625c398063625ae800612c32565b6122828184612629565b50506001600c5550565b6001546001600160a01b031633146122d45760405162461bcd60e51b815260206004820181905260248201526000805160206140de8339815191526044820152606401610bb5565b6001600160a01b0381166123505760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610bb5565b612359816129e0565b50565b6002600c54141561239d5760405162461bcd60e51b815260206004820152601f60248201526000805160206140be8339815191526044820152606401610bb5565b6002600c55600e5460ff166123c5576040516327e0d19f60e11b815260040160405180910390fd5b3360008181526020819052604090205460ff161580156124235750806001600160a01b03166123f384611846565b6001600160a01b03161415806124235750806001600160a01b031661241783611846565b6001600160a01b031614155b1561245a576040516335b366b560e21b8152600401610bb5906020808252600490820152636675736560e01b604082015260600190565b6000838152600d6020908152604080832080548685529382902054600160801b908190046001600160401b0390811682870482169081016001018216830267ffffffffffffffff60801b19909716969096178084558451929004168152928301849052929186917f4adad2a0fb0c6b6ed3fc3243fe02729f9c643b4b41e96e0c853635d0f211d04f910160405180910390a2506124f88360006130a8565b50506000908152600d6020526040902080546001600160c01b0319169055506001600c55565b6000610b72826132a8565b604080516080810182526000808252602082018190529181018290526060810191909152506001600160a01b0316600090815260096020908152604091829020825160808101845290546001600160401b038082168352600160401b8204811693830193909352600160801b8104831693820193909352600160c01b90920416606082015290565b838111156125d257604051633a78f32b60e01b815260040160405180910390fd5b8215610e3957828111156125fc57604051632f5e4a3760e21b815260048101849052602401610bb5565b826126078284614038565b1115610e3957604051630e25ce9560e41b815260048101849052602401610bb5565b6118428282604051806020016040528060008152506132cd565b60006001612652836001614038565b118015612660575060055482105b8015610b7257506000828152600a6020526040902054600160a01b900463ffffffff166001141592915050565b600081815260086020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0386811691821790925591518493918716917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b604080516060810182526000808252602082018190529181019190915261271c82612643565b61276957604051636f722ce560e11b815260206004820152600660248201527f5f746f6b656e00000000000000000000000000000000000000000000000000006044820152606401610bb5565b600960018184111561277a57508083035b835b818111156127f0576000818152600a6020908152604091829020825160608101845290546001600160a01b038116808352600160a01b820463ffffffff1693830193909352600160c01b90046001600160401b031692810192909252156127e65795945050505050565b506000190161277c565b505050604051633ae7416760e01b815260040160405180910390fd5b6000838152600d6020526040812080546001600160401b038086169116101561284a578260405163fd365fcb60e01b8152600401610bb5919061390c565b805467ffffffffffffffff1981166001600160401b0391821695909503169384179055509092915050565b804710156128c657604051637249410960e01b815260206004820152600960248201527f5f776974686472617700000000000000000000000000000000000000000000006044820152606401610bb5565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612913576040519150601f19603f3d011682016040523d82523d6000602084013e612918565b606091505b50509050806110a3576040516312171d8360e31b815260040160405180910390fd5b600154600160a01b900460ff166129935760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610bb5565b6001805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600180546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600154600160a01b900460ff1615612a8c5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610bb5565b6001805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586129c33390565b600080612ad384611846565b9050806001600160a01b0316836001600160a01b03161480612b0e5750826001600160a01b0316612b0385610ce9565b6001600160a01b0316145b80612b3e57506001600160a01b0380821660009081526007602090815260408083209387168352929052205460ff165b949350505050565b6000612bbb848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506040516bffffffffffffffffffffffff1960608b901b1660208201528692506034019050604051602081830303815290604052805190602001206132da565b95945050505050565b82820281811015612be857604051630486d58d60e01b815260040160405180910390fd5b80821115612c2b576040516001600160a01b038616908383146108fc0290838503906000818181858888f19350505050158015612c29573d6000803e3d6000fd5b505b5050505050565b80421015612c53576040516374626dc160e11b815260040160405180910390fd5b8115801590612c6157508142115b1561184257604051634298ddab60e11b815260040160405180910390fd5b600154600160a01b900460ff1615612ccc5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610bb5565b6000612cd7826126f6565b90506001600160a01b038316612d1c5760405163227c9e7d60e01b81526020600482015260096024820152682fba3930b739b332b960b91b6044820152606401610bb5565b836001600160a01b031681600001516001600160a01b031614612d515760405162a1148160e81b815260040160405180910390fd5b612d5b8233612ac7565b612d94576040516335b366b560e21b81526020600482015260096024820152682fba3930b739b332b960b91b6044820152606401610bb5565b8051612da29060008461268d565b612dac82826132f0565b6001600160a01b038481166000818152600960209081526040808320805467ffffffffffffffff198082166001600160401b03928316600019018316179092558987168086528386208054938416938316600101831693909317909255825160608101845282815260038186019081524283168286019081528b8852600a909652848720915182549151965199166001600160c01b031990911617600160a01b63ffffffff90961695909502949094176001600160c01b0316600160c01b97909116969096029590951790915551859392917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4610e39848484600161339c565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290612ee3903390899088908890600401614050565b6020604051808303816000875af1925050508015612f1e575060408051601f3d908101601f19168201909252612f1b9181019061408c565b60015b612f79573d808015612f4c576040519150601f19603f3d011682016040523d82523d6000602084013e612f51565b606091505b508051612f71576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612b3e565b606081612fb75750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612fe15780612fcb8161401d565b9150612fda9050600a83613fda565b9150612fbb565b6000816001600160401b03811115612ffb57612ffb613965565b6040519080825280601f01601f191660200182016040528015613025576020820181803683370190505b5090505b8415612b3e5761303a600183613f3d565b9150613047600a866140a9565b613052906030614038565b60f81b81838151811061306757613067613fa5565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506130a1600a86613fda565b9450613029565b600154600160a01b900460ff16156130f55760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610bb5565b6000613100836126f6565b905081801561311657506131148333612ac7565b155b15613164576040516335b366b560e21b815260206004820152600560248201527f5f6275726e0000000000000000000000000000000000000000000000000000006044820152606401610bb5565b80516131729060008561268d565b61317c83826132f0565b80516001600160a01b03908116600090815260096020908152604080832080546fffffffffffffffffffffffffffffffff1981166001600160401b038083166000190181169182176001600160401b67ffffffffffffffff1990951690931784900482168301821690930292909217909255600380548301905582516060810184528751871681528085019283524282168185019081528a8752600a90955283862090518154935195519088166001600160c01b031990941693909317600160a01b63ffffffff90961695909502949094176001600160c01b0316600160c01b92909116919091021790915583519051869391909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a480516110a390600085600161339c565b60006001600160e01b0319821663152a902d60e11b1480610b725750610b72826133a8565b6110a383838360016133b3565b6000826132e78584613694565b14949350505050565b60006132fd836001614038565b905061330881612643565b801561332957506000818152600a60205260409020546001600160a01b0316155b156110a3576000818152600a60209081526040918290208451815492860151938601516001600160401b0316600160c01b026001600160c01b0363ffffffff909516600160a01b026001600160c01b03199094166001600160a01b03909216919091179290921792909216179055505050565b610e3984848484613708565b6000610b728261377f565b600154600160a01b900460ff16156134005760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610bb5565b6005546001600160a01b03851661345a5760405163227c9e7d60e01b815260206004820152600560248201527f5f6d696e740000000000000000000000000000000000000000000000000000006044820152606401610bb5565b836134785760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03851660009081526009602052604090208054600160801b67ffffffffffffffff1982166001600160401b038084168901811691821783900481168901169091027fffffffffffffffff0000000000000000ffffffffffffffff0000000000000000909216171781556008850460078616156134f9576001015b60005b8181101561359657604080516060810182526001600160a01b03808b168252600260208084019182526001600160401b03428116858701908152600888028b016000908152600a909352959091209351845492519551909116600160c01b026001600160c01b0363ffffffff96909616600160a01b026001600160c01b0319909316919093161717929092169190911790556001016134fc565b50828681018580156135b157506001600160a01b0389163b15155b1561363a575b60405182906001600160a01b038b16906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a461360260008a848060010195508a612eae565b61361f576040516368d2bf6b60e11b815260040160405180910390fd5b808214156135b757846005541461363557600080fd5b613680565b5b6040516001830192906001600160a01b038b16906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a48082141561363b575b5060055550612c2b9050600086838761339c565b600081815b84518110156137005760008582815181106136b6576136b6613fa5565b602002602001015190508083116136dc57600083815260208290526040902092506136ed565b600081815260208490526040902092505b50806136f88161401d565b915050613699565b509392505050565b600e546901000000000000000000900460ff1661372457610e39565b60005b81811015612c2b576000600d8161373e8487614038565b81526020810191909152604001600020805467ffffffffffffffff19166001600160401b0392909216919091179055806137778161401d565b915050613727565b60006001600160e01b031982166380ac58cd60e01b14806137b057506001600160e01b03198216635b5e139f60e01b145b80610b7257506301ffc9a760e01b6001600160e01b0319831614610b72565b8280546137db90613f54565b90600052602060002090601f0160209004810192826137fd5760008555613843565b82601f1061381657805160ff1916838001178555613843565b82800160010185558215613843579182015b82811115613843578251825591602001919060010190613828565b5061384f929150613853565b5090565b5b8082111561384f5760008155600101613854565b6001600160e01b03198116811461235957600080fd5b60006020828403121561389057600080fd5b8135611f6e81613868565b6000602082840312156138ad57600080fd5b5035919050565b60005b838110156138cf5781810151838201526020016138b7565b83811115610e395750506000910152565b600081518084526138f88160208601602086016138b4565b601f01601f19169290920160200192915050565b602081526000611f6e60208301846138e0565b80356001600160a01b038116811461393657600080fd5b919050565b6000806040838503121561394e57600080fd5b6139578361391f565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156139a3576139a3613965565b604052919050565b60006001600160401b038311156139c4576139c4613965565b6139d7601f8401601f191660200161397b565b90508281528383830111156139eb57600080fd5b828260208301376000602084830101529392505050565b600082601f830112613a1357600080fd5b611f6e838335602085016139ab565b60008060408385031215613a3557600080fd5b8235915060208301356001600160401b03811115613a5257600080fd5b613a5e85828601613a02565b9150509250929050565b80356001600160401b038116811461393657600080fd5b60008060408385031215613a9257600080fd5b82359150613aa260208401613a68565b90509250929050565b600080600060608486031215613ac057600080fd5b613ac98461391f565b95602085013595506040909401359392505050565b604080825283519082018190526000906020906060840190828701845b82811015613b1757815184529284019290840190600101613afb565b50505092019290925292915050565b600080600060608486031215613b3b57600080fd5b613b448461391f565b9250613b526020850161391f565b9150604084013590509250925092565b60008060408385031215613b7557600080fd5b50508035926020909101359150565b8035801515811461393657600080fd5b600060a08284031215613ba657600080fd5b60405160a081018181106001600160401b0382111715613bc857613bc8613965565b604052613bd483613b84565b8152613be260208401613a68565b6020820152613bf360408401613b84565b6040820152613c0460608401613a68565b6060820152613c1560808401613a68565b60808201529392505050565b600060208284031215613c3357600080fd5b81356001600160401b03811115613c4957600080fd5b612b3e84828501613a02565b600060208284031215613c6757600080fd5b611f6e8261391f565b60008060408385031215613c8357600080fd5b613c8c8361391f565b9150613aa260208401613b84565b600080600060408486031215613caf57600080fd5b83356001600160401b0380821115613cc657600080fd5b818601915086601f830112613cda57600080fd5b813581811115613ce957600080fd5b8760208260051b8501011115613cfe57600080fd5b6020928301989097509590910135949350505050565b60008060008060808587031215613d2a57600080fd5b613d338561391f565b9350613d416020860161391f565b92506040850135915060608501356001600160401b03811115613d6357600080fd5b8501601f81018713613d7457600080fd5b613d83878235602084016139ab565b91505092959194509250565b60006020808385031215613da257600080fd5b82356001600160401b0380821115613db957600080fd5b818501915085601f830112613dcd57600080fd5b813581811115613ddf57613ddf613965565b8060051b9150613df084830161397b565b8181529183018401918481019088841115613e0a57600080fd5b938501935b83851015613e2857843582529385019390850190613e0f565b98975050505050505050565b6020808252825182820181905260009190848201906040850190845b81811015613e755783516001600160401b031683529284019291840191600101613e50565b50909695505050505050565b600060808284031215613e9357600080fd5b604051608081018181106001600160401b0382111715613eb557613eb5613965565b604052613ec183613a68565b8152613ecf60208401613a68565b6020820152613ee060408401613a68565b6040820152613ef160608401613a68565b60608201529392505050565b60008060408385031215613f1057600080fd5b613f198361391f565b9150613aa26020840161391f565b634e487b7160e01b600052601160045260246000fd5b600082821015613f4f57613f4f613f27565b500390565b600181811c90821680613f6857607f821691505b60208210811415613f8957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000816000190483118215151615613fd557613fd5613f27565b500290565b600082613fe957613fe9613f8f565b500490565b600083516140008184602088016138b4565b8351908301906140148183602088016138b4565b01949350505050565b600060001982141561403157614031613f27565b5060010190565b6000821982111561404b5761404b613f27565b500190565b60006001600160a01b0380871683528086166020840152508360408301526080606083015261408260808301846138e0565b9695505050505050565b60006020828403121561409e57600080fd5b8151611f6e81613868565b6000826140b8576140b8613f8f565b50069056fe5265656e7472616e637947756172643a207265656e7472616e742063616c6c004f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a264697066735822122056b5b2f8fbde0073067209f3e414d0bb1f0b19707aa6f51b0122f46ae5e0e22964736f6c634300080c0033
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.