ERC-721
NFT
Overview
Max Total Supply
5,555 DRMY
Holders
1,661
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
0 DRMYLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Dreamy
Compiler Version
v0.8.14+commit.80d49f37
Optimization Enabled:
Yes with 100 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.14; import "@openzeppelin/contracts/finance/PaymentSplitter.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./lib/BlockbasedSale.sol"; import "./lib/Roles.sol"; import "./lib/Revealable.sol"; import "./lib/RequestSigning.sol"; import {DefaultOperatorFilterer} from "operator-filter-registry/src/DefaultOperatorFilterer.sol"; contract Dreamy is Ownable, ERC721, ERC721Enumerable, ReentrancyGuard, Roles, Revealable, BlockbasedSale, RequestSigning, DefaultOperatorFilterer { using Address for address; using SafeMath for uint256; event Airdrop(address[] addresses, uint256 amount); event Purchased(address indexed account, uint256 indexed index); event WithdrawNonPurchaseFund(uint256 balance); event Release(address account); mapping(address => uint256) private _privateSaleClaimed; mapping(address => uint256) private _ogClaimed; PaymentSplitter private _splitter; struct ChainLinkParams { address coordinator; address linkToken; bytes32 keyHash; } struct RevenueShareParams { address[] payees; uint256[] shares; } struct MintInfo { uint128 price; uint8 amount; } mapping(address => MintInfo[]) public fairDAInfo; modifier shareHolderOnly() { require( _splitter.shares(msg.sender) > 0 || owner() == _msgSender(), "not shareholder/owner" ); _; } constructor( string memory _tokenName, string memory _symbol, uint256 _maxSupply, uint256 _startPrice, string memory _defaultURI, ChainLinkParams memory chainLinkParams, RevenueShareParams memory revenueShare ) ERC721(_tokenName, _symbol) Revealable( _defaultURI, chainLinkParams.coordinator, chainLinkParams.linkToken, chainLinkParams.keyHash ) RequestSigning(_symbol) { _splitter = new PaymentSplitter( revenueShare.payees, revenueShare.shares ); maxSupply = _maxSupply; publicSaleBeginPrice = _startPrice; finalDAPrice = _startPrice; } function airdrop(address[] memory addresses, uint256 amount) external nonReentrant onlyOperator { require( totalSupply().add(addresses.length.mul(amount)) <= maxSupply, "Exceed max supply limit." ); require( saleStats.totalReserveMinted.add(addresses.length.mul(amount)) <= maxReserve, "Insufficient reserve." ); saleStats.totalReserveMinted = saleStats.totalReserveMinted.add( addresses.length.mul(amount) ); for (uint256 i = 0; i < addresses.length; i++) { _mintToken(addresses[i], amount); } emit Airdrop(addresses, amount); } function mintOg(uint256 amount, bytes calldata signature) external payable nonReentrant returns (bool) { require(msg.sender == tx.origin, "Contract is not allowed."); require( getState() == SaleState.PrivateSaleDuring, "Sale not available." ); require(isOG(signature), "Not OG whitelisted."); require(amount.add(_ogClaimed[msg.sender]) <= 2, "Already Claimed OG."); require( totalPrivateSaleMinted().add(amount) <= privateSaleCapped, "Exceed Private Sale Limit" ); require( msg.value >= amount.mul(getPriceByMode()), "Insufficient funds." ); _ogClaimed[msg.sender] = _ogClaimed[msg.sender] + amount; saleStats.totalOGMinted = saleStats.totalOGMinted.add(amount); _mintToken(msg.sender, amount); payable(_splitter).transfer(msg.value); return true; } function mintToken(uint256 amount, bytes calldata signature) external payable nonReentrant returns (bool) { SaleState state = getState(); require(msg.sender == tx.origin, "Contract is not allowed."); require( state == SaleState.PrivateSaleDuring || state == SaleState.PublicSaleDuring || state == SaleState.DutchAuctionDuring, "Sale not available." ); require( msg.value >= amount.mul(getPriceByMode()), "Insufficient funds." ); if (state == SaleState.DutchAuctionDuring) { require( amount <= saleConfig.maxDAMintPerTx, "Mint exceed transaction limits." ); require( saleStats.totalDAMinted.add(amount) <= dutchAuctionCapped, "Purchase exceed limit." ); } if (state == SaleState.PublicSaleDuring) { require( amount <= saleConfig.maxFMMintPerTx, "Mint exceed transaction limits." ); require( totalSupply().add(amount).add(availableReserve()) <= maxSupply, "Purchase exceed max supply." ); } if (state == SaleState.PrivateSaleDuring) { require(isWhiteListed(signature), "Not whitelisted."); require(amount <= 2, "Mint exceed transaction limits"); require( _privateSaleClaimed[msg.sender] + amount <= 2, "Mint limit per wallet exceeded." ); require( totalPrivateSaleMinted().add(amount) <= privateSaleCapped, "Purchase exceed sale capped." ); } _mintToken(msg.sender, amount); if (state == SaleState.DutchAuctionDuring) { saleStats.totalDAMinted = saleStats.totalDAMinted.add(amount); uint256 mintPrice = msg.value.div(amount); fairDAInfo[msg.sender].push( MintInfo(uint128(mintPrice), uint8(amount)) ); if (mintPrice < finalDAPrice) { finalDAPrice = mintPrice; } } if (state == SaleState.PublicSaleDuring) { saleStats.totalFMMinted = saleStats.totalFMMinted.add(amount); } if (state == SaleState.PrivateSaleDuring) { _privateSaleClaimed[msg.sender] = _privateSaleClaimed[msg.sender] + amount; saleStats.totalWLMinted = saleStats.totalWLMinted.add(amount); } payable(_splitter).transfer(msg.value); return true; } function dutchAuctionInfo(address user) external view returns (MintInfo[] memory) { return fairDAInfo[user]; } function _mintToken(address addr, uint256 amount) internal returns (bool) { for (uint256 i = 0; i < amount; i++) { uint256 tokenIndex = totalSupply(); if (tokenIndex < maxSupply) { _safeMint(addr, tokenIndex + 1); emit Purchased(addr, tokenIndex); } } return true; } function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) { require(tokenId <= totalSupply(), "Token not exist."); return isRevealed() ? string( abi.encodePacked( revealedBaseURI, getShuffledId(totalSupply(), maxSupply, tokenId, 1), ".json" ) ) : defaultURI; } function release(address payable account) external virtual shareHolderOnly { require( msg.sender == account || msg.sender == owner(), "Release: no permission" ); _splitter.release(account); emit Release(address(account)); } function withdraw() external onlyOperator { uint256 balance = address(this).balance; payable(msg.sender).transfer(balance); emit WithdrawNonPurchaseFund(balance); } function _beforeTokenTransfer( address from, address to, uint256 tokenId, uint256 batchSize ) internal virtual override(ERC721, ERC721Enumerable) { super._beforeTokenTransfer(from, to, tokenId, batchSize); } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) { return super.supportsInterface(interfaceId); } function setApprovalForAll(address operator, bool approved) public override(ERC721, IERC721) onlyAllowedOperatorApproval(operator) { super.setApprovalForAll(operator, approved); } function approve(address operator, uint256 tokenId) public override(ERC721, IERC721) onlyAllowedOperatorApproval(operator) { super.approve(operator, tokenId); } function transferFrom( address from, address to, uint256 tokenId ) public override(ERC721, IERC721) onlyAllowedOperator(from) { super.transferFrom(from, to, tokenId); } function safeTransferFrom( address from, address to, uint256 tokenId ) public override(ERC721, IERC721) onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId); } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public override(ERC721, IERC721) onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId, data); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (finance/PaymentSplitter.sol) pragma solidity ^0.8.0; import "../token/ERC20/utils/SafeERC20.sol"; import "../utils/Address.sol"; import "../utils/Context.sol"; /** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each * account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim * an amount proportional to the percentage of total shares they were assigned. The distribution of shares is set at the * time of contract deployment and can't be updated thereafter. * * `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the * accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release} * function. * * NOTE: This contract assumes that ERC20 tokens will behave similarly to native tokens (Ether). Rebasing tokens, and * tokens that apply fees during transfers, are likely to not be supported as expected. If in doubt, we encourage you * to run tests before sending real value to this contract. */ contract PaymentSplitter is Context { event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount); event PaymentReceived(address from, uint256 amount); uint256 private _totalShares; uint256 private _totalReleased; mapping(address => uint256) private _shares; mapping(address => uint256) private _released; address[] private _payees; mapping(IERC20 => uint256) private _erc20TotalReleased; mapping(IERC20 => mapping(address => uint256)) private _erc20Released; /** * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at * the matching position in the `shares` array. * * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no * duplicates in `payees`. */ constructor(address[] memory payees, uint256[] memory shares_) payable { require(payees.length == shares_.length, "PaymentSplitter: payees and shares length mismatch"); require(payees.length > 0, "PaymentSplitter: no payees"); for (uint256 i = 0; i < payees.length; i++) { _addPayee(payees[i], shares_[i]); } } /** * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the * reliability of the events, and not the actual splitting of Ether. * * To learn more about this see the Solidity documentation for * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback * functions]. */ receive() external payable virtual { emit PaymentReceived(_msgSender(), msg.value); } /** * @dev Getter for the total shares held by payees. */ function totalShares() public view returns (uint256) { return _totalShares; } /** * @dev Getter for the total amount of Ether already released. */ function totalReleased() public view returns (uint256) { return _totalReleased; } /** * @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20 * contract. */ function totalReleased(IERC20 token) public view returns (uint256) { return _erc20TotalReleased[token]; } /** * @dev Getter for the amount of shares held by an account. */ function shares(address account) public view returns (uint256) { return _shares[account]; } /** * @dev Getter for the amount of Ether already released to a payee. */ function released(address account) public view returns (uint256) { return _released[account]; } /** * @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an * IERC20 contract. */ function released(IERC20 token, address account) public view returns (uint256) { return _erc20Released[token][account]; } /** * @dev Getter for the address of the payee number `index`. */ function payee(uint256 index) public view returns (address) { return _payees[index]; } /** * @dev Getter for the amount of payee's releasable Ether. */ function releasable(address account) public view returns (uint256) { uint256 totalReceived = address(this).balance + totalReleased(); return _pendingPayment(account, totalReceived, released(account)); } /** * @dev Getter for the amount of payee's releasable `token` tokens. `token` should be the address of an * IERC20 contract. */ function releasable(IERC20 token, address account) public view returns (uint256) { uint256 totalReceived = token.balanceOf(address(this)) + totalReleased(token); return _pendingPayment(account, totalReceived, released(token, account)); } /** * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the * total shares and their previous withdrawals. */ function release(address payable account) public virtual { require(_shares[account] > 0, "PaymentSplitter: account has no shares"); uint256 payment = releasable(account); require(payment != 0, "PaymentSplitter: account is not due payment"); // _totalReleased is the sum of all values in _released. // If "_totalReleased += payment" does not overflow, then "_released[account] += payment" cannot overflow. _totalReleased += payment; unchecked { _released[account] += payment; } Address.sendValue(account, payment); emit PaymentReleased(account, payment); } /** * @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their * percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20 * contract. */ function release(IERC20 token, address account) public virtual { require(_shares[account] > 0, "PaymentSplitter: account has no shares"); uint256 payment = releasable(token, account); require(payment != 0, "PaymentSplitter: account is not due payment"); // _erc20TotalReleased[token] is the sum of all values in _erc20Released[token]. // If "_erc20TotalReleased[token] += payment" does not overflow, then "_erc20Released[token][account] += payment" // cannot overflow. _erc20TotalReleased[token] += payment; unchecked { _erc20Released[token][account] += payment; } SafeERC20.safeTransfer(token, account, payment); emit ERC20PaymentReleased(token, account, payment); } /** * @dev internal logic for computing the pending payment of an `account` given the token historical balances and * already released amounts. */ function _pendingPayment( address account, uint256 totalReceived, uint256 alreadyReleased ) private view returns (uint256) { return (totalReceived * _shares[account]) / _totalShares - alreadyReleased; } /** * @dev Add a new payee to the contract. * @param account The address of the payee to add. * @param shares_ The number of shares owned by the payee. */ function _addPayee(address account, uint256 shares_) private { require(account != address(0), "PaymentSplitter: account is the zero address"); require(shares_ > 0, "PaymentSplitter: shares are 0"); require(_shares[account] == 0, "PaymentSplitter: account already has shares"); _payees.push(account); _shares[account] = shares_; _totalShares = _totalShares + shares_; emit PayeeAdded(account, shares_); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: address zero is not a valid owner"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _ownerOf(tokenId); require(owner != address(0), "ERC721: invalid token ID"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { _requireMinted(tokenId); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not token owner or approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { _requireMinted(tokenId); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved"); _safeTransfer(from, to, tokenId, data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist */ function _ownerOf(uint256 tokenId) internal view virtual returns (address) { return _owners[tokenId]; } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _ownerOf(tokenId) != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { address owner = ERC721.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId, 1); // Check that tokenId was not minted by `_beforeTokenTransfer` hook require(!_exists(tokenId), "ERC721: token already minted"); unchecked { // Will not overflow unless all 2**256 token ids are minted to the same owner. // Given that tokens are minted one by one, it is impossible in practice that // this ever happens. Might change if we allow batch minting. // The ERC fails to describe this case. _balances[to] += 1; } _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId, 1); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * This is an internal function that does not check if the sender is authorized to operate on the token. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId, 1); // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook owner = ERC721.ownerOf(tokenId); // Clear approvals delete _tokenApprovals[tokenId]; unchecked { // Cannot overflow, as that would require more tokens to be burned/transferred // out than the owner initially received through minting and transferring in. _balances[owner] -= 1; } delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId, 1); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId, 1); // Check that tokenId was not transferred by `_beforeTokenTransfer` hook require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); // Clear approvals from the previous owner delete _tokenApprovals[tokenId]; unchecked { // `_balances[from]` cannot overflow for the same reason as described in `_burn`: // `from`'s balance is the number of token held, which is at least one before the current // transfer. // `_balances[to]` could overflow in the conditions described in `_mint`. That would require // all 2**256 token ids to be minted, which in practice is impossible. _balances[from] -= 1; _balances[to] += 1; } _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId, 1); } /** * @dev Approve `to` to operate on `tokenId` * * Emits an {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Reverts if the `tokenId` has not been minted yet. */ function _requireMinted(uint256 tokenId) internal view virtual { require(_exists(tokenId), "ERC721: invalid token ID"); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`. * - When `from` is zero, the tokens will be minted for `to`. * - When `to` is zero, ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * - `batchSize` is non-zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256, /* firstTokenId */ uint256 batchSize ) internal virtual { if (batchSize > 1) { if (from != address(0)) { _balances[from] -= batchSize; } if (to != address(0)) { _balances[to] += batchSize; } } } /** * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`. * - When `from` is zero, the tokens were minted for `to`. * - When `to` is zero, ``from``'s tokens were burned. * - `from` and `to` are never both zero. * - `batchSize` is non-zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 firstTokenId, uint256 batchSize ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "./IERC721Enumerable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev See {ERC721-_beforeTokenTransfer}. */ function _beforeTokenTransfer( address from, address to, uint256 firstTokenId, uint256 batchSize ) internal virtual override { super._beforeTokenTransfer(from, to, firstTokenId, batchSize); if (batchSize > 1) { // Will only trigger during construction. Batch transferring (minting) is not available afterwards. revert("ERC721Enumerable: consecutive transfers not supported"); } uint256 tokenId = firstTokenId; if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (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 Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { 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 pragma solidity 0.8.14; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "./Roles.sol"; contract BlockbasedSale is Ownable, Roles { using SafeMath for uint256; event AssignDutchAuction(bool flag); event AssignDutchAuctionCap(uint256 cap); event AssignPrivateSaleCap(uint256 cap); event AssignPriceDecayParameter( uint256 size, uint256 _lowerBoundPrice, uint256 _priceFactor ); event AssignTransactionLimit(uint256 _dutchAuction, uint256 _freeMarket); event AssignPrivateSaleConfig(uint256 beginBlock, uint256 endBlock); event AssignPublicSaleConfig(uint256 beginBlock, uint256 endBlock); event AssignDutchAuctionConfig(uint256 beginBlock, uint256 endBlock); event AssignPrivateSalePrice(uint256 price); event AssignPublicSalePrice(uint256 price); event AssignReserveLimit(uint256 limit); event AssignPrivateSapeCap(uint256 cap); event EnablePublicSale(); event EnablePrivateSale(); event EnableFairDutchAuction(); event ForceCloseSale(); event ForcePauseSale(); event ResetOverridedSaleState(); event OverrideFinalDAPrice(uint256 price); enum SaleState { NotStarted, DutchAuctionBeforeWithoutBlock, DutchAuctionBeforeWithBlock, DutchAuctionDuring, DutchAuctionEnd, DutchAuctionEndSoldOut, PrivateSaleBeforeWithoutBlock, PrivateSaleBeforeWithBlock, PrivateSaleDuring, PrivateSaleEnd, PrivateSaleEndSoldOut, PublicSaleBeforeWithoutBlock, PublicSaleBeforeWithBlock, PublicSaleDuring, PublicSaleEnd, PublicSaleEndSoldOut, PauseSale, AllSalesEnd } enum SalePhase { None, DutchAuction, Private, Public } enum OverrideSaleState { None, Pause, Close } struct SalesBlock { uint256 beginBlock; uint256 endBlock; } struct DutchAuctionConfig { uint256 discountBlockSize; uint256 lowerBoundPrice; uint256 priceFactor; } struct SaleStats { uint256 totalReserveMinted; uint256 totalDAMinted; uint256 totalOGMinted; uint256 totalWLMinted; uint256 totalFMMinted; } struct SaleConfig { uint256 maxDAMintPerTx; uint256 maxFMMintPerTx; } SalesBlock public dutchAuction; SalesBlock public privateSale; SalesBlock public publicSale; OverrideSaleState public overridedSaleState = OverrideSaleState.None; SalePhase public salePhase = SalePhase.None; DutchAuctionConfig public dutchAuctionConfig; SaleStats public saleStats; SaleConfig public saleConfig; uint256 public maxSupply = 10000; uint256 public maxReserve; uint256 public privateSalePriceCapped = 500000000000000000; uint256 public publicSaleBeginPrice = 500000000000000000; uint256 public finalDAPrice; uint256 public privateSaleCapped; uint256 public dutchAuctionCapped; function setDutchAuctionBlocks(SalesBlock memory _dutchAuction) external onlyOperator { dutchAuction = _dutchAuction; emit AssignDutchAuctionConfig( _dutchAuction.beginBlock, _dutchAuction.endBlock ); } function setPrivateSaleBlocks(SalesBlock memory _privateSale) external onlyOperator { privateSale = _privateSale; emit AssignPrivateSaleConfig( _privateSale.beginBlock, _privateSale.endBlock ); } function setPublicSaleBlocks(SalesBlock memory _publicSale) external onlyOperator { publicSale = _publicSale; emit AssignPublicSaleConfig( _publicSale.beginBlock, _publicSale.endBlock ); } function setOverrideFinalDAPrice(uint256 price) external onlyOperator { finalDAPrice = price; emit OverrideFinalDAPrice(price); } function setDutchAuctionParam( uint256 size, uint256 lowerBoundPrice, uint256 factor ) external onlyOperator { dutchAuctionConfig.discountBlockSize = size; dutchAuctionConfig.lowerBoundPrice = lowerBoundPrice; dutchAuctionConfig.priceFactor = factor; emit AssignPriceDecayParameter(size, lowerBoundPrice, factor); } function setTransactionLimit(uint256 _dutchAuction, uint256 _freeMarket) external onlyOperator { saleConfig.maxDAMintPerTx = _dutchAuction; saleConfig.maxFMMintPerTx = _freeMarket; emit AssignTransactionLimit(_dutchAuction, _freeMarket); } function setPublicSalePrice(uint256 _price) external onlyOperator { publicSaleBeginPrice = _price; emit AssignPublicSalePrice(_price); } function setPrivateSaleCapPrice(uint256 _price) external onlyOperator { privateSalePriceCapped = _price; emit AssignPrivateSalePrice(_price); } function setCloseSale() external onlyOperator { overridedSaleState = OverrideSaleState.Close; emit ForceCloseSale(); } function setPauseSale() external onlyOperator { overridedSaleState = OverrideSaleState.Pause; emit ForcePauseSale(); } function resetOverridedSaleState() external onlyOperator { overridedSaleState = OverrideSaleState.None; emit ResetOverridedSaleState(); } function setReserve(uint256 reserve) external onlyOperator { maxReserve = reserve; emit AssignReserveLimit(reserve); } function setDutchAuctionCap(uint256 cap) external onlyOperator { dutchAuctionCapped = cap; emit AssignDutchAuctionCap(cap); } function setPrivateSaleCap(uint256 cap) external onlyOperator { privateSaleCapped = cap; emit AssignPrivateSaleCap(cap); } function enableDutchAuction() external onlyOperator { salePhase = SalePhase.DutchAuction; emit EnableFairDutchAuction(); } function enablePublicSale() external onlyOperator { salePhase = SalePhase.Public; emit EnablePublicSale(); } function enablePrivateSale() external onlyOperator { salePhase = SalePhase.Private; emit EnablePrivateSale(); } function getStartSaleBlock() external view returns (uint256) { if (salePhase == SalePhase.DutchAuction) { return dutchAuction.beginBlock; } if (salePhase == SalePhase.Private) { return privateSale.beginBlock; } if (salePhase == SalePhase.Public) { return publicSale.beginBlock; } return 0; } function getEndSaleBlock() external view returns (uint256) { if (salePhase == SalePhase.DutchAuction) { return dutchAuction.endBlock; } if (salePhase == SalePhase.Private) { return privateSale.endBlock; } if (salePhase == SalePhase.Public) { return publicSale.endBlock; } return 0; } function availableReserve() public view returns (uint256) { return maxReserve - saleStats.totalReserveMinted; } function getMaxSupplyByMode() external view returns (uint256) { SaleState state = getState(); if (state == SaleState.DutchAuctionDuring) return dutchAuctionCapped; if (state == SaleState.PrivateSaleDuring) return privateSaleCapped; if (state == SaleState.PublicSaleDuring) return maxSupply - saleStats.totalOGMinted - saleStats.totalWLMinted - maxReserve - saleStats.totalDAMinted; return 0; } function getMintedByMode() external view returns (uint256) { SaleState state = getState(); if (state == SaleState.PrivateSaleDuring) return saleStats.totalOGMinted + saleStats.totalWLMinted; if (state == SaleState.PublicSaleDuring) return saleStats.totalFMMinted; if (state == SaleState.DutchAuctionDuring) return saleStats.totalDAMinted; return 0; } function getTransactionCappedByMode() external view returns (uint256) { if (getState() == SaleState.DutchAuctionDuring) return saleConfig.maxDAMintPerTx; if (getState() == SaleState.PublicSaleDuring) return saleConfig.maxFMMintPerTx; return 2; } function getPriceByMode() public view returns (uint256) { SaleState state = getState(); if (state == SaleState.DutchAuctionDuring) { uint256 passedBlock = block.number - dutchAuction.beginBlock; uint256 discountPrice = passedBlock .div(dutchAuctionConfig.discountBlockSize) .mul(dutchAuctionConfig.priceFactor); if ( discountPrice >= publicSaleBeginPrice.sub(dutchAuctionConfig.lowerBoundPrice) ) { return dutchAuctionConfig.lowerBoundPrice; } else { return publicSaleBeginPrice.sub(discountPrice); } } if (state == SaleState.PrivateSaleDuring) { return privateSalePriceCapped; } if (state == SaleState.PublicSaleDuring) { return publicSaleBeginPrice; } return publicSaleBeginPrice; } function totalPrivateSaleMinted() public view returns (uint256) { return saleStats.totalWLMinted + saleStats.totalOGMinted; } function isPrivateSaleSoldOut() public view returns (bool) { return totalPrivateSaleMinted() == privateSaleCapped; } function isDASoldOut() public view returns (bool) { return dutchAuctionCapped == saleStats.totalDAMinted; } function isSoldOut() public view returns (bool) { uint256 supplyWithoutReserve = maxSupply - maxReserve; uint256 mintedWithoutReserve = saleStats.totalDAMinted + saleStats.totalFMMinted + saleStats.totalOGMinted + saleStats.totalWLMinted; return supplyWithoutReserve == mintedWithoutReserve; } function getStateName() external view returns (string memory) { SaleState state = getState(); if (state == SaleState.DutchAuctionBeforeWithoutBlock) return "DutchAuctionBeforeWithoutBlock"; if (state == SaleState.DutchAuctionBeforeWithBlock) return "DutchAuctionBeforeWithBlock"; if (state == SaleState.DutchAuctionDuring) return "DutchAuctionDuring"; if (state == SaleState.DutchAuctionEnd) return "DutchAuctionEnd"; if (state == SaleState.DutchAuctionEndSoldOut) return "DutchAuctionEndSoldOut"; if (state == SaleState.PrivateSaleBeforeWithoutBlock) return "PrivateSaleBeforeWithoutBlock"; if (state == SaleState.PrivateSaleBeforeWithBlock) return "PrivateSaleBeforeWithBlock"; if (state == SaleState.PrivateSaleDuring) return "PrivateSaleDuring"; if (state == SaleState.PrivateSaleEnd) return "PrivateSaleEnd"; if (state == SaleState.PrivateSaleEndSoldOut) return "PrivateSaleEndSoldOut"; if (state == SaleState.PublicSaleBeforeWithoutBlock) return "PublicSaleBeforeWithoutBlock"; if (state == SaleState.PublicSaleBeforeWithBlock) return "PublicSaleBeforeWithBlock"; if (state == SaleState.PublicSaleDuring) return "PublicSaleDuring"; if (state == SaleState.PublicSaleEnd) return "PublicSaleEnd"; if (state == SaleState.PublicSaleEndSoldOut) return "PublicSaleEndSoldOut"; if (state == SaleState.PauseSale) return "PauseSale"; if (state == SaleState.AllSalesEnd) return "AllSalesEnd"; return "NotStarted"; } function getState() public view returns (SaleState) { if (overridedSaleState == OverrideSaleState.Close) { return SaleState.AllSalesEnd; } if (overridedSaleState == OverrideSaleState.Pause) { return SaleState.PauseSale; } if (salePhase == SalePhase.None) { return SaleState.NotStarted; } /******* Public Sale Phase Determination *******/ if (salePhase == SalePhase.Public) { if (isSoldOut()) { return SaleState.PublicSaleEndSoldOut; } if (publicSale.endBlock > 0 && block.number > publicSale.endBlock) { return SaleState.PublicSaleEnd; } if ( publicSale.beginBlock > 0 && block.number >= publicSale.beginBlock ) { return SaleState.PublicSaleDuring; } if ( publicSale.beginBlock > 0 && block.number < publicSale.beginBlock && block.number > privateSale.endBlock ) { return SaleState.PublicSaleBeforeWithBlock; } if ( publicSale.beginBlock == 0 && block.number > privateSale.endBlock ) { return SaleState.PublicSaleBeforeWithoutBlock; } } /******* Private Sale Phase Determination *******/ if (salePhase == SalePhase.Private) { if (isPrivateSaleSoldOut()) { return SaleState.PrivateSaleEndSoldOut; } if ( privateSale.endBlock > 0 && block.number > privateSale.endBlock ) { return SaleState.PrivateSaleEnd; } if ( privateSale.beginBlock > 0 && block.number >= privateSale.beginBlock ) { return SaleState.PrivateSaleDuring; } if ( privateSale.beginBlock > 0 && block.number < privateSale.beginBlock ) { return SaleState.PrivateSaleBeforeWithBlock; } if (privateSale.beginBlock == 0) { return SaleState.PrivateSaleBeforeWithoutBlock; } } /******* Dutch Auction Phase Determination *******/ if (salePhase == SalePhase.DutchAuction) { if (isDASoldOut()) { return SaleState.DutchAuctionEndSoldOut; } if ( dutchAuction.endBlock > 0 && block.number > dutchAuction.endBlock ) { return SaleState.DutchAuctionEnd; } if ( dutchAuction.beginBlock > 0 && block.number >= dutchAuction.beginBlock ) { return SaleState.DutchAuctionDuring; } if ( dutchAuction.beginBlock > 0 && block.number < dutchAuction.beginBlock ) { return SaleState.DutchAuctionBeforeWithBlock; } if (dutchAuction.beginBlock == 0) { return SaleState.DutchAuctionBeforeWithoutBlock; } } return SaleState.NotStarted; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.14; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; abstract contract Roles is Ownable { address public operatorAddress; address public governorAddress; event AssignGovernorAddress(address indexed _address); event AssignOperatorAddress(address indexed _address); constructor() {} modifier onlyOperator() { require( msg.sender == operatorAddress, "Only operator allowed." ); _; } modifier onlyGovernor() { require( msg.sender == governorAddress, "Only governor allowed." ); _; } function setOperatorAddress(address _operator) external onlyOwner { require(_operator != address(0), "Cannot assign 0x0"); operatorAddress = _operator; emit AssignOperatorAddress(_operator); } function setGovernorAddress(address _governor) external onlyOwner { require(_governor != address(0), "Cannot assign 0x0"); governorAddress = _governor; emit AssignGovernorAddress(_governor); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.14; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "./Roles.sol"; abstract contract Revealable is VRFConsumerBase, Roles { bool public randomseedRequested; bytes32 public keyHash; uint256 public revealBlock; uint256 public seed; string public revealedBaseURI; string public defaultURI; event RandomseedRequested(uint256 timestamp); event RandomseedFulfilmentSuccess( uint256 timestamp, bytes32 requestId, uint256 seed ); event RandomseedFulfilmentFail(uint256 timestamp, bytes32 requestId, uint256 randomNumber); event SetRevealedBaseURI(string _baseURI); event SetRevealBlock(uint256 blockNumber); event SetDefaultURI(string uri); constructor( string memory _defaultUri, address _coordinator, address _linkToken, bytes32 _keyHash ) VRFConsumerBase(_coordinator, _linkToken) { defaultURI = _defaultUri; keyHash = _keyHash; } function setDefaultURI(string memory _defaultURI) external onlyOperator { require(!isRevealed(), "Already revealed"); defaultURI = _defaultURI; emit SetDefaultURI(_defaultURI); } function setRevealBlock(uint256 blockNumber) external onlyOperator { revealBlock = blockNumber; emit SetRevealBlock(blockNumber); } function setRevealedBaseURI(string memory _baseURI) external onlyOperator { revealedBaseURI = _baseURI; emit SetRevealedBaseURI(_baseURI); } function requestChainlinkVRF() external onlyOperator { require(!randomseedRequested, "Chainlink VRF already requested"); require( LINK.balanceOf(address(this)) >= 2000000000000000000, "Insufficient LINK" ); requestRandomness(keyHash, 2000000000000000000); randomseedRequested = true; emit RandomseedRequested(block.timestamp); } function fulfillRandomness(bytes32 requestId, uint256 randomNumber) internal override { if (randomNumber > 0) { if (seed == 0) { seed = randomNumber; emit RandomseedFulfilmentSuccess(block.timestamp, requestId, seed); } else { emit RandomseedFulfilmentFail(block.timestamp, requestId, randomNumber); } } else { emit RandomseedFulfilmentFail(block.timestamp, requestId, randomNumber); } } function isRevealed() public view returns (bool) { return seed > 0 && revealBlock > 0 && block.number > revealBlock; } function setSeed(uint256 _seed) external onlyOperator { require(seed == 0, "Seed number exists."); seed = _seed; randomseedRequested = true; emit RandomseedFulfilmentSuccess(block.timestamp, 0, seed); } function getShuffledId( uint256 totalSupply, uint256 maxSupply, uint256 tokenId, uint256 startIndex ) public view returns (string memory) { if (_msgSender() != owner()) { require(tokenId <= totalSupply, "Token not exists"); } if (!isRevealed()) return "default"; uint256[] memory metadata = new uint256[](maxSupply + 1); for (uint256 i = 1; i <= maxSupply; i += 1) { metadata[i] = i; } for (uint256 i = startIndex; i <= maxSupply; i += 1) { uint256 j = (uint256(keccak256(abi.encode(seed, i))) % (maxSupply)) + 1; (metadata[i], metadata[j]) = (metadata[j], metadata[i]); } return Strings.toString(metadata[tokenId]); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.14; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./Roles.sol"; abstract contract RequestSigning is Ownable, Roles { using ECDSA for bytes32; event AssignWhitelistSigningKey(address indexed _address); event AssignOgSigningKey(address indexed _address); // The key(s) used to sign whitelist signatures. // We will check to ensure that the key that signed the signature // is this one that we expect. address public whitelistKey = address(0); address public ogKey = address(0); // Domain Separator is the EIP-712 defined structure that defines what contract // and chain these signatures can be used for. This ensures people can't take // a signature used to mint on one contract and use it for another, or a signature // from testnet to replay on mainnet. // It has to be created in the constructor so we can dynamically grab the chainId. // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md#definition-of-domainseparator bytes32 public domainSeparator; // The typehash for the data type specified in the structured data // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md#rationale-for-typehash // This should match whats in the client side whitelist signing code bytes32 public constant MINTER_TYPEHASH = keccak256("Minter(address wallet)"); constructor(string memory _schemeName) { // This should match whats in the client side whitelist signing code domainSeparator = keccak256( abi.encode( keccak256( "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)" ), // This should match the domain you set in your client side signing. keccak256(bytes.concat(bytes(_schemeName), bytes("Whitelist"))), keccak256(bytes("1")), block.chainid, address(this) ) ); } function setWhitelistSigningKey(address newSigningKey) external onlyOperator { whitelistKey = newSigningKey; emit AssignWhitelistSigningKey(newSigningKey); } function setOgSigningKey(address newSigningKey) external onlyOperator { ogKey = newSigningKey; emit AssignOgSigningKey(newSigningKey); } function isWhiteListed(bytes calldata signature) public view returns (bool) { require(whitelistKey != address(0), "WL key not assigned"); return getEIP712RecoverAddress(signature) == whitelistKey; } function isOG(bytes calldata signature) public view returns (bool) { require(ogKey != address(0), "OG key not assigned"); return getEIP712RecoverAddress(signature) == ogKey; } function getEIP712RecoverAddress(bytes calldata signature) internal view returns (address) { // Verify EIP-712 signature by recreating the data structure // that we signed on the client side, and then using that to recover // the address that signed the signature for this data. // Signature begin with \x19\x01, see: https://eips.ethereum.org/EIPS/eip-712 bytes32 digest = keccak256( abi.encodePacked( "\x19\x01", domainSeparator, keccak256(abi.encode(MINTER_TYPEHASH, msg.sender)) ) ); // Use the recover method to see what address was used to create // the signature on this data. // Note that if the digest doesn't exactly match what was signed we'll // get a random recovered address. return digest.recover(signature); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {OperatorFilterer} from "./OperatorFilterer.sol"; /** * @title DefaultOperatorFilterer * @notice Inherits from OperatorFilterer and automatically subscribes to the default OpenSea subscription. */ abstract contract DefaultOperatorFilterer is OperatorFilterer { address constant DEFAULT_SUBSCRIPTION = address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6); constructor() OperatorFilterer(DEFAULT_SUBSCRIPTION, true) {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts 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 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (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() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // 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 // OpenZeppelin Contracts (last updated v4.7.0) (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 Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { require(paused(), "Pausable: not paused"); } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./interfaces/LinkTokenInterface.sol"; import "./VRFRequestIDBase.sol"; /** **************************************************************************** * @notice Interface for contracts using VRF randomness * ***************************************************************************** * @dev PURPOSE * * @dev Reggie the Random Oracle (not his real job) wants to provide randomness * @dev to Vera the verifier in such a way that Vera can be sure he's not * @dev making his output up to suit himself. Reggie provides Vera a public key * @dev to which he knows the secret key. Each time Vera provides a seed to * @dev Reggie, he gives back a value which is computed completely * @dev deterministically from the seed and the secret key. * * @dev Reggie provides a proof by which Vera can verify that the output was * @dev correctly computed once Reggie tells it to her, but without that proof, * @dev the output is indistinguishable to her from a uniform random sample * @dev from the output space. * * @dev The purpose of this contract is to make it easy for unrelated contracts * @dev to talk to Vera the verifier about the work Reggie is doing, to provide * @dev simple access to a verifiable source of randomness. * ***************************************************************************** * @dev USAGE * * @dev Calling contracts must inherit from VRFConsumerBase, and can * @dev initialize VRFConsumerBase's attributes in their constructor as * @dev shown: * * @dev contract VRFConsumer { * @dev constructor(<other arguments>, address _vrfCoordinator, address _link) * @dev VRFConsumerBase(_vrfCoordinator, _link) public { * @dev <initialization with other arguments goes here> * @dev } * @dev } * * @dev The oracle will have given you an ID for the VRF keypair they have * @dev committed to (let's call it keyHash), and have told you the minimum LINK * @dev price for VRF service. Make sure your contract has sufficient LINK, and * @dev call requestRandomness(keyHash, fee, seed), where seed is the input you * @dev want to generate randomness from. * * @dev Once the VRFCoordinator has received and validated the oracle's response * @dev to your request, it will call your contract's fulfillRandomness method. * * @dev The randomness argument to fulfillRandomness is the actual random value * @dev generated from your seed. * * @dev The requestId argument is generated from the keyHash and the seed by * @dev makeRequestId(keyHash, seed). If your contract could have concurrent * @dev requests open, you can use the requestId to track which seed is * @dev associated with which randomness. See VRFRequestIDBase.sol for more * @dev details. (See "SECURITY CONSIDERATIONS" for principles to keep in mind, * @dev if your contract could have multiple requests in flight simultaneously.) * * @dev Colliding `requestId`s are cryptographically impossible as long as seeds * @dev differ. (Which is critical to making unpredictable randomness! See the * @dev next section.) * * ***************************************************************************** * @dev SECURITY CONSIDERATIONS * * @dev A method with the ability to call your fulfillRandomness method directly * @dev could spoof a VRF response with any random value, so it's critical that * @dev it cannot be directly called by anything other than this base contract * @dev (specifically, by the VRFConsumerBase.rawFulfillRandomness method). * * @dev For your users to trust that your contract's random behavior is free * @dev from malicious interference, it's best if you can write it so that all * @dev behaviors implied by a VRF response are executed *during* your * @dev fulfillRandomness method. If your contract must store the response (or * @dev anything derived from it) and use it later, you must ensure that any * @dev user-significant behavior which depends on that stored value cannot be * @dev manipulated by a subsequent VRF request. * * @dev Similarly, both miners and the VRF oracle itself have some influence * @dev over the order in which VRF responses appear on the blockchain, so if * @dev your contract could have multiple VRF requests in flight simultaneously, * @dev you must ensure that the order in which the VRF responses arrive cannot * @dev be used to manipulate your contract's user-significant behavior. * * @dev Since the ultimate input to the VRF is mixed with the block hash of the * @dev block in which the request is made, user-provided seeds have no impact * @dev on its economic security properties. They are only included for API * @dev compatability with previous versions of this contract. * * @dev Since the block hash of the block which contains the requestRandomness * @dev call is mixed into the input to the VRF *last*, a sufficiently powerful * @dev miner could, in principle, fork the blockchain to evict the block * @dev containing the request, forcing the request to be included in a * @dev different block with a different hash, and therefore a different input * @dev to the VRF. However, such an attack would incur a substantial economic * @dev cost. This cost scales with the number of blocks the VRF oracle waits * @dev until it calls responds to a request. */ abstract contract VRFConsumerBase is VRFRequestIDBase { /** * @notice fulfillRandomness handles the VRF response. Your contract must * @notice implement it. See "SECURITY CONSIDERATIONS" above for important * @notice principles to keep in mind when implementing your fulfillRandomness * @notice method. * * @dev VRFConsumerBase expects its subcontracts to have a method with this * @dev signature, and will call it once it has verified the proof * @dev associated with the randomness. (It is triggered via a call to * @dev rawFulfillRandomness, below.) * * @param requestId The Id initially returned by requestRandomness * @param randomness the VRF output */ function fulfillRandomness(bytes32 requestId, uint256 randomness) internal virtual; /** * @dev In order to keep backwards compatibility we have kept the user * seed field around. We remove the use of it because given that the blockhash * enters later, it overrides whatever randomness the used seed provides. * Given that it adds no security, and can easily lead to misunderstandings, * we have removed it from usage and can now provide a simpler API. */ uint256 private constant USER_SEED_PLACEHOLDER = 0; /** * @notice requestRandomness initiates a request for VRF output given _seed * * @dev The fulfillRandomness method receives the output, once it's provided * @dev by the Oracle, and verified by the vrfCoordinator. * * @dev The _keyHash must already be registered with the VRFCoordinator, and * @dev the _fee must exceed the fee specified during registration of the * @dev _keyHash. * * @dev The _seed parameter is vestigial, and is kept only for API * @dev compatibility with older versions. It can't *hurt* to mix in some of * @dev your own randomness, here, but it's not necessary because the VRF * @dev oracle will mix the hash of the block containing your request into the * @dev VRF seed it ultimately uses. * * @param _keyHash ID of public key against which randomness is generated * @param _fee The amount of LINK to send with the request * * @return requestId unique ID for this request * * @dev The returned requestId can be used to distinguish responses to * @dev concurrent requests. It is passed as the first argument to * @dev fulfillRandomness. */ function requestRandomness(bytes32 _keyHash, uint256 _fee) internal returns (bytes32 requestId) { LINK.transferAndCall(vrfCoordinator, _fee, abi.encode(_keyHash, USER_SEED_PLACEHOLDER)); // This is the seed passed to VRFCoordinator. The oracle will mix this with // the hash of the block containing this request to obtain the seed/input // which is finally passed to the VRF cryptographic machinery. uint256 vRFSeed = makeVRFInputSeed(_keyHash, USER_SEED_PLACEHOLDER, address(this), nonces[_keyHash]); // nonces[_keyHash] must stay in sync with // VRFCoordinator.nonces[_keyHash][this], which was incremented by the above // successful LINK.transferAndCall (in VRFCoordinator.randomnessRequest). // This provides protection against the user repeating their input seed, // which would result in a predictable/duplicate output, if multiple such // requests appeared in the same block. nonces[_keyHash] = nonces[_keyHash] + 1; return makeRequestId(_keyHash, vRFSeed); } LinkTokenInterface internal immutable LINK; address private immutable vrfCoordinator; // Nonces for each VRF key from which randomness has been requested. // // Must stay in sync with VRFCoordinator[_keyHash][this] mapping(bytes32 => uint256) /* keyHash */ /* nonce */ private nonces; /** * @param _vrfCoordinator address of VRFCoordinator contract * @param _link address of LINK token contract * * @dev https://docs.chain.link/docs/link-token-contracts */ constructor(address _vrfCoordinator, address _link) { vrfCoordinator = _vrfCoordinator; LINK = LinkTokenInterface(_link); } // rawFulfillRandomness is called by VRFCoordinator when it receives a valid VRF // proof. rawFulfillRandomness then calls fulfillRandomness, after validating // the origin of the call function rawFulfillRandomness(bytes32 requestId, uint256 randomness) external { require(msg.sender == vrfCoordinator, "Only VRFCoordinator can fulfill"); fulfillRandomness(requestId, randomness); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface LinkTokenInterface { function allowance(address owner, address spender) external view returns (uint256 remaining); function approve(address spender, uint256 value) external returns (bool success); function balanceOf(address owner) external view returns (uint256 balance); function decimals() external view returns (uint8 decimalPlaces); function decreaseApproval(address spender, uint256 addedValue) external returns (bool success); function increaseApproval(address spender, uint256 subtractedValue) external; function name() external view returns (string memory tokenName); function symbol() external view returns (string memory tokenSymbol); function totalSupply() external view returns (uint256 totalTokensIssued); function transfer(address to, uint256 value) external returns (bool success); function transferAndCall( address to, uint256 value, bytes calldata data ) external returns (bool success); function transferFrom( address from, address to, uint256 value ) external returns (bool success); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract VRFRequestIDBase { /** * @notice returns the seed which is actually input to the VRF coordinator * * @dev To prevent repetition of VRF output due to repetition of the * @dev user-supplied seed, that seed is combined in a hash with the * @dev user-specific nonce, and the address of the consuming contract. The * @dev risk of repetition is mostly mitigated by inclusion of a blockhash in * @dev the final seed, but the nonce does protect against repetition in * @dev requests which are included in a single block. * * @param _userSeed VRF seed input provided by user * @param _requester Address of the requesting contract * @param _nonce User-specific nonce at the time of the request */ function makeVRFInputSeed( bytes32 _keyHash, uint256 _userSeed, address _requester, uint256 _nonce ) internal pure returns (uint256) { return uint256(keccak256(abi.encode(_keyHash, _userSeed, _requester, _nonce))); } /** * @notice Returns the id for this request * @param _keyHash The serviceAgreement ID to be used for this request * @param _vRFInputSeed The seed to be passed directly to the VRF * @return The id for this request * * @dev Note that _vRFInputSeed is not the seed passed by the consuming * @dev contract, but the one generated by makeVRFInputSeed */ function makeRequestId(bytes32 _keyHash, uint256 _vRFInputSeed) internal pure returns (bytes32) { return keccak256(abi.encodePacked(_keyHash, _vRFInputSeed)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV // Deprecated in v4.8 } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. /// @solidity memory-safe-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol"; /** * @title OperatorFilterer * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another * registrant's entries in the OperatorFilterRegistry. * @dev This smart contract is meant to be inherited by token contracts so they can use the following: * - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods. * - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods. */ abstract contract OperatorFilterer { error OperatorNotAllowed(address operator); IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY = IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E); constructor(address subscriptionOrRegistrantToCopy, bool subscribe) { // If an inheriting token contract is deployed to a network without the registry deployed, the modifier // will not revert, but the contract will need to be registered with the registry once it is deployed in // order for the modifier to filter addresses. if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { if (subscribe) { OPERATOR_FILTER_REGISTRY.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy); } else { if (subscriptionOrRegistrantToCopy != address(0)) { OPERATOR_FILTER_REGISTRY.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy); } else { OPERATOR_FILTER_REGISTRY.register(address(this)); } } } } modifier onlyAllowedOperator(address from) virtual { // Allow spending tokens from addresses with balance // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred // from an EOA. if (from != msg.sender) { _checkFilterOperator(msg.sender); } _; } modifier onlyAllowedOperatorApproval(address operator) virtual { _checkFilterOperator(operator); _; } function _checkFilterOperator(address operator) internal view virtual { // Check registry code length to facilitate testing in environments without a deployed registry. if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) { revert OperatorNotAllowed(operator); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; interface IOperatorFilterRegistry { function isOperatorAllowed(address registrant, address operator) external view returns (bool); function register(address registrant) external; function registerAndSubscribe(address registrant, address subscription) external; function registerAndCopyEntries(address registrant, address registrantToCopy) external; function unregister(address addr) external; function updateOperator(address registrant, address operator, bool filtered) external; function updateOperators(address registrant, address[] calldata operators, bool filtered) external; function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external; function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external; function subscribe(address registrant, address registrantToSubscribe) external; function unsubscribe(address registrant, bool copyExistingEntries) external; function subscriptionOf(address addr) external returns (address registrant); function subscribers(address registrant) external returns (address[] memory); function subscriberAt(address registrant, uint256 index) external returns (address); function copyEntriesOf(address registrant, address registrantToCopy) external; function isOperatorFiltered(address registrant, address operator) external returns (bool); function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool); function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool); function filteredOperators(address addr) external returns (address[] memory); function filteredCodeHashes(address addr) external returns (bytes32[] memory); function filteredOperatorAt(address registrant, uint256 index) external returns (address); function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32); function isRegistered(address addr) external returns (bool); function codeHashOf(address addr) external returns (bytes32); }
{ "optimizer": { "enabled": true, "runs": 100 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"_tokenName","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint256","name":"_maxSupply","type":"uint256"},{"internalType":"uint256","name":"_startPrice","type":"uint256"},{"internalType":"string","name":"_defaultURI","type":"string"},{"components":[{"internalType":"address","name":"coordinator","type":"address"},{"internalType":"address","name":"linkToken","type":"address"},{"internalType":"bytes32","name":"keyHash","type":"bytes32"}],"internalType":"struct Dreamy.ChainLinkParams","name":"chainLinkParams","type":"tuple"},{"components":[{"internalType":"address[]","name":"payees","type":"address[]"},{"internalType":"uint256[]","name":"shares","type":"uint256[]"}],"internalType":"struct Dreamy.RevenueShareParams","name":"revenueShare","type":"tuple"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"addresses","type":"address[]"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Airdrop","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"flag","type":"bool"}],"name":"AssignDutchAuction","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"cap","type":"uint256"}],"name":"AssignDutchAuctionCap","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"beginBlock","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endBlock","type":"uint256"}],"name":"AssignDutchAuctionConfig","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_address","type":"address"}],"name":"AssignGovernorAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_address","type":"address"}],"name":"AssignOgSigningKey","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_address","type":"address"}],"name":"AssignOperatorAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"size","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_lowerBoundPrice","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_priceFactor","type":"uint256"}],"name":"AssignPriceDecayParameter","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"cap","type":"uint256"}],"name":"AssignPrivateSaleCap","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"beginBlock","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endBlock","type":"uint256"}],"name":"AssignPrivateSaleConfig","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"AssignPrivateSalePrice","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"cap","type":"uint256"}],"name":"AssignPrivateSapeCap","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"beginBlock","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endBlock","type":"uint256"}],"name":"AssignPublicSaleConfig","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"AssignPublicSalePrice","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"limit","type":"uint256"}],"name":"AssignReserveLimit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_dutchAuction","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_freeMarket","type":"uint256"}],"name":"AssignTransactionLimit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_address","type":"address"}],"name":"AssignWhitelistSigningKey","type":"event"},{"anonymous":false,"inputs":[],"name":"EnableFairDutchAuction","type":"event"},{"anonymous":false,"inputs":[],"name":"EnablePrivateSale","type":"event"},{"anonymous":false,"inputs":[],"name":"EnablePublicSale","type":"event"},{"anonymous":false,"inputs":[],"name":"ForceCloseSale","type":"event"},{"anonymous":false,"inputs":[],"name":"ForcePauseSale","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"OverrideFinalDAPrice","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":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"uint256","name":"index","type":"uint256"}],"name":"Purchased","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"requestId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"randomNumber","type":"uint256"}],"name":"RandomseedFulfilmentFail","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"requestId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"seed","type":"uint256"}],"name":"RandomseedFulfilmentSuccess","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"RandomseedRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Release","type":"event"},{"anonymous":false,"inputs":[],"name":"ResetOverridedSaleState","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"uri","type":"string"}],"name":"SetDefaultURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"SetRevealBlock","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"_baseURI","type":"string"}],"name":"SetRevealedBaseURI","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":"uint256","name":"balance","type":"uint256"}],"name":"WithdrawNonPurchaseFund","type":"event"},{"inputs":[],"name":"MINTER_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_FILTER_REGISTRY","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"airdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"availableReserve","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"defaultURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"domainSeparator","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dutchAuction","outputs":[{"internalType":"uint256","name":"beginBlock","type":"uint256"},{"internalType":"uint256","name":"endBlock","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dutchAuctionCapped","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dutchAuctionConfig","outputs":[{"internalType":"uint256","name":"discountBlockSize","type":"uint256"},{"internalType":"uint256","name":"lowerBoundPrice","type":"uint256"},{"internalType":"uint256","name":"priceFactor","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"dutchAuctionInfo","outputs":[{"components":[{"internalType":"uint128","name":"price","type":"uint128"},{"internalType":"uint8","name":"amount","type":"uint8"}],"internalType":"struct Dreamy.MintInfo[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"enableDutchAuction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"enablePrivateSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"enablePublicSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"fairDAInfo","outputs":[{"internalType":"uint128","name":"price","type":"uint128"},{"internalType":"uint8","name":"amount","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"finalDAPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getEndSaleBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMaxSupplyByMode","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMintedByMode","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPriceByMode","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"totalSupply","type":"uint256"},{"internalType":"uint256","name":"maxSupply","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"startIndex","type":"uint256"}],"name":"getShuffledId","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getStartSaleBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getState","outputs":[{"internalType":"enum BlockbasedSale.SaleState","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getStateName","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTransactionCappedByMode","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"governorAddress","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":[],"name":"isDASoldOut","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"isOG","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPrivateSaleSoldOut","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isRevealed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isSoldOut","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"isWhiteListed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"keyHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxReserve","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"mintOg","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"mintToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ogKey","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operatorAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"overridedSaleState","outputs":[{"internalType":"enum BlockbasedSale.OverrideSaleState","name":"","type":"uint8"}],"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":"privateSale","outputs":[{"internalType":"uint256","name":"beginBlock","type":"uint256"},{"internalType":"uint256","name":"endBlock","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"privateSaleCapped","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"privateSalePriceCapped","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicSale","outputs":[{"internalType":"uint256","name":"beginBlock","type":"uint256"},{"internalType":"uint256","name":"endBlock","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicSaleBeginPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"randomseedRequested","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"requestId","type":"bytes32"},{"internalType":"uint256","name":"randomness","type":"uint256"}],"name":"rawFulfillRandomness","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"requestChainlinkVRF","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"resetOverridedSaleState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revealBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"revealedBaseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"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":[],"name":"saleConfig","outputs":[{"internalType":"uint256","name":"maxDAMintPerTx","type":"uint256"},{"internalType":"uint256","name":"maxFMMintPerTx","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"salePhase","outputs":[{"internalType":"enum BlockbasedSale.SalePhase","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"saleStats","outputs":[{"internalType":"uint256","name":"totalReserveMinted","type":"uint256"},{"internalType":"uint256","name":"totalDAMinted","type":"uint256"},{"internalType":"uint256","name":"totalOGMinted","type":"uint256"},{"internalType":"uint256","name":"totalWLMinted","type":"uint256"},{"internalType":"uint256","name":"totalFMMinted","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"seed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setCloseSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_defaultURI","type":"string"}],"name":"setDefaultURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"beginBlock","type":"uint256"},{"internalType":"uint256","name":"endBlock","type":"uint256"}],"internalType":"struct BlockbasedSale.SalesBlock","name":"_dutchAuction","type":"tuple"}],"name":"setDutchAuctionBlocks","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"cap","type":"uint256"}],"name":"setDutchAuctionCap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"size","type":"uint256"},{"internalType":"uint256","name":"lowerBoundPrice","type":"uint256"},{"internalType":"uint256","name":"factor","type":"uint256"}],"name":"setDutchAuctionParam","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_governor","type":"address"}],"name":"setGovernorAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newSigningKey","type":"address"}],"name":"setOgSigningKey","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"}],"name":"setOperatorAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setOverrideFinalDAPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setPauseSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"beginBlock","type":"uint256"},{"internalType":"uint256","name":"endBlock","type":"uint256"}],"internalType":"struct BlockbasedSale.SalesBlock","name":"_privateSale","type":"tuple"}],"name":"setPrivateSaleBlocks","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"cap","type":"uint256"}],"name":"setPrivateSaleCap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"setPrivateSaleCapPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"beginBlock","type":"uint256"},{"internalType":"uint256","name":"endBlock","type":"uint256"}],"internalType":"struct BlockbasedSale.SalesBlock","name":"_publicSale","type":"tuple"}],"name":"setPublicSaleBlocks","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"setPublicSalePrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"reserve","type":"uint256"}],"name":"setReserve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"setRevealBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_baseURI","type":"string"}],"name":"setRevealedBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_seed","type":"uint256"}],"name":"setSeed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_dutchAuction","type":"uint256"},{"internalType":"uint256","name":"_freeMarket","type":"uint256"}],"name":"setTransactionLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newSigningKey","type":"address"}],"name":"setWhitelistSigningKey","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalPrivateSaleMinted","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":"whitelistKey","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60c0604052601a805461ffff191690556127106025556706f05b59d3b200006027819055602855602c80546001600160a01b0319908116909155602d805490911690553480156200004f57600080fd5b5060405162007ae538038062007ae58339810160408190526200007291620007cf565b8151602083015160408401516001600160a01b0380841660a0528216608052733cc6cdda760b79bafa08df41ecfa224f810dceb6926001928a92889291908d85620000bd33620003ad565b8151620000d2906002906020850190620003ff565b508051620000e8906003906020840190620003ff565b50506001600c5550835162000105906013906020870190620003ff565b50600f555050604080518082018252600981526815da1a5d195b1a5cdd60ba1b60208083019190915291517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f9350620001629285929101620008b1565b60408051808303601f190181528282528051602091820120838301835260018452603160f81b938201939093528151908101939093528201527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160408051601f198184030181529190528051602090910120602e55506daaeb6d7670e522a718067333cd4e3b15620003315780156200027f57604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b1580156200026057600080fd5b505af115801562000275573d6000803e3d6000fd5b5050505062000331565b6001600160a01b03821615620002d05760405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af29039060440162000245565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e48690602401600060405180830381600087803b1580156200031757600080fd5b505af11580156200032c573d6000803e3d6000fd5b505050505b50508051602082015160405162000348906200048e565b62000355929190620008e4565b604051809103906000f08015801562000372573d6000803e3d6000fd5b50603180546001600160a01b0319166001600160a01b0392909216919091179055505050602591909155602881905560295550620009a89050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8280546200040d906200096c565b90600052602060002090601f0160209004810192826200043157600085556200047c565b82601f106200044c57805160ff19168380011785556200047c565b828001600101855582156200047c579182015b828111156200047c5782518255916020019190600101906200045f565b506200048a9291506200049c565b5090565b6111b8806200692d83390190565b5b808211156200048a57600081556001016200049d565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715620004ee57620004ee620004b3565b60405290565b604051601f8201601f191681016001600160401b03811182821017156200051f576200051f620004b3565b604052919050565b60005b83811015620005445781810151838201526020016200052a565b8381111562000554576000848401525b50505050565b600082601f8301126200056c57600080fd5b81516001600160401b03811115620005885762000588620004b3565b6200059d601f8201601f1916602001620004f4565b818152846020838601011115620005b357600080fd5b620005c682602083016020870162000527565b949350505050565b80516001600160a01b0381168114620005e657600080fd5b919050565b600060608284031215620005fe57600080fd5b604051606081016001600160401b0381118282101715620006235762000623620004b3565b6040529050806200063483620005ce565b81526200064460208401620005ce565b6020820152604083015160408201525092915050565b60006001600160401b03821115620006765762000676620004b3565b5060051b60200190565b600082601f8301126200069257600080fd5b81516020620006ab620006a5836200065a565b620004f4565b82815260059290921b84018101918181019086841115620006cb57600080fd5b8286015b84811015620006e85780518352918301918301620006cf565b509695505050505050565b6000604082840312156200070657600080fd5b62000710620004c9565b82519091506001600160401b03808211156200072b57600080fd5b818401915084601f8301126200074057600080fd5b8151602062000753620006a5836200065a565b82815260059290921b840181019181810190888411156200077357600080fd5b948201945b838610156200079c576200078c86620005ce565b8252948201949082019062000778565b86525085810151935082841115620007b357600080fd5b620007c18785880162000680565b818601525050505092915050565b6000806000806000806000610120888a031215620007ec57600080fd5b87516001600160401b03808211156200080457600080fd5b620008128b838c016200055a565b985060208a01519150808211156200082957600080fd5b620008378b838c016200055a565b975060408a0151965060608a0151955060808a01519150808211156200085c57600080fd5b6200086a8b838c016200055a565b94506200087b8b60a08c01620005eb565b93506101008a01519150808211156200089357600080fd5b50620008a28a828b01620006f3565b91505092959891949750929550565b60008351620008c581846020880162000527565b835190830190620008db81836020880162000527565b01949350505050565b604080825283519082018190526000906020906060840190828701845b82811015620009285781516001600160a01b03168452928401929084019060010162000901565b5050508381038285015284518082528583019183019060005b818110156200095f5783518352928401929184019160010162000941565b5090979650505050505050565b600181811c908216806200098157607f821691505b602082108103620009a257634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a051615f51620009dc60003960008181612f6e01526144e201526000818161368501526144b30152615f516000f3fe6080604052600436106105395760003560e01c8063792bce70116102ad578063c67e8b6811610170578063da324a30116100d7578063e985e9c511610090578063e985e9c514610fd3578063efc4bc7c14610ff3578063f15c85b414611009578063f2fde38b14611029578063f3b3a9fa14611049578063f698da251461105f578063fa4d280c1461107557600080fd5b8063da324a3014610ef1578063dddb91ba14610f11578063df20ad8f14610f31578063dfe363ef14610f72578063e4f2487a14610f87578063e83d508b14610fb357600080fd5b8063d1fe033d11610129578063d1fe033d14610e51578063d2c1f20614610e66578063d5abeb0114610e7b578063d5b1ae5e14610e91578063da0a985214610ebe578063da1b9e0814610ed157600080fd5b8063c67e8b6814610dbd578063c87b56dd14610ddd578063c91621c214610dfd578063c9a8d9f714610e12578063ccc5d84714610e27578063d0b77ab414610e3c57600080fd5b80639b154a7111610214578063b78ef4cb116101cd578063b78ef4cb14610d17578063b88d4fde14610d2d578063ba1f879f14610d4d578063be008ccb14610d68578063c204642c14610d7d578063c32a50f914610d9d57600080fd5b80639b154a7114610c6a5780639da0d7d414610c7f578063a22cb46514610c9a578063a2fb7b5d14610cba578063aab4b09e14610ce1578063b6eb6d6914610cf757600080fd5b80638da5cb5b116102665780638da5cb5b14610bd75780639024fc9614610bec57806390aa0b0f14610c01578063933edbb814610c1c57806394985ddd14610c3557806395d89b4114610c5557600080fd5b8063792bce7014610b125780637a9e1d0314610b325780637bd07f8b14610b525780637d94792a14610b8c5780637ee7866114610ba25780638708431314610bb757600080fd5b806333bc1c5c1161040057806354214f69116103675780636c635d3f116103205780636c635d3f14610a535780636e83843a14610a7357806370a0823114610a93578063715018a614610ab357806373b19e8f14610ac8578063776451b014610add578063791a251914610af257600080fd5b806354214f69146109bd5780635626e404146109d25780635e9f9613146109f257806361728f3914610a075780636352211e14610a1d57806366bb81c714610a3d57600080fd5b806341f43434116103b957806341f43434146109065780634256dbe31461092857806342842e0e14610948578063447321801461096857806349aaa5d91461097d5780634f6ccce71461099d57600080fd5b806333bc1c5c146108615780633584602814610891578063398c0ec1146108a75780633a367a67146108bc5780633ccfd60b146108d15780633da65fc1146108e657600080fd5b806319165587116104a4578063276f1c411161045d578063276f1c41146107b65780632da5ea17146107d65780632ee723fb146107eb5780632f1d5a60146108015780632f745c591461082157806330878ba91461084157600080fd5b806319165587146107015780631bae492e146107215780631cbe14c91461074157806320510b55146107615780632316b4da1461078157806323b872dd1461079657600080fd5b80630f30cde0116104f65780630f30cde0146106285780631197705e1461063b578063127effb21461065b578063166ca2bc1461067b57806318160ddd146106ca5780631865c57d146106df57600080fd5b806301ffc9a71461053e57806302410f4714610573578063031ab9f51461059457806306fdde03146105b7578063081812fc146105d9578063095ea7b314610606575b600080fd5b34801561054a57600080fd5b5061055e61055936600461537f565b6110a9565b60405190151581526020015b60405180910390f35b34801561057f57600080fd5b50600e5461055e90600160a01b900460ff1681565b3480156105a057600080fd5b506105a96110ba565b60405190815260200161056a565b3480156105c357600080fd5b506105cc611140565b60405161056a91906153f4565b3480156105e557600080fd5b506105f96105f4366004615407565b6111d2565b60405161056a9190615420565b34801561061257600080fd5b50610626610621366004615449565b6111f9565b005b61055e6106363660046154b6565b611212565b34801561064757600080fd5b50610626610656366004615501565b61172c565b34801561066757600080fd5b50600d546105f9906001600160a01b031681565b34801561068757600080fd5b50601e54601f546020546021546022546106a2949392919085565b604080519586526020860194909452928401919091526060830152608082015260a00161056a565b3480156106d657600080fd5b50600a546105a9565b3480156106eb57600080fd5b506106f46117a4565b60405161056a9190615534565b34801561070d57600080fd5b5061062661071c366004615501565b611a08565b34801561072d57600080fd5b50602c546105f9906001600160a01b031681565b34801561074d57600080fd5b5061062661075c36600461554e565b611be9565b34801561076d57600080fd5b5061062661077c366004615501565b611c5b565b34801561078d57600080fd5b50610626611ccf565b3480156107a257600080fd5b506106266107b1366004615570565b611d33565b3480156107c257600080fd5b50600e546105f9906001600160a01b031681565b3480156107e257600080fd5b5061055e611d5e565b3480156107f757600080fd5b506105a9602b5481565b34801561080d57600080fd5b5061062661081c366004615501565b611dab565b34801561082d57600080fd5b506105a961083c366004615449565b611e23565b34801561084d57600080fd5b506105cc61085c3660046155b1565b611eb9565b34801561086d57600080fd5b5060185460195461087c919082565b6040805192835260208301919091520161056a565b34801561089d57600080fd5b506105a960295481565b3480156108b357600080fd5b506105a96120e3565b3480156108c857600080fd5b506105cc6121be565b3480156108dd57600080fd5b5061062661224c565b3480156108f257600080fd5b5061055e6109013660046155e3565b6122d6565b34801561091257600080fd5b506105f96daaeb6d7670e522a718067333cd4e81565b34801561093457600080fd5b50610626610943366004615407565b61234e565b34801561095457600080fd5b50610626610963366004615570565b6123ad565b34801561097457600080fd5b506106266123d2565b34801561098957600080fd5b50610626610998366004615407565b612431565b3480156109a957600080fd5b506105a96109b8366004615407565b612490565b3480156109c957600080fd5b5061055e612523565b3480156109de57600080fd5b506106266109ed366004615407565b61254a565b3480156109fe57600080fd5b506105a96125a9565b348015610a1357600080fd5b506105a9600f5481565b348015610a2957600080fd5b506105f9610a38366004615407565b6125bb565b348015610a4957600080fd5b506105a960105481565b348015610a5f57600080fd5b50610626610a6e366004615407565b6125f0565b348015610a7f57600080fd5b50610626610a8e3660046156c1565b61264f565b348015610a9f57600080fd5b506105a9610aae366004615501565b6126bc565b348015610abf57600080fd5b50610626612742565b348015610ad457600080fd5b506105a9612756565b348015610ae957600080fd5b506105a9612803565b348015610afe57600080fd5b50610626610b0d366004615407565b61287b565b348015610b1e57600080fd5b50610626610b2d366004615709565b6128da565b348015610b3e57600080fd5b5061055e610b4d3660046155e3565b612959565b348015610b5e57600080fd5b50601b54601c54601d54610b7192919083565b6040805193845260208401929092529082015260600161056a565b348015610b9857600080fd5b506105a960115481565b348015610bae57600080fd5b506105cc6129c0565b348015610bc357600080fd5b50610626610bd2366004615735565b612ed3565b348015610be357600080fd5b506105f9612f42565b348015610bf857600080fd5b506105a9612f51565b348015610c0d57600080fd5b5060235460245461087c919082565b348015610c2857600080fd5b50601f54602b541461055e565b348015610c4157600080fd5b50610626610c5036600461554e565b612f63565b348015610c6157600080fd5b506105cc612fe9565b348015610c7657600080fd5b506105cc612ff8565b348015610c8b57600080fd5b5060145460155461087c919082565b348015610ca657600080fd5b50610626610cb5366004615791565b613005565b348015610cc657600080fd5b50601a54610cd49060ff1681565b60405161056a91906157ca565b348015610ced57600080fd5b506105a960275481565b348015610d0357600080fd5b50610626610d12366004615501565b613019565b348015610d2357600080fd5b506105a960285481565b348015610d3957600080fd5b50610626610d483660046157de565b61308d565b348015610d5957600080fd5b5060165460175461087c919082565b348015610d7457600080fd5b506106266130ba565b348015610d8957600080fd5b50610626610d9836600461585d565b61311c565b348015610da957600080fd5b50610626610db8366004615407565b6132ad565b348015610dc957600080fd5b50610626610dd8366004615735565b613373565b348015610de957600080fd5b506105cc610df8366004615407565b6133e2565b348015610e0957600080fd5b506105a961350a565b348015610e1e57600080fd5b506105a9613560565b348015610e3357600080fd5b506106266135e0565b348015610e4857600080fd5b5061055e6137a1565b348015610e5d57600080fd5b506106266137b4565b348015610e7257600080fd5b50610626613818565b348015610e8757600080fd5b506105a960255481565b348015610e9d57600080fd5b50610eb1610eac366004615501565b61387c565b60405161056a9190615914565b61055e610ecc3660046154b6565b613908565b348015610edd57600080fd5b50610626610eec3660046156c1565b613b33565b348015610efd57600080fd5b50610626610f0c366004615407565b613be8565b348015610f1d57600080fd5b50610626610f2c366004615735565b613c47565b348015610f3d57600080fd5b50610f51610f4c366004615449565b613cb5565b604080516001600160801b03909316835260ff90911660208301520161056a565b348015610f7e57600080fd5b50610626613cf8565b348015610f9357600080fd5b50601a54610fa690610100900460ff1681565b60405161056a919061596f565b348015610fbf57600080fd5b50610626610fce366004615407565b613d5a565b348015610fdf57600080fd5b5061055e610fee366004615983565b613db9565b348015610fff57600080fd5b506105a9602a5481565b34801561101557600080fd5b50602d546105f9906001600160a01b031681565b34801561103557600080fd5b50610626611044366004615501565b613de7565b34801561105557600080fd5b506105a960265481565b34801561106b57600080fd5b506105a9602e5481565b34801561108157600080fd5b506105a97f68e83002b91b0fd96d4df3566b5122221117e3ec6c2468fda594f6491f89b1c981565b60006110b482613e60565b92915050565b60006001601a54610100900460ff1660038111156110da576110da61551e565b036110e6575060155490565b6002601a54610100900460ff1660038111156111045761110461551e565b03611110575060175490565b6003601a54610100900460ff16600381111561112e5761112e61551e565b0361113a575060195490565b50600090565b60606002805461114f906159b1565b80601f016020809104026020016040519081016040528092919081815260200182805461117b906159b1565b80156111c85780601f1061119d576101008083540402835291602001916111c8565b820191906000526020600020905b8154815290600101906020018083116111ab57829003601f168201915b5050505050905090565b60006111dd82613e85565b506000908152600660205260409020546001600160a01b031690565b8161120381613eaa565b61120d8383613f5a565b505050565b600061121c61406a565b60006112266117a4565b90503332146112505760405162461bcd60e51b8152600401611247906159eb565b60405180910390fd5b60088160118111156112645761126461551e565b14806112815750600d81601181111561127f5761127f61551e565b145b8061129d5750600381601181111561129b5761129b61551e565b145b6112b95760405162461bcd60e51b815260040161124790615a1d565b6112cb6112c46120e3565b86906140c3565b3410156112ea5760405162461bcd60e51b815260040161124790615a4a565b60038160118111156112fe576112fe61551e565b0361137c576023548511156113255760405162461bcd60e51b815260040161124790615a77565b602b54601f5461133590876140cf565b111561137c5760405162461bcd60e51b8152602060048201526016602482015275283ab931b430b9b29032bc31b2b2b2103634b6b4ba1760511b6044820152606401611247565b600d8160118111156113905761139061551e565b03611426576024548511156113b75760405162461bcd60e51b815260040161124790615a77565b6025546113d86113c56125a9565b6113d2886113d2600a5490565b906140cf565b11156114265760405162461bcd60e51b815260206004820152601b60248201527f507572636861736520657863656564206d617820737570706c792e00000000006044820152606401611247565b600881601181111561143a5761143a61551e565b036115a25761144984846122d6565b6114885760405162461bcd60e51b815260206004820152601060248201526f2737ba103bb434ba32b634b9ba32b21760811b6044820152606401611247565b60028511156114d95760405162461bcd60e51b815260206004820152601e60248201527f4d696e7420657863656564207472616e73616374696f6e206c696d69747300006044820152606401611247565b336000908152602f60205260409020546002906114f7908790615ac4565b11156115455760405162461bcd60e51b815260206004820152601f60248201527f4d696e74206c696d6974207065722077616c6c65742065786365656465642e006044820152606401611247565b602a54611554866113d2612f51565b11156115a25760405162461bcd60e51b815260206004820152601c60248201527f5075726368617365206578636565642073616c65206361707065642e000000006044820152606401611247565b6115ac33866140db565b5060038160118111156115c1576115c161551e565b0361165d57601f546115d390866140cf565b601f5560006115e23487614166565b33600090815260326020908152604080832081518083019092526001600160801b03808616835260ff808d1684860190815283546001810185559387529490952092519290910180549351909416600160801b026001600160881b031990931691161717905560295490915081101561165b5760298190555b505b600d8160118111156116715761167161551e565b036116875760225461168390866140cf565b6022555b600881601181111561169b5761169b61551e565b036116dc57336000908152602f60205260409020546116bb908690615ac4565b336000908152602f60205260409020556021546116d890866140cf565b6021555b6031546040516001600160a01b03909116903480156108fc02916000818181858888f19350505050158015611715573d6000803e3d6000fd5b5060019150506117256001600c55565b9392505050565b611734614172565b6001600160a01b03811661175a5760405162461bcd60e51b815260040161124790615adc565b600e80546001600160a01b0319166001600160a01b0383169081179091556040517f5b92f2f101ec36b062768cd1330146da74961809b300919c88c6853ca703261590600090a250565b60006002601a5460ff1660028111156117bf576117bf61551e565b036117ca5750601190565b6001601a5460ff1660028111156117e3576117e361551e565b036117ee5750601090565b6000601a54610100900460ff16600381111561180c5761180c61551e565b036118175750600090565b6003601a54610100900460ff1660038111156118355761183561551e565b036118ce57611842611d5e565b1561184d5750600f90565b6019541580159061185f575060195443115b1561186a5750600e90565b6018541580159061187d57506018544310155b156118885750600d90565b6018541580159061189a575060185443105b80156118a7575060175443115b156118b25750600c90565b6018541580156118c3575060175443115b156118ce5750600b90565b6002601a54610100900460ff1660038111156118ec576118ec61551e565b0361196c576118f96137a1565b156119045750600a90565b60175415801590611916575060175443115b156119215750600990565b6016541580159061193457506016544310155b1561193f5750600890565b60165415801590611951575060165443105b1561195c5750600790565b60165460000361196c5750600690565b6001601a54610100900460ff16600381111561198a5761198a61551e565b0361113a57601f54602b54036119a05750600590565b601554158015906119b2575060155443115b156119bd5750600490565b601454158015906119d057506014544310155b156119db5750600390565b601454158015906119ed575060145443105b156119f85750600290565b60145460000361113a5750600190565b60315460405163673e156160e11b81526000916001600160a01b03169063ce7c2ac290611a39903390600401615420565b602060405180830381865afa158015611a56573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a7a9190615b07565b1180611a95575033611a8a612f42565b6001600160a01b0316145b611ad95760405162461bcd60e51b81526020600482015260156024820152743737ba1039b430b932b437b63232b917b7bbb732b960591b6044820152606401611247565b336001600160a01b0382161480611b085750611af3612f42565b6001600160a01b0316336001600160a01b0316145b611b4d5760405162461bcd60e51b81526020600482015260166024820152752932b632b0b9b29d103737903832b936b4b9b9b4b7b760511b6044820152606401611247565b603154604051631916558760e01b81526001600160a01b0390911690631916558790611b7d908490600401615420565b600060405180830381600087803b158015611b9757600080fd5b505af1158015611bab573d6000803e3d6000fd5b505050507f7955210193a82a2c13259e4b48f1e8b90a4170115a1021fdae0570d045bba20581604051611bde9190615420565b60405180910390a150565b600d546001600160a01b03163314611c135760405162461bcd60e51b815260040161124790615b20565b6023829055602481905560408051838152602081018390527f97720c97a8962cb9a18ee69ad344acb999cca0250317bc9b023bb6badad22e1391015b60405180910390a15050565b600d546001600160a01b03163314611c855760405162461bcd60e51b815260040161124790615b20565b602c80546001600160a01b0319166001600160a01b0383169081179091556040517fb01190fe4bf51f48a33625333c07da1825c9f14d04cff4433b6e056c9dc2033a90600090a250565b600d546001600160a01b03163314611cf95760405162461bcd60e51b815260040161124790615b20565b601a805461ff0019166103001790556040517fca29b392f61fad3260f009b6fc1de9d8efda05563601b6c91396b795eeefff2e90600090a1565b826001600160a01b0381163314611d4d57611d4d33613eaa565b611d588484846141d1565b50505050565b600080602654602554611d719190615b50565b602154602054602254601f54939450600093611d8d9190615ac4565b611d979190615ac4565b611da19190615ac4565b9190911492915050565b611db3614172565b6001600160a01b038116611dd95760405162461bcd60e51b815260040161124790615adc565b600d80546001600160a01b0319166001600160a01b0383169081179091556040517fa508d3b137dbcdf7e06f84833fe4aca137451e1e3309f454a207d8fb85c2ccd890600090a250565b6000611e2e836126bc565b8210611e905760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401611247565b506001600160a01b03919091166000908152600860209081526040808320938352929052205490565b6060611ec3612f42565b6001600160a01b0316336001600160a01b031614611f1e5784831115611f1e5760405162461bcd60e51b815260206004820152601060248201526f546f6b656e206e6f742065786973747360801b6044820152606401611247565b611f26612523565b611f4e5750604080518082019091526007815266191959985d5b1d60ca1b60208201526120db565b6000611f5b856001615ac4565b6001600160401b03811115611f7257611f72615624565b604051908082528060200260200182016040528015611f9b578160200160208202803683370190505b50905060015b858111611fd85780828281518110611fbb57611fbb615b67565b6020908102919091010152611fd1600182615ac4565b9050611fa1565b50825b8581116120b45760008660115483604051602001612003929190918252602082015260400190565b6040516020818303038152906040528051906020012060001c6120269190615b93565b612031906001615ac4565b905082818151811061204557612045615b67565b602002602001015183838151811061205f5761205f615b67565b602002602001015184848151811061207957612079615b67565b6020026020010185848151811061209257612092615b67565b602090810291909101019190915252506120ad600182615ac4565b9050611fdb565b506120d78185815181106120ca576120ca615b67565b6020026020010151614202565b9150505b949350505050565b6000806120ee6117a4565b905060038160118111156121045761210461551e565b03612174576014546000906121199043615b50565b601d54601b5491925060009161213b9190612135908590614166565b906140c3565b601c5460285491925061214e9190614294565b811061215f575050601c5492915050565b60285461216c9082614294565b935050505090565b60088160118111156121885761218861551e565b0361219557505060275490565b600d8160118111156121a9576121a961551e565b036121b657505060285490565b505060285490565b601380546121cb906159b1565b80601f01602080910402602001604051908101604052809291908181526020018280546121f7906159b1565b80156122445780601f1061221957610100808354040283529160200191612244565b820191906000526020600020905b81548152906001019060200180831161222757829003601f168201915b505050505081565b600d546001600160a01b031633146122765760405162461bcd60e51b815260040161124790615b20565b6040514790339082156108fc029083906000818181858888f193505050501580156122a5573d6000803e3d6000fd5b506040518181527f807631352cb3389b100202fae783b0b18fedc90bd3a438433796cb89462f4fad90602001611bde565b602c546000906001600160a01b03166123275760405162461bcd60e51b815260206004820152601360248201527215d3081ad95e481b9bdd08185cdcda59db9959606a1b6044820152606401611247565b602c546001600160a01b031661233d84846142a0565b6001600160a01b0316149392505050565b600d546001600160a01b031633146123785760405162461bcd60e51b815260040161124790615b20565b60268190556040518181527fe1fb8f58d0fe8f41debc65095588c6530f5b3c96964aee78a164712c7ab7cb3f90602001611bde565b826001600160a01b03811633146123c7576123c733613eaa565b611d58848484614374565b600d546001600160a01b031633146123fc5760405162461bcd60e51b815260040161124790615b20565b601a805460ff191690556040517f4f0f641a7e3d2c654d00279745eb7cf977b86891e3c7dd11cf315972d02089ce90600090a1565b600d546001600160a01b0316331461245b5760405162461bcd60e51b815260040161124790615b20565b60278190556040518181527f8ea69d9e909b68c4f14f78ed645aa5bb6e5aaa632c8e2f365618f51f6e10373290602001611bde565b600061249b600a5490565b82106124fe5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401611247565b600a828154811061251157612511615b67565b90600052602060002001549050919050565b60008060115411801561253857506000601054115b8015612545575060105443115b905090565b600d546001600160a01b031633146125745760405162461bcd60e51b815260040161124790615b20565b602a8190556040518181527fee53f3111b00616aa0a325f68aaf488d4433b7f00ea57bdfe5346fb08899c1aa90602001611bde565b601e5460265460009161254591615b50565b6000818152600460205260408120546001600160a01b0316806110b45760405162461bcd60e51b815260040161124790615ba7565b600d546001600160a01b0316331461261a5760405162461bcd60e51b815260040161124790615b20565b60298190556040518181527f98302d1de36f493ad21f68a7d43aada3c922bcde2576a9db30b75187321cabfc90602001611bde565b600d546001600160a01b031633146126795760405162461bcd60e51b815260040161124790615b20565b805161268c9060129060208401906152d0565b507fda0697149924c38db1462c9de1c03a46ce996f35d278fcf8dc4a76eb1065dc2e81604051611bde91906153f4565b60006001600160a01b0382166127265760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401611247565b506001600160a01b031660009081526005602052604090205490565b61274a614172565b612754600061438f565b565b6000806127616117a4565b905060038160118111156127775761277761551e565b03612784575050602b5490565b60088160118111156127985761279861551e565b036127a5575050602a5490565b600d8160118111156127b9576127b961551e565b036127fb57601f546026546021546020546025546127d79190615b50565b6127e19190615b50565b6127eb9190615b50565b6127f59190615b50565b91505090565b600091505090565b60008061280e6117a4565b905060088160118111156128245761282461551e565b03612839576021546020546127f59190615ac4565b600d81601181111561284d5761284d61551e565b0361285a57505060225490565b600381601181111561286e5761286e61551e565b036127fb575050601f5490565b600d546001600160a01b031633146128a55760405162461bcd60e51b815260040161124790615b20565b60288190556040518181527ff959ca468c08c9457955f238a0ad6a31fc63f09b1e9bbafb4e409f19163bbe1490602001611bde565b600d546001600160a01b031633146129045760405162461bcd60e51b815260040161124790615b20565b601b839055601c829055601d81905560408051848152602081018490529081018290527f25712bfd18ae9c5dd63c26ade669b68a324cfbe3e863cdc207d2a06e9727d3929060600160405180910390a1505050565b602d546000906001600160a01b03166129aa5760405162461bcd60e51b815260206004820152601360248201527213d1c81ad95e481b9bdd08185cdcda59db9959606a1b6044820152606401611247565b602d546001600160a01b031661233d84846142a0565b606060006129cc6117a4565b905060018160118111156129e2576129e261551e565b03612a2057505060408051808201909152601e81527f447574636841756374696f6e4265666f7265576974686f7574426c6f636b0000602082015290565b6002816011811115612a3457612a3461551e565b03612a7257505060408051808201909152601b81527f447574636841756374696f6e4265666f726557697468426c6f636b0000000000602082015290565b6003816011811115612a8657612a8661551e565b03612ab9575050604080518082019091526012815271447574636841756374696f6e447572696e6760701b602082015290565b6004816011811115612acd57612acd61551e565b03612afd57505060408051808201909152600f81526e111d5d18da105d58dd1a5bdb915b99608a1b602082015290565b6005816011811115612b1157612b1161551e565b03612b48575050604080518082019091526016815275111d5d18da105d58dd1a5bdb915b9914dbdb1913dd5d60521b602082015290565b6006816011811115612b5c57612b5c61551e565b03612b9a57505060408051808201909152601d81527f5072697661746553616c654265666f7265576974686f7574426c6f636b000000602082015290565b6007816011811115612bae57612bae61551e565b03612bec57505060408051808201909152601a81527f5072697661746553616c654265666f726557697468426c6f636b000000000000602082015290565b6008816011811115612c0057612c0061551e565b03612c325750506040805180820190915260118152705072697661746553616c65447572696e6760781b602082015290565b6009816011811115612c4657612c4661551e565b03612c7557505060408051808201909152600e81526d141c9a5d985d1954d85b19515b9960921b602082015290565b600a816011811115612c8957612c8961551e565b03612cbf575050604080518082019091526015815274141c9a5d985d1954d85b19515b9914dbdb1913dd5d605a1b602082015290565b600b816011811115612cd357612cd361551e565b03612d1157505060408051808201909152601c81527f5075626c696353616c654265666f7265576974686f7574426c6f636b00000000602082015290565b600c816011811115612d2557612d2561551e565b03612d5f5750506040805180820190915260198152785075626c696353616c654265666f726557697468426c6f636b60381b602082015290565b600d816011811115612d7357612d7361551e565b03612da457505060408051808201909152601081526f5075626c696353616c65447572696e6760801b602082015290565b600e816011811115612db857612db861551e565b03612de657505060408051808201909152600d81526c141d589b1a58d4d85b19515b99609a1b602082015290565b600f816011811115612dfa57612dfa61551e565b03612e2f575050604080518082019091526014815273141d589b1a58d4d85b19515b9914dbdb1913dd5d60621b602082015290565b6010816011811115612e4357612e4361551e565b03612e6d575050604080518082019091526009815268506175736553616c6560b81b602082015290565b6011816011811115612e8157612e8161551e565b03612ead57505060408051808201909152600b81526a105b1b14d85b195cd15b9960aa1b602082015290565b505060408051808201909152600a815269139bdd14dd185c9d195960b21b602082015290565b600d546001600160a01b03163314612efd5760405162461bcd60e51b815260040161124790615b20565b80516014819055602080830151601581905560408051938452918301527f46b9f9d83ded22a38ee2e31b09c026a8c683dd2e9060de026c383b15a655f4fd9101611bde565b6001546001600160a01b031690565b60205460215460009161254591615ac4565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614612fdb5760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c006044820152606401611247565b612fe582826143e1565b5050565b60606003805461114f906159b1565b601280546121cb906159b1565b8161300f81613eaa565b61120d8383614472565b600d546001600160a01b031633146130435760405162461bcd60e51b815260040161124790615b20565b602d80546001600160a01b0319166001600160a01b0383169081179091556040517f14ac04b188e9f32c0e4b3ae39771c1c288169ca48b8bddc22be8bec64d12ba0a90600090a250565b836001600160a01b03811633146130a7576130a733613eaa565b6130b38585858561447d565b5050505050565b600d546001600160a01b031633146130e45760405162461bcd60e51b815260040161124790615b20565b601a805460ff191660021790556040517f58abff1119ad7689f2843996246b31faf77e0a40545d5085ee99361a768a3f7d90600090a1565b61312461406a565b600d546001600160a01b0316331461314e5760405162461bcd60e51b815260040161124790615b20565b60255482516131699061316190846140c3565b600a546113d2565b11156131b25760405162461bcd60e51b815260206004820152601860248201527722bc31b2b2b21036b0bc1039bab838363c903634b6b4ba1760411b6044820152606401611247565b60265482516131ce906131c590846140c3565b601e54906140cf565b11156132145760405162461bcd60e51b815260206004820152601560248201527424b739bab33334b1b4b2b73a103932b9b2b93b329760591b6044820152606401611247565b8151613224906131c590836140c3565b601e5560005b82518110156132695761325683828151811061324857613248615b67565b6020026020010151836140db565b508061326181615bd9565b91505061322a565b507f08b3e41950189550b73643a90143efc8a526a17dc07e6abe0fb50ce7c10b50fc828260405161329b929190615bf2565b60405180910390a1612fe56001600c55565b600d546001600160a01b031633146132d75760405162461bcd60e51b815260040161124790615b20565b6011541561331d5760405162461bcd60e51b815260206004820152601360248201527229b2b2b210373ab6b132b91032bc34b9ba399760691b6044820152606401611247565b6011819055600e805460ff60a01b1916600160a01b17905560408051428152600060208201529081018290527f59e4c9bb1559d5420398abdcb1a7eb97cc4a7e27b2ae810b8d7f44fbc2327ffa90606001611bde565b600d546001600160a01b0316331461339d5760405162461bcd60e51b815260040161124790615b20565b80516018819055602080830151601981905560408051938452918301527f70441bfeec4000206c01cb310438ec41bb281f98d8ea4f08f086e3329ff4eb299101611bde565b60606133ed600a5490565b82111561342f5760405162461bcd60e51b815260206004820152601060248201526f2a37b5b2b7103737ba1032bc34b9ba1760811b6044820152606401611247565b613437612523565b6134cb5760138054613448906159b1565b80601f0160208091040260200160405190810160405280929190818152602001828054613474906159b1565b80156134c15780601f10613496576101008083540402835291602001916134c1565b820191906000526020600020905b8154815290600101906020018083116134a457829003601f168201915b50505050506110b4565b60126134e46134d9600a5490565b602554856001611eb9565b6040516020016134f5929190615c5f565b60405160208183030381529060405292915050565b600060036135166117a4565b60118111156135275761352761551e565b03613533575060235490565b600d61353d6117a4565b601181111561354e5761354e61551e565b0361355a575060245490565b50600290565b60006001601a54610100900460ff1660038111156135805761358061551e565b0361358c575060145490565b6002601a54610100900460ff1660038111156135aa576135aa61551e565b036135b6575060165490565b6003601a54610100900460ff1660038111156135d4576135d461551e565b0361113a575060185490565b600d546001600160a01b0316331461360a5760405162461bcd60e51b815260040161124790615b20565b600e54600160a01b900460ff16156136645760405162461bcd60e51b815260206004820152601f60248201527f436861696e6c696e6b2056524620616c726561647920726571756573746564006044820152606401611247565b6040516370a0823160e01b8152671bc16d674ec80000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a08231906136ba903090600401615420565b602060405180830381865afa1580156136d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136fb9190615b07565b101561373d5760405162461bcd60e51b8152602060048201526011602482015270496e73756666696369656e74204c494e4b60781b6044820152606401611247565b613751600f54671bc16d674ec800006144af565b50600e805460ff60a01b1916600160a01b1790556040517f8bcef1354992d6b49befbd8ce23b2578ce493191f74c32b543d2f177962a139f906137979042815260200190565b60405180910390a1565b6000602a546137ae612f51565b14905090565b600d546001600160a01b031633146137de5760405162461bcd60e51b815260040161124790615b20565b601a805461ff0019166101001790556040517f82e232fa1250b177b43a967e555410ac1c850806b01cac8363fe6e94e7edfd0190600090a1565b600d546001600160a01b031633146138425760405162461bcd60e51b815260040161124790615b20565b601a805461ff0019166102001790556040517f0913c47876f976a46ce9674a2e5a22679ebf61b03b7a333913652272a9262c7790600090a1565b6001600160a01b0381166000908152603260209081526040808320805482518185028101850190935280835260609492939192909184015b828210156138fd57600084815260209081902060408051808201909152908401546001600160801b0381168252600160801b900460ff16818301528252600190920191016138b4565b505050509050919050565b600061391261406a565b3332146139315760405162461bcd60e51b8152600401611247906159eb565b600861393b6117a4565b601181111561394c5761394c61551e565b146139695760405162461bcd60e51b815260040161124790615a1d565b6139738383612959565b6139b55760405162461bcd60e51b81526020600482015260136024820152722737ba1027a3903bb434ba32b634b9ba32b21760691b6044820152606401611247565b336000908152603060205260409020546002906139d39086906140cf565b1115613a175760405162461bcd60e51b815260206004820152601360248201527220b63932b0b23c9021b630b4b6b2b21027a39760691b6044820152606401611247565b602a54613a26856113d2612f51565b1115613a705760405162461bcd60e51b8152602060048201526019602482015278115e18d9595908141c9a5d985d194814d85b1948131a5b5a5d603a1b6044820152606401611247565b613a82613a7b6120e3565b85906140c3565b341015613aa15760405162461bcd60e51b815260040161124790615a4a565b33600090815260306020526040902054613abc908590615ac4565b3360009081526030602090815260409091209190915554613add90856140cf565b602055613aea33856140db565b506031546040516001600160a01b03909116903480156108fc02916000818181858888f19350505050158015613b24573d6000803e3d6000fd5b50600190506117256001600c55565b600d546001600160a01b03163314613b5d5760405162461bcd60e51b815260040161124790615b20565b613b65612523565b15613ba55760405162461bcd60e51b815260206004820152601060248201526f105b1c9958591e481c995d99585b195960821b6044820152606401611247565b8051613bb89060139060208401906152d0565b507fb0cb658f6a70918635661157bac90270b4184dff76f6b90dfebdad09e29ce5eb81604051611bde91906153f4565b600d546001600160a01b03163314613c125760405162461bcd60e51b815260040161124790615b20565b60108190556040518181527ffd1cd879b90803328042915a0dab567886d80637d84c7875df6a3e4495c379ac90602001611bde565b600d546001600160a01b03163314613c715760405162461bcd60e51b815260040161124790615b20565b80516016819055602080830151601781905560408051938452918301527ea742ba61fbc2be98048a2bafed46ef5f837610c64f7a83e332b100f6aab0759101611bde565b60326020528160005260406000208181548110613cd157600080fd5b6000918252602090912001546001600160801b0381169250600160801b900460ff16905082565b600d546001600160a01b03163314613d225760405162461bcd60e51b815260040161124790615b20565b601a805460ff191660011790556040517f6d4e2212f1a4fcfebfe8fd91368752c56e02d80a28c18c5cce3d812cfcbcb4a790600090a1565b600d546001600160a01b03163314613d845760405162461bcd60e51b815260040161124790615b20565b602b8190556040518181527febe3296c3cc674d6155214007876758ba86e54f6a760820db1bc6c3d2520523e90602001611bde565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b613def614172565b6001600160a01b038116613e545760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401611247565b613e5d8161438f565b50565b60006001600160e01b0319821663780e9d6360e01b14806110b457506110b482614626565b613e8e81614676565b613e5d5760405162461bcd60e51b815260040161124790615ba7565b6daaeb6d7670e522a718067333cd4e3b15613e5d57604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015613f17573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f3b9190615d19565b613e5d5780604051633b79c77360e21b81526004016112479190615420565b6000613f65826125bb565b9050806001600160a01b0316836001600160a01b031603613fd25760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401611247565b336001600160a01b0382161480613fee5750613fee8133613db9565b6140605760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401611247565b61120d8383614693565b6002600c54036140bc5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401611247565b6002600c55565b60006117258284615d36565b60006117258284615ac4565b6000805b8281101561415c5760006140f2600a5490565b9050602554811015614149576141128561410d836001615ac4565b614701565b60405181906001600160a01b038716907fa512fb2532ca8587f236380171326ebb69670e86a2ba0c4412a3fcca4c3ada9b90600090a35b508061415481615bd9565b9150506140df565b5060019392505050565b60006117258284615d55565b3361417b612f42565b6001600160a01b0316146127545760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611247565b6141db338261471b565b6141f75760405162461bcd60e51b815260040161124790615d69565b61120d838383614779565b6060600061420f836148ea565b60010190506000816001600160401b0381111561422e5761422e615624565b6040519080825280601f01601f191660200182016040528015614258576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461426257509392505050565b60006117258284615b50565b602e54604080517f68e83002b91b0fd96d4df3566b5122221117e3ec6c2468fda594f6491f89b1c96020820152339181019190915260009182916060016040516020818303038152906040528051906020012060405160200161431a92919061190160f01b81526002810192909252602282015260420190565b6040516020818303038152906040528051906020012090506120db84848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525085939250506149c29050565b61120d8383836040518060200160405280600081525061308d565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80156144345760115460000361443457601181905560408051428152602081018490529081018290527f59e4c9bb1559d5420398abdcb1a7eb97cc4a7e27b2ae810b8d7f44fbc2327ffa90606001611c4f565b60408051428152602081018490529081018290527f1c01baa2e4487f389547acd2b2396e5b8938b605d047d0559c4b855b5f82c81a90606001611c4f565b612fe53383836149e6565b614487338361471b565b6144a35760405162461bcd60e51b815260040161124790615d69565b611d5884848484614ab0565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634000aea07f00000000000000000000000000000000000000000000000000000000000000008486600060405160200161451f929190918252602082015260400190565b6040516020818303038152906040526040518463ffffffff1660e01b815260040161454c93929190615db6565b6020604051808303816000875af115801561456b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061458f9190615d19565b5060008381526020818152604080832054815180840188905280830185905230606082015260808082018390528351808303909101815260a0909101909252815191830191909120868452929091526145e9906001615ac4565b60008581526020818152604091829020929092558051808301879052808201849052815180820383018152606090910190915280519101206120db565b60006001600160e01b031982166380ac58cd60e01b148061465757506001600160e01b03198216635b5e139f60e01b145b806110b457506301ffc9a760e01b6001600160e01b03198316146110b4565b6000908152600460205260409020546001600160a01b0316151590565b600081815260066020526040902080546001600160a01b0319166001600160a01b03841690811790915581906146c8826125bb565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b612fe5828260405180602001604052806000815250614ae3565b600080614727836125bb565b9050806001600160a01b0316846001600160a01b0316148061474e575061474e8185613db9565b806120db5750836001600160a01b0316614767846111d2565b6001600160a01b031614949350505050565b826001600160a01b031661478c826125bb565b6001600160a01b0316146147b25760405162461bcd60e51b815260040161124790615ddd565b6001600160a01b0382166148145760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401611247565b6148218383836001614b16565b826001600160a01b0316614834826125bb565b6001600160a01b03161461485a5760405162461bcd60e51b815260040161124790615ddd565b600081815260066020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260058552838620805460001901905590871680865283862080546001019055868652600490945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106149295772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310614955576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061497357662386f26fc10000830492506010015b6305f5e100831061498b576305f5e100830492506008015b612710831061499f57612710830492506004015b606483106149b1576064830492506002015b600a83106110b45760010192915050565b60008060006149d18585614b22565b915091506149de81614b67565b509392505050565b816001600160a01b0316836001600160a01b031603614a435760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b6044820152606401611247565b6001600160a01b03838116600081815260076020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b614abb848484614779565b614ac784848484614cac565b611d585760405162461bcd60e51b815260040161124790615e22565b614aed8383614daa565b614afa6000848484614cac565b61120d5760405162461bcd60e51b815260040161124790615e22565b611d5884848484614ec5565b6000808251604103614b585760208301516040840151606085015160001a614b4c87828585614ffe565b94509450505050614b60565b506000905060025b9250929050565b6000816004811115614b7b57614b7b61551e565b03614b835750565b6001816004811115614b9757614b9761551e565b03614bdf5760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b6044820152606401611247565b6002816004811115614bf357614bf361551e565b03614c405760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401611247565b6003816004811115614c5457614c5461551e565b03613e5d5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401611247565b60006001600160a01b0384163b15614da257604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290614cf0903390899088908890600401615e74565b6020604051808303816000875af1925050508015614d2b575060408051601f3d908101601f19168201909252614d2891810190615eb1565b60015b614d88573d808015614d59576040519150601f19603f3d011682016040523d82523d6000602084013e614d5e565b606091505b508051600003614d805760405162461bcd60e51b815260040161124790615e22565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506120db565b5060016120db565b6001600160a01b038216614e005760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401611247565b614e0981614676565b15614e265760405162461bcd60e51b815260040161124790615ece565b614e34600083836001614b16565b614e3d81614676565b15614e5a5760405162461bcd60e51b815260040161124790615ece565b6001600160a01b038216600081815260056020908152604080832080546001019055848352600490915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b614ed1848484846150b8565b6001811115614f405760405162461bcd60e51b815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e7365637574697665207472604482015274185b9cd9995c9cc81b9bdd081cdd5c1c1bdc9d1959605a1b6064820152608401611247565b816001600160a01b038516614f9c57614f9781600a80546000838152600b60205260408120829055600182018355919091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80155565b614fbf565b836001600160a01b0316856001600160a01b031614614fbf57614fbf8582615140565b6001600160a01b038416614fdb57614fd6816151dd565b6130b3565b846001600160a01b0316846001600160a01b0316146130b3576130b3848261528c565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b0383111561502b57506000905060036150af565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561507f573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166150a8576000600192509250506150af565b9150600090505b94509492505050565b6001811115611d58576001600160a01b038416156150fe576001600160a01b038416600090815260056020526040812080548392906150f8908490615b50565b90915550505b6001600160a01b03831615611d58576001600160a01b03831660009081526005602052604081208054839290615135908490615ac4565b909155505050505050565b6000600161514d846126bc565b6151579190615b50565b6000838152600960205260409020549091508082146151aa576001600160a01b03841660009081526008602090815260408083208584528252808320548484528184208190558352600990915290208190555b5060009182526009602090815260408084208490556001600160a01b039094168352600881528383209183525290812055565b600a546000906151ef90600190615b50565b6000838152600b6020526040812054600a805493945090928490811061521757615217615b67565b9060005260206000200154905080600a838154811061523857615238615b67565b6000918252602080832090910192909255828152600b9091526040808220849055858252812055600a80548061527057615270615f05565b6001900381819060005260206000200160009055905550505050565b6000615297836126bc565b6001600160a01b039093166000908152600860209081526040808320868452825280832085905593825260099052919091209190915550565b8280546152dc906159b1565b90600052602060002090601f0160209004810192826152fe5760008555615344565b82601f1061531757805160ff1916838001178555615344565b82800160010185558215615344579182015b82811115615344578251825591602001919060010190615329565b50615350929150615354565b5090565b5b808211156153505760008155600101615355565b6001600160e01b031981168114613e5d57600080fd5b60006020828403121561539157600080fd5b813561172581615369565b60005b838110156153b757818101518382015260200161539f565b83811115611d585750506000910152565b600081518084526153e081602086016020860161539c565b601f01601f19169290920160200192915050565b60208152600061172560208301846153c8565b60006020828403121561541957600080fd5b5035919050565b6001600160a01b0391909116815260200190565b6001600160a01b0381168114613e5d57600080fd5b6000806040838503121561545c57600080fd5b823561546781615434565b946020939093013593505050565b60008083601f84011261548757600080fd5b5081356001600160401b0381111561549e57600080fd5b602083019150836020828501011115614b6057600080fd5b6000806000604084860312156154cb57600080fd5b8335925060208401356001600160401b038111156154e857600080fd5b6154f486828701615475565b9497909650939450505050565b60006020828403121561551357600080fd5b813561172581615434565b634e487b7160e01b600052602160045260246000fd5b60208101601283106155485761554861551e565b91905290565b6000806040838503121561556157600080fd5b50508035926020909101359150565b60008060006060848603121561558557600080fd5b833561559081615434565b925060208401356155a081615434565b929592945050506040919091013590565b600080600080608085870312156155c757600080fd5b5050823594602084013594506040840135936060013592509050565b600080602083850312156155f657600080fd5b82356001600160401b0381111561560c57600080fd5b61561885828601615475565b90969095509350505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561566257615662615624565b604052919050565b60006001600160401b0383111561568357615683615624565b615696601f8401601f191660200161563a565b90508281528383830111156156aa57600080fd5b828260208301376000602084830101529392505050565b6000602082840312156156d357600080fd5b81356001600160401b038111156156e957600080fd5b8201601f810184136156fa57600080fd5b6120db8482356020840161566a565b60008060006060848603121561571e57600080fd5b505081359360208301359350604090920135919050565b60006040828403121561574757600080fd5b604051604081018181106001600160401b038211171561576957615769615624565b604052823581526020928301359281019290925250919050565b8015158114613e5d57600080fd5b600080604083850312156157a457600080fd5b82356157af81615434565b915060208301356157bf81615783565b809150509250929050565b60208101600383106155485761554861551e565b600080600080608085870312156157f457600080fd5b84356157ff81615434565b9350602085013561580f81615434565b92506040850135915060608501356001600160401b0381111561583157600080fd5b8501601f8101871361584257600080fd5b6158518782356020840161566a565b91505092959194509250565b6000806040838503121561587057600080fd5b82356001600160401b038082111561588757600080fd5b818501915085601f83011261589b57600080fd5b81356020828211156158af576158af615624565b8160051b92506158c081840161563a565b82815292840181019281810190898511156158da57600080fd5b948201945b8486101561590457853593506158f484615434565b83825294820194908201906158df565b9997909101359750505050505050565b602080825282518282018190526000919060409081850190868401855b8281101561596257815180516001600160801b0316855286015160ff16868501529284019290850190600101615931565b5091979650505050505050565b60208101600483106155485761554861551e565b6000806040838503121561599657600080fd5b82356159a181615434565b915060208301356157bf81615434565b600181811c908216806159c557607f821691505b6020821081036159e557634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526018908201527721b7b73a3930b1ba1034b9903737ba1030b63637bbb2b21760411b604082015260600190565b60208082526013908201527229b0b632903737ba1030bb30b4b630b136329760691b604082015260600190565b60208082526013908201527224b739bab33334b1b4b2b73a10333ab732399760691b604082015260600190565b6020808252601f908201527f4d696e7420657863656564207472616e73616374696f6e206c696d6974732e00604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60008219821115615ad757615ad7615aae565b500190565b602080825260119082015270043616e6e6f742061737369676e2030783607c1b604082015260600190565b600060208284031215615b1957600080fd5b5051919050565b60208082526016908201527527b7363c9037b832b930ba37b91030b63637bbb2b21760511b604082015260600190565b600082821015615b6257615b62615aae565b500390565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601260045260246000fd5b600082615ba257615ba2615b7d565b500690565b602080825260189082015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b604082015260600190565b600060018201615beb57615beb615aae565b5060010190565b604080825283519082018190526000906020906060840190828701845b82811015615c345781516001600160a01b031684529284019290840190600101615c0f565b50505092019290925292915050565b60008151615c5581856020860161539c565b9290920192915050565b600080845481600182811c915080831680615c7b57607f831692505b60208084108203615c9a57634e487b7160e01b86526022600452602486fd5b818015615cae5760018114615cbf57615cec565b60ff19861689528489019650615cec565b60008b81526020902060005b86811015615ce45781548b820152908501908301615ccb565b505084890196505b505050505050615d10615cff8286615c43565b64173539b7b760d91b815260050190565b95945050505050565b600060208284031215615d2b57600080fd5b815161172581615783565b6000816000190483118215151615615d5057615d50615aae565b500290565b600082615d6457615d64615b7d565b500490565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b60018060a01b0384168152826020820152606060408201526000615d1060608301846153c8565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090615ea7908301846153c8565b9695505050505050565b600060208284031215615ec357600080fd5b815161172581615369565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220eb07c8ff0f84eed01688cbff3e8b9536494dba171130f994bb03d8803c97ae6464736f6c634300080e00336080604052604051620011b8380380620011b883398101604081905262000026916200042e565b8051825114620000985760405162461bcd60e51b815260206004820152603260248201527f5061796d656e7453706c69747465723a2070617965657320616e6420736861726044820152710cae640d8cadccee8d040dad2e6dac2e8c6d60731b60648201526084015b60405180910390fd5b6000825111620000eb5760405162461bcd60e51b815260206004820152601a60248201527f5061796d656e7453706c69747465723a206e6f2070617965657300000000000060448201526064016200008f565b60005b82518110156200015757620001428382815181106200011157620001116200050c565b60200260200101518383815181106200012e576200012e6200050c565b60200260200101516200016060201b60201c565b806200014e8162000538565b915050620000ee565b5050506200056f565b6001600160a01b038216620001cd5760405162461bcd60e51b815260206004820152602c60248201527f5061796d656e7453706c69747465723a206163636f756e74206973207468652060448201526b7a65726f206164647265737360a01b60648201526084016200008f565b600081116200021f5760405162461bcd60e51b815260206004820152601d60248201527f5061796d656e7453706c69747465723a2073686172657320617265203000000060448201526064016200008f565b6001600160a01b038216600090815260026020526040902054156200029b5760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e7420616c726561647960448201526a206861732073686172657360a81b60648201526084016200008f565b60048054600181019091557f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b0180546001600160a01b0319166001600160a01b0384169081179091556000908152600260205260408120829055546200030390829062000554565b600055604080516001600160a01b0384168152602081018390527f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac910160405180910390a15050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156200038d576200038d6200034c565b604052919050565b60006001600160401b03821115620003b157620003b16200034c565b5060051b60200190565b600082601f830112620003cd57600080fd5b81516020620003e6620003e08362000395565b62000362565b82815260059290921b840181019181810190868411156200040657600080fd5b8286015b848110156200042357805183529183019183016200040a565b509695505050505050565b600080604083850312156200044257600080fd5b82516001600160401b03808211156200045a57600080fd5b818501915085601f8301126200046f57600080fd5b8151602062000482620003e08362000395565b82815260059290921b84018101918181019089841115620004a257600080fd5b948201945b83861015620004d95785516001600160a01b0381168114620004c95760008081fd5b82529482019490820190620004a7565b91880151919650909350505080821115620004f357600080fd5b506200050285828601620003bb565b9150509250929050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016200054d576200054d62000522565b5060010190565b600082198211156200056a576200056a62000522565b500190565b610c39806200057f6000396000f3fe6080604052600436106100a05760003560e01c80639852595c116100645780639852595c146101a3578063a3f8eace146101d9578063c45ac050146101f9578063ce7c2ac214610219578063d79779b21461024f578063e33b7de31461028557600080fd5b806319165587146100e55780633a98ef3914610107578063406072a91461012b57806348b750441461014b5780638b83209b1461016b57600080fd5b366100e0577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033346040516100d692919061097c565b60405180910390a1005b600080fd5b3480156100f157600080fd5b506101056101003660046109ad565b61029a565b005b34801561011357600080fd5b506000545b6040519081526020015b60405180910390f35b34801561013757600080fd5b506101186101463660046109ca565b610381565b34801561015757600080fd5b506101056101663660046109ca565b6103ac565b34801561017757600080fd5b5061018b610186366004610a03565b6104ba565b6040516001600160a01b039091168152602001610122565b3480156101af57600080fd5b506101186101be3660046109ad565b6001600160a01b031660009081526003602052604090205490565b3480156101e557600080fd5b506101186101f43660046109ad565b6104ea565b34801561020557600080fd5b506101186102143660046109ca565b610532565b34801561022557600080fd5b506101186102343660046109ad565b6001600160a01b031660009081526002602052604090205490565b34801561025b57600080fd5b5061011861026a3660046109ad565b6001600160a01b031660009081526005602052604090205490565b34801561029157600080fd5b50600154610118565b6001600160a01b0381166000908152600260205260409020546102d85760405162461bcd60e51b81526004016102cf90610a1c565b60405180910390fd5b60006102e3826104ea565b9050806000036103055760405162461bcd60e51b81526004016102cf90610a62565b80600160008282546103179190610ac3565b90915550506001600160a01b038216600090815260036020526040902080548201905561034482826105d8565b7fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056828260405161037592919061097c565b60405180910390a15050565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205490565b6001600160a01b0381166000908152600260205260409020546103e15760405162461bcd60e51b81526004016102cf90610a1c565b60006103ed8383610532565b90508060000361040f5760405162461bcd60e51b81526004016102cf90610a62565b6001600160a01b03831660009081526005602052604081208054839290610437908490610ac3565b90915550506001600160a01b0380841660009081526006602090815260408083209386168352929052208054820190556104728383836106f6565b826001600160a01b03167f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a83836040516104ad92919061097c565b60405180910390a2505050565b6000600482815481106104cf576104cf610adb565b6000918252602090912001546001600160a01b031692915050565b6000806104f660015490565b6105009047610ac3565b905061052b8382610526866001600160a01b031660009081526003602052604090205490565b61074c565b9392505050565b6001600160a01b03821660009081526005602052604081205481906040516370a0823160e01b81523060048201526001600160a01b038616906370a0823190602401602060405180830381865afa158015610591573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105b59190610af1565b6105bf9190610ac3565b90506105d083826105268787610381565b949350505050565b804710156106285760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016102cf565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610675576040519150601f19603f3d011682016040523d82523d6000602084013e61067a565b606091505b50509050806106f15760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016102cf565b505050565b6106f18363a9059cbb60e01b848460405160240161071592919061097c565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610787565b600080546001600160a01b0385168252600260205260408220548391906107739086610b0a565b61077d9190610b29565b6105d09190610b4b565b60006107dc826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166108599092919063ffffffff16565b8051909150156106f157808060200190518101906107fa9190610b62565b6106f15760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016102cf565b60606105d0848460008585600080866001600160a01b031685876040516108809190610bb4565b60006040518083038185875af1925050503d80600081146108bd576040519150601f19603f3d011682016040523d82523d6000602084013e6108c2565b606091505b50915091506108d3878383876108de565b979650505050505050565b6060831561094d578251600003610946576001600160a01b0385163b6109465760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016102cf565b50816105d0565b6105d083838151156109625781518083602001fd5b8060405162461bcd60e51b81526004016102cf9190610bd0565b6001600160a01b03929092168252602082015260400190565b6001600160a01b03811681146109aa57600080fd5b50565b6000602082840312156109bf57600080fd5b813561052b81610995565b600080604083850312156109dd57600080fd5b82356109e881610995565b915060208301356109f881610995565b809150509250929050565b600060208284031215610a1557600080fd5b5035919050565b60208082526026908201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060408201526573686172657360d01b606082015260800190565b6020808252602b908201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060408201526a191d59481c185e5b595b9d60aa1b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b60008219821115610ad657610ad6610aad565b500190565b634e487b7160e01b600052603260045260246000fd5b600060208284031215610b0357600080fd5b5051919050565b6000816000190483118215151615610b2457610b24610aad565b500290565b600082610b4657634e487b7160e01b600052601260045260246000fd5b500490565b600082821015610b5d57610b5d610aad565b500390565b600060208284031215610b7457600080fd5b8151801515811461052b57600080fd5b60005b83811015610b9f578181015183820152602001610b87565b83811115610bae576000848401525b50505050565b60008251610bc6818460208701610b84565b9190910192915050565b6020815260008251806020840152610bef816040850160208701610b84565b601f01601f1916919091016040019291505056fea26469706673582212202e00416b3dcb0c26e2effae8a75f2ae5d3a1dadc55aaa22486ea9147d7e07d3464736f6c634300080e0033000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000001e610000000000000000000000000000000000000000000000000138a388a43c000000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952000000000000000000000000514910771af9ca656af840dff83e8264ecf986caaa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af44500000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000006447265616d790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000444524d5900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005168747470733a2f2f647265616d792e6d7970696e6174612e636c6f75642f697066732f516d63776b536b4a6f6f336248326b3273666e4836665342576731524a4a7550685061424879616b635969694b6b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000400000000000000000000000061bf7b7bfbc55ddb551769a2ae8b3f98c25614e400000000000000000000000073b5ac2bbc29778b8114150e0ef07d6379868daf0000000000000000000000000a83b3cf4519642615f5c2cff55184e23906dc5f000000000000000000000000b07edfa58675f0f6072d2d0fe76d3bb3a7396a100000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001b000000000000000000000000000000000000000000000000000000000000001b000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000012
Deployed Bytecode
0x6080604052600436106105395760003560e01c8063792bce70116102ad578063c67e8b6811610170578063da324a30116100d7578063e985e9c511610090578063e985e9c514610fd3578063efc4bc7c14610ff3578063f15c85b414611009578063f2fde38b14611029578063f3b3a9fa14611049578063f698da251461105f578063fa4d280c1461107557600080fd5b8063da324a3014610ef1578063dddb91ba14610f11578063df20ad8f14610f31578063dfe363ef14610f72578063e4f2487a14610f87578063e83d508b14610fb357600080fd5b8063d1fe033d11610129578063d1fe033d14610e51578063d2c1f20614610e66578063d5abeb0114610e7b578063d5b1ae5e14610e91578063da0a985214610ebe578063da1b9e0814610ed157600080fd5b8063c67e8b6814610dbd578063c87b56dd14610ddd578063c91621c214610dfd578063c9a8d9f714610e12578063ccc5d84714610e27578063d0b77ab414610e3c57600080fd5b80639b154a7111610214578063b78ef4cb116101cd578063b78ef4cb14610d17578063b88d4fde14610d2d578063ba1f879f14610d4d578063be008ccb14610d68578063c204642c14610d7d578063c32a50f914610d9d57600080fd5b80639b154a7114610c6a5780639da0d7d414610c7f578063a22cb46514610c9a578063a2fb7b5d14610cba578063aab4b09e14610ce1578063b6eb6d6914610cf757600080fd5b80638da5cb5b116102665780638da5cb5b14610bd75780639024fc9614610bec57806390aa0b0f14610c01578063933edbb814610c1c57806394985ddd14610c3557806395d89b4114610c5557600080fd5b8063792bce7014610b125780637a9e1d0314610b325780637bd07f8b14610b525780637d94792a14610b8c5780637ee7866114610ba25780638708431314610bb757600080fd5b806333bc1c5c1161040057806354214f69116103675780636c635d3f116103205780636c635d3f14610a535780636e83843a14610a7357806370a0823114610a93578063715018a614610ab357806373b19e8f14610ac8578063776451b014610add578063791a251914610af257600080fd5b806354214f69146109bd5780635626e404146109d25780635e9f9613146109f257806361728f3914610a075780636352211e14610a1d57806366bb81c714610a3d57600080fd5b806341f43434116103b957806341f43434146109065780634256dbe31461092857806342842e0e14610948578063447321801461096857806349aaa5d91461097d5780634f6ccce71461099d57600080fd5b806333bc1c5c146108615780633584602814610891578063398c0ec1146108a75780633a367a67146108bc5780633ccfd60b146108d15780633da65fc1146108e657600080fd5b806319165587116104a4578063276f1c411161045d578063276f1c41146107b65780632da5ea17146107d65780632ee723fb146107eb5780632f1d5a60146108015780632f745c591461082157806330878ba91461084157600080fd5b806319165587146107015780631bae492e146107215780631cbe14c91461074157806320510b55146107615780632316b4da1461078157806323b872dd1461079657600080fd5b80630f30cde0116104f65780630f30cde0146106285780631197705e1461063b578063127effb21461065b578063166ca2bc1461067b57806318160ddd146106ca5780631865c57d146106df57600080fd5b806301ffc9a71461053e57806302410f4714610573578063031ab9f51461059457806306fdde03146105b7578063081812fc146105d9578063095ea7b314610606575b600080fd5b34801561054a57600080fd5b5061055e61055936600461537f565b6110a9565b60405190151581526020015b60405180910390f35b34801561057f57600080fd5b50600e5461055e90600160a01b900460ff1681565b3480156105a057600080fd5b506105a96110ba565b60405190815260200161056a565b3480156105c357600080fd5b506105cc611140565b60405161056a91906153f4565b3480156105e557600080fd5b506105f96105f4366004615407565b6111d2565b60405161056a9190615420565b34801561061257600080fd5b50610626610621366004615449565b6111f9565b005b61055e6106363660046154b6565b611212565b34801561064757600080fd5b50610626610656366004615501565b61172c565b34801561066757600080fd5b50600d546105f9906001600160a01b031681565b34801561068757600080fd5b50601e54601f546020546021546022546106a2949392919085565b604080519586526020860194909452928401919091526060830152608082015260a00161056a565b3480156106d657600080fd5b50600a546105a9565b3480156106eb57600080fd5b506106f46117a4565b60405161056a9190615534565b34801561070d57600080fd5b5061062661071c366004615501565b611a08565b34801561072d57600080fd5b50602c546105f9906001600160a01b031681565b34801561074d57600080fd5b5061062661075c36600461554e565b611be9565b34801561076d57600080fd5b5061062661077c366004615501565b611c5b565b34801561078d57600080fd5b50610626611ccf565b3480156107a257600080fd5b506106266107b1366004615570565b611d33565b3480156107c257600080fd5b50600e546105f9906001600160a01b031681565b3480156107e257600080fd5b5061055e611d5e565b3480156107f757600080fd5b506105a9602b5481565b34801561080d57600080fd5b5061062661081c366004615501565b611dab565b34801561082d57600080fd5b506105a961083c366004615449565b611e23565b34801561084d57600080fd5b506105cc61085c3660046155b1565b611eb9565b34801561086d57600080fd5b5060185460195461087c919082565b6040805192835260208301919091520161056a565b34801561089d57600080fd5b506105a960295481565b3480156108b357600080fd5b506105a96120e3565b3480156108c857600080fd5b506105cc6121be565b3480156108dd57600080fd5b5061062661224c565b3480156108f257600080fd5b5061055e6109013660046155e3565b6122d6565b34801561091257600080fd5b506105f96daaeb6d7670e522a718067333cd4e81565b34801561093457600080fd5b50610626610943366004615407565b61234e565b34801561095457600080fd5b50610626610963366004615570565b6123ad565b34801561097457600080fd5b506106266123d2565b34801561098957600080fd5b50610626610998366004615407565b612431565b3480156109a957600080fd5b506105a96109b8366004615407565b612490565b3480156109c957600080fd5b5061055e612523565b3480156109de57600080fd5b506106266109ed366004615407565b61254a565b3480156109fe57600080fd5b506105a96125a9565b348015610a1357600080fd5b506105a9600f5481565b348015610a2957600080fd5b506105f9610a38366004615407565b6125bb565b348015610a4957600080fd5b506105a960105481565b348015610a5f57600080fd5b50610626610a6e366004615407565b6125f0565b348015610a7f57600080fd5b50610626610a8e3660046156c1565b61264f565b348015610a9f57600080fd5b506105a9610aae366004615501565b6126bc565b348015610abf57600080fd5b50610626612742565b348015610ad457600080fd5b506105a9612756565b348015610ae957600080fd5b506105a9612803565b348015610afe57600080fd5b50610626610b0d366004615407565b61287b565b348015610b1e57600080fd5b50610626610b2d366004615709565b6128da565b348015610b3e57600080fd5b5061055e610b4d3660046155e3565b612959565b348015610b5e57600080fd5b50601b54601c54601d54610b7192919083565b6040805193845260208401929092529082015260600161056a565b348015610b9857600080fd5b506105a960115481565b348015610bae57600080fd5b506105cc6129c0565b348015610bc357600080fd5b50610626610bd2366004615735565b612ed3565b348015610be357600080fd5b506105f9612f42565b348015610bf857600080fd5b506105a9612f51565b348015610c0d57600080fd5b5060235460245461087c919082565b348015610c2857600080fd5b50601f54602b541461055e565b348015610c4157600080fd5b50610626610c5036600461554e565b612f63565b348015610c6157600080fd5b506105cc612fe9565b348015610c7657600080fd5b506105cc612ff8565b348015610c8b57600080fd5b5060145460155461087c919082565b348015610ca657600080fd5b50610626610cb5366004615791565b613005565b348015610cc657600080fd5b50601a54610cd49060ff1681565b60405161056a91906157ca565b348015610ced57600080fd5b506105a960275481565b348015610d0357600080fd5b50610626610d12366004615501565b613019565b348015610d2357600080fd5b506105a960285481565b348015610d3957600080fd5b50610626610d483660046157de565b61308d565b348015610d5957600080fd5b5060165460175461087c919082565b348015610d7457600080fd5b506106266130ba565b348015610d8957600080fd5b50610626610d9836600461585d565b61311c565b348015610da957600080fd5b50610626610db8366004615407565b6132ad565b348015610dc957600080fd5b50610626610dd8366004615735565b613373565b348015610de957600080fd5b506105cc610df8366004615407565b6133e2565b348015610e0957600080fd5b506105a961350a565b348015610e1e57600080fd5b506105a9613560565b348015610e3357600080fd5b506106266135e0565b348015610e4857600080fd5b5061055e6137a1565b348015610e5d57600080fd5b506106266137b4565b348015610e7257600080fd5b50610626613818565b348015610e8757600080fd5b506105a960255481565b348015610e9d57600080fd5b50610eb1610eac366004615501565b61387c565b60405161056a9190615914565b61055e610ecc3660046154b6565b613908565b348015610edd57600080fd5b50610626610eec3660046156c1565b613b33565b348015610efd57600080fd5b50610626610f0c366004615407565b613be8565b348015610f1d57600080fd5b50610626610f2c366004615735565b613c47565b348015610f3d57600080fd5b50610f51610f4c366004615449565b613cb5565b604080516001600160801b03909316835260ff90911660208301520161056a565b348015610f7e57600080fd5b50610626613cf8565b348015610f9357600080fd5b50601a54610fa690610100900460ff1681565b60405161056a919061596f565b348015610fbf57600080fd5b50610626610fce366004615407565b613d5a565b348015610fdf57600080fd5b5061055e610fee366004615983565b613db9565b348015610fff57600080fd5b506105a9602a5481565b34801561101557600080fd5b50602d546105f9906001600160a01b031681565b34801561103557600080fd5b50610626611044366004615501565b613de7565b34801561105557600080fd5b506105a960265481565b34801561106b57600080fd5b506105a9602e5481565b34801561108157600080fd5b506105a97f68e83002b91b0fd96d4df3566b5122221117e3ec6c2468fda594f6491f89b1c981565b60006110b482613e60565b92915050565b60006001601a54610100900460ff1660038111156110da576110da61551e565b036110e6575060155490565b6002601a54610100900460ff1660038111156111045761110461551e565b03611110575060175490565b6003601a54610100900460ff16600381111561112e5761112e61551e565b0361113a575060195490565b50600090565b60606002805461114f906159b1565b80601f016020809104026020016040519081016040528092919081815260200182805461117b906159b1565b80156111c85780601f1061119d576101008083540402835291602001916111c8565b820191906000526020600020905b8154815290600101906020018083116111ab57829003601f168201915b5050505050905090565b60006111dd82613e85565b506000908152600660205260409020546001600160a01b031690565b8161120381613eaa565b61120d8383613f5a565b505050565b600061121c61406a565b60006112266117a4565b90503332146112505760405162461bcd60e51b8152600401611247906159eb565b60405180910390fd5b60088160118111156112645761126461551e565b14806112815750600d81601181111561127f5761127f61551e565b145b8061129d5750600381601181111561129b5761129b61551e565b145b6112b95760405162461bcd60e51b815260040161124790615a1d565b6112cb6112c46120e3565b86906140c3565b3410156112ea5760405162461bcd60e51b815260040161124790615a4a565b60038160118111156112fe576112fe61551e565b0361137c576023548511156113255760405162461bcd60e51b815260040161124790615a77565b602b54601f5461133590876140cf565b111561137c5760405162461bcd60e51b8152602060048201526016602482015275283ab931b430b9b29032bc31b2b2b2103634b6b4ba1760511b6044820152606401611247565b600d8160118111156113905761139061551e565b03611426576024548511156113b75760405162461bcd60e51b815260040161124790615a77565b6025546113d86113c56125a9565b6113d2886113d2600a5490565b906140cf565b11156114265760405162461bcd60e51b815260206004820152601b60248201527f507572636861736520657863656564206d617820737570706c792e00000000006044820152606401611247565b600881601181111561143a5761143a61551e565b036115a25761144984846122d6565b6114885760405162461bcd60e51b815260206004820152601060248201526f2737ba103bb434ba32b634b9ba32b21760811b6044820152606401611247565b60028511156114d95760405162461bcd60e51b815260206004820152601e60248201527f4d696e7420657863656564207472616e73616374696f6e206c696d69747300006044820152606401611247565b336000908152602f60205260409020546002906114f7908790615ac4565b11156115455760405162461bcd60e51b815260206004820152601f60248201527f4d696e74206c696d6974207065722077616c6c65742065786365656465642e006044820152606401611247565b602a54611554866113d2612f51565b11156115a25760405162461bcd60e51b815260206004820152601c60248201527f5075726368617365206578636565642073616c65206361707065642e000000006044820152606401611247565b6115ac33866140db565b5060038160118111156115c1576115c161551e565b0361165d57601f546115d390866140cf565b601f5560006115e23487614166565b33600090815260326020908152604080832081518083019092526001600160801b03808616835260ff808d1684860190815283546001810185559387529490952092519290910180549351909416600160801b026001600160881b031990931691161717905560295490915081101561165b5760298190555b505b600d8160118111156116715761167161551e565b036116875760225461168390866140cf565b6022555b600881601181111561169b5761169b61551e565b036116dc57336000908152602f60205260409020546116bb908690615ac4565b336000908152602f60205260409020556021546116d890866140cf565b6021555b6031546040516001600160a01b03909116903480156108fc02916000818181858888f19350505050158015611715573d6000803e3d6000fd5b5060019150506117256001600c55565b9392505050565b611734614172565b6001600160a01b03811661175a5760405162461bcd60e51b815260040161124790615adc565b600e80546001600160a01b0319166001600160a01b0383169081179091556040517f5b92f2f101ec36b062768cd1330146da74961809b300919c88c6853ca703261590600090a250565b60006002601a5460ff1660028111156117bf576117bf61551e565b036117ca5750601190565b6001601a5460ff1660028111156117e3576117e361551e565b036117ee5750601090565b6000601a54610100900460ff16600381111561180c5761180c61551e565b036118175750600090565b6003601a54610100900460ff1660038111156118355761183561551e565b036118ce57611842611d5e565b1561184d5750600f90565b6019541580159061185f575060195443115b1561186a5750600e90565b6018541580159061187d57506018544310155b156118885750600d90565b6018541580159061189a575060185443105b80156118a7575060175443115b156118b25750600c90565b6018541580156118c3575060175443115b156118ce5750600b90565b6002601a54610100900460ff1660038111156118ec576118ec61551e565b0361196c576118f96137a1565b156119045750600a90565b60175415801590611916575060175443115b156119215750600990565b6016541580159061193457506016544310155b1561193f5750600890565b60165415801590611951575060165443105b1561195c5750600790565b60165460000361196c5750600690565b6001601a54610100900460ff16600381111561198a5761198a61551e565b0361113a57601f54602b54036119a05750600590565b601554158015906119b2575060155443115b156119bd5750600490565b601454158015906119d057506014544310155b156119db5750600390565b601454158015906119ed575060145443105b156119f85750600290565b60145460000361113a5750600190565b60315460405163673e156160e11b81526000916001600160a01b03169063ce7c2ac290611a39903390600401615420565b602060405180830381865afa158015611a56573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a7a9190615b07565b1180611a95575033611a8a612f42565b6001600160a01b0316145b611ad95760405162461bcd60e51b81526020600482015260156024820152743737ba1039b430b932b437b63232b917b7bbb732b960591b6044820152606401611247565b336001600160a01b0382161480611b085750611af3612f42565b6001600160a01b0316336001600160a01b0316145b611b4d5760405162461bcd60e51b81526020600482015260166024820152752932b632b0b9b29d103737903832b936b4b9b9b4b7b760511b6044820152606401611247565b603154604051631916558760e01b81526001600160a01b0390911690631916558790611b7d908490600401615420565b600060405180830381600087803b158015611b9757600080fd5b505af1158015611bab573d6000803e3d6000fd5b505050507f7955210193a82a2c13259e4b48f1e8b90a4170115a1021fdae0570d045bba20581604051611bde9190615420565b60405180910390a150565b600d546001600160a01b03163314611c135760405162461bcd60e51b815260040161124790615b20565b6023829055602481905560408051838152602081018390527f97720c97a8962cb9a18ee69ad344acb999cca0250317bc9b023bb6badad22e1391015b60405180910390a15050565b600d546001600160a01b03163314611c855760405162461bcd60e51b815260040161124790615b20565b602c80546001600160a01b0319166001600160a01b0383169081179091556040517fb01190fe4bf51f48a33625333c07da1825c9f14d04cff4433b6e056c9dc2033a90600090a250565b600d546001600160a01b03163314611cf95760405162461bcd60e51b815260040161124790615b20565b601a805461ff0019166103001790556040517fca29b392f61fad3260f009b6fc1de9d8efda05563601b6c91396b795eeefff2e90600090a1565b826001600160a01b0381163314611d4d57611d4d33613eaa565b611d588484846141d1565b50505050565b600080602654602554611d719190615b50565b602154602054602254601f54939450600093611d8d9190615ac4565b611d979190615ac4565b611da19190615ac4565b9190911492915050565b611db3614172565b6001600160a01b038116611dd95760405162461bcd60e51b815260040161124790615adc565b600d80546001600160a01b0319166001600160a01b0383169081179091556040517fa508d3b137dbcdf7e06f84833fe4aca137451e1e3309f454a207d8fb85c2ccd890600090a250565b6000611e2e836126bc565b8210611e905760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401611247565b506001600160a01b03919091166000908152600860209081526040808320938352929052205490565b6060611ec3612f42565b6001600160a01b0316336001600160a01b031614611f1e5784831115611f1e5760405162461bcd60e51b815260206004820152601060248201526f546f6b656e206e6f742065786973747360801b6044820152606401611247565b611f26612523565b611f4e5750604080518082019091526007815266191959985d5b1d60ca1b60208201526120db565b6000611f5b856001615ac4565b6001600160401b03811115611f7257611f72615624565b604051908082528060200260200182016040528015611f9b578160200160208202803683370190505b50905060015b858111611fd85780828281518110611fbb57611fbb615b67565b6020908102919091010152611fd1600182615ac4565b9050611fa1565b50825b8581116120b45760008660115483604051602001612003929190918252602082015260400190565b6040516020818303038152906040528051906020012060001c6120269190615b93565b612031906001615ac4565b905082818151811061204557612045615b67565b602002602001015183838151811061205f5761205f615b67565b602002602001015184848151811061207957612079615b67565b6020026020010185848151811061209257612092615b67565b602090810291909101019190915252506120ad600182615ac4565b9050611fdb565b506120d78185815181106120ca576120ca615b67565b6020026020010151614202565b9150505b949350505050565b6000806120ee6117a4565b905060038160118111156121045761210461551e565b03612174576014546000906121199043615b50565b601d54601b5491925060009161213b9190612135908590614166565b906140c3565b601c5460285491925061214e9190614294565b811061215f575050601c5492915050565b60285461216c9082614294565b935050505090565b60088160118111156121885761218861551e565b0361219557505060275490565b600d8160118111156121a9576121a961551e565b036121b657505060285490565b505060285490565b601380546121cb906159b1565b80601f01602080910402602001604051908101604052809291908181526020018280546121f7906159b1565b80156122445780601f1061221957610100808354040283529160200191612244565b820191906000526020600020905b81548152906001019060200180831161222757829003601f168201915b505050505081565b600d546001600160a01b031633146122765760405162461bcd60e51b815260040161124790615b20565b6040514790339082156108fc029083906000818181858888f193505050501580156122a5573d6000803e3d6000fd5b506040518181527f807631352cb3389b100202fae783b0b18fedc90bd3a438433796cb89462f4fad90602001611bde565b602c546000906001600160a01b03166123275760405162461bcd60e51b815260206004820152601360248201527215d3081ad95e481b9bdd08185cdcda59db9959606a1b6044820152606401611247565b602c546001600160a01b031661233d84846142a0565b6001600160a01b0316149392505050565b600d546001600160a01b031633146123785760405162461bcd60e51b815260040161124790615b20565b60268190556040518181527fe1fb8f58d0fe8f41debc65095588c6530f5b3c96964aee78a164712c7ab7cb3f90602001611bde565b826001600160a01b03811633146123c7576123c733613eaa565b611d58848484614374565b600d546001600160a01b031633146123fc5760405162461bcd60e51b815260040161124790615b20565b601a805460ff191690556040517f4f0f641a7e3d2c654d00279745eb7cf977b86891e3c7dd11cf315972d02089ce90600090a1565b600d546001600160a01b0316331461245b5760405162461bcd60e51b815260040161124790615b20565b60278190556040518181527f8ea69d9e909b68c4f14f78ed645aa5bb6e5aaa632c8e2f365618f51f6e10373290602001611bde565b600061249b600a5490565b82106124fe5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401611247565b600a828154811061251157612511615b67565b90600052602060002001549050919050565b60008060115411801561253857506000601054115b8015612545575060105443115b905090565b600d546001600160a01b031633146125745760405162461bcd60e51b815260040161124790615b20565b602a8190556040518181527fee53f3111b00616aa0a325f68aaf488d4433b7f00ea57bdfe5346fb08899c1aa90602001611bde565b601e5460265460009161254591615b50565b6000818152600460205260408120546001600160a01b0316806110b45760405162461bcd60e51b815260040161124790615ba7565b600d546001600160a01b0316331461261a5760405162461bcd60e51b815260040161124790615b20565b60298190556040518181527f98302d1de36f493ad21f68a7d43aada3c922bcde2576a9db30b75187321cabfc90602001611bde565b600d546001600160a01b031633146126795760405162461bcd60e51b815260040161124790615b20565b805161268c9060129060208401906152d0565b507fda0697149924c38db1462c9de1c03a46ce996f35d278fcf8dc4a76eb1065dc2e81604051611bde91906153f4565b60006001600160a01b0382166127265760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401611247565b506001600160a01b031660009081526005602052604090205490565b61274a614172565b612754600061438f565b565b6000806127616117a4565b905060038160118111156127775761277761551e565b03612784575050602b5490565b60088160118111156127985761279861551e565b036127a5575050602a5490565b600d8160118111156127b9576127b961551e565b036127fb57601f546026546021546020546025546127d79190615b50565b6127e19190615b50565b6127eb9190615b50565b6127f59190615b50565b91505090565b600091505090565b60008061280e6117a4565b905060088160118111156128245761282461551e565b03612839576021546020546127f59190615ac4565b600d81601181111561284d5761284d61551e565b0361285a57505060225490565b600381601181111561286e5761286e61551e565b036127fb575050601f5490565b600d546001600160a01b031633146128a55760405162461bcd60e51b815260040161124790615b20565b60288190556040518181527ff959ca468c08c9457955f238a0ad6a31fc63f09b1e9bbafb4e409f19163bbe1490602001611bde565b600d546001600160a01b031633146129045760405162461bcd60e51b815260040161124790615b20565b601b839055601c829055601d81905560408051848152602081018490529081018290527f25712bfd18ae9c5dd63c26ade669b68a324cfbe3e863cdc207d2a06e9727d3929060600160405180910390a1505050565b602d546000906001600160a01b03166129aa5760405162461bcd60e51b815260206004820152601360248201527213d1c81ad95e481b9bdd08185cdcda59db9959606a1b6044820152606401611247565b602d546001600160a01b031661233d84846142a0565b606060006129cc6117a4565b905060018160118111156129e2576129e261551e565b03612a2057505060408051808201909152601e81527f447574636841756374696f6e4265666f7265576974686f7574426c6f636b0000602082015290565b6002816011811115612a3457612a3461551e565b03612a7257505060408051808201909152601b81527f447574636841756374696f6e4265666f726557697468426c6f636b0000000000602082015290565b6003816011811115612a8657612a8661551e565b03612ab9575050604080518082019091526012815271447574636841756374696f6e447572696e6760701b602082015290565b6004816011811115612acd57612acd61551e565b03612afd57505060408051808201909152600f81526e111d5d18da105d58dd1a5bdb915b99608a1b602082015290565b6005816011811115612b1157612b1161551e565b03612b48575050604080518082019091526016815275111d5d18da105d58dd1a5bdb915b9914dbdb1913dd5d60521b602082015290565b6006816011811115612b5c57612b5c61551e565b03612b9a57505060408051808201909152601d81527f5072697661746553616c654265666f7265576974686f7574426c6f636b000000602082015290565b6007816011811115612bae57612bae61551e565b03612bec57505060408051808201909152601a81527f5072697661746553616c654265666f726557697468426c6f636b000000000000602082015290565b6008816011811115612c0057612c0061551e565b03612c325750506040805180820190915260118152705072697661746553616c65447572696e6760781b602082015290565b6009816011811115612c4657612c4661551e565b03612c7557505060408051808201909152600e81526d141c9a5d985d1954d85b19515b9960921b602082015290565b600a816011811115612c8957612c8961551e565b03612cbf575050604080518082019091526015815274141c9a5d985d1954d85b19515b9914dbdb1913dd5d605a1b602082015290565b600b816011811115612cd357612cd361551e565b03612d1157505060408051808201909152601c81527f5075626c696353616c654265666f7265576974686f7574426c6f636b00000000602082015290565b600c816011811115612d2557612d2561551e565b03612d5f5750506040805180820190915260198152785075626c696353616c654265666f726557697468426c6f636b60381b602082015290565b600d816011811115612d7357612d7361551e565b03612da457505060408051808201909152601081526f5075626c696353616c65447572696e6760801b602082015290565b600e816011811115612db857612db861551e565b03612de657505060408051808201909152600d81526c141d589b1a58d4d85b19515b99609a1b602082015290565b600f816011811115612dfa57612dfa61551e565b03612e2f575050604080518082019091526014815273141d589b1a58d4d85b19515b9914dbdb1913dd5d60621b602082015290565b6010816011811115612e4357612e4361551e565b03612e6d575050604080518082019091526009815268506175736553616c6560b81b602082015290565b6011816011811115612e8157612e8161551e565b03612ead57505060408051808201909152600b81526a105b1b14d85b195cd15b9960aa1b602082015290565b505060408051808201909152600a815269139bdd14dd185c9d195960b21b602082015290565b600d546001600160a01b03163314612efd5760405162461bcd60e51b815260040161124790615b20565b80516014819055602080830151601581905560408051938452918301527f46b9f9d83ded22a38ee2e31b09c026a8c683dd2e9060de026c383b15a655f4fd9101611bde565b6001546001600160a01b031690565b60205460215460009161254591615ac4565b336001600160a01b037f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb79521614612fdb5760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c006044820152606401611247565b612fe582826143e1565b5050565b60606003805461114f906159b1565b601280546121cb906159b1565b8161300f81613eaa565b61120d8383614472565b600d546001600160a01b031633146130435760405162461bcd60e51b815260040161124790615b20565b602d80546001600160a01b0319166001600160a01b0383169081179091556040517f14ac04b188e9f32c0e4b3ae39771c1c288169ca48b8bddc22be8bec64d12ba0a90600090a250565b836001600160a01b03811633146130a7576130a733613eaa565b6130b38585858561447d565b5050505050565b600d546001600160a01b031633146130e45760405162461bcd60e51b815260040161124790615b20565b601a805460ff191660021790556040517f58abff1119ad7689f2843996246b31faf77e0a40545d5085ee99361a768a3f7d90600090a1565b61312461406a565b600d546001600160a01b0316331461314e5760405162461bcd60e51b815260040161124790615b20565b60255482516131699061316190846140c3565b600a546113d2565b11156131b25760405162461bcd60e51b815260206004820152601860248201527722bc31b2b2b21036b0bc1039bab838363c903634b6b4ba1760411b6044820152606401611247565b60265482516131ce906131c590846140c3565b601e54906140cf565b11156132145760405162461bcd60e51b815260206004820152601560248201527424b739bab33334b1b4b2b73a103932b9b2b93b329760591b6044820152606401611247565b8151613224906131c590836140c3565b601e5560005b82518110156132695761325683828151811061324857613248615b67565b6020026020010151836140db565b508061326181615bd9565b91505061322a565b507f08b3e41950189550b73643a90143efc8a526a17dc07e6abe0fb50ce7c10b50fc828260405161329b929190615bf2565b60405180910390a1612fe56001600c55565b600d546001600160a01b031633146132d75760405162461bcd60e51b815260040161124790615b20565b6011541561331d5760405162461bcd60e51b815260206004820152601360248201527229b2b2b210373ab6b132b91032bc34b9ba399760691b6044820152606401611247565b6011819055600e805460ff60a01b1916600160a01b17905560408051428152600060208201529081018290527f59e4c9bb1559d5420398abdcb1a7eb97cc4a7e27b2ae810b8d7f44fbc2327ffa90606001611bde565b600d546001600160a01b0316331461339d5760405162461bcd60e51b815260040161124790615b20565b80516018819055602080830151601981905560408051938452918301527f70441bfeec4000206c01cb310438ec41bb281f98d8ea4f08f086e3329ff4eb299101611bde565b60606133ed600a5490565b82111561342f5760405162461bcd60e51b815260206004820152601060248201526f2a37b5b2b7103737ba1032bc34b9ba1760811b6044820152606401611247565b613437612523565b6134cb5760138054613448906159b1565b80601f0160208091040260200160405190810160405280929190818152602001828054613474906159b1565b80156134c15780601f10613496576101008083540402835291602001916134c1565b820191906000526020600020905b8154815290600101906020018083116134a457829003601f168201915b50505050506110b4565b60126134e46134d9600a5490565b602554856001611eb9565b6040516020016134f5929190615c5f565b60405160208183030381529060405292915050565b600060036135166117a4565b60118111156135275761352761551e565b03613533575060235490565b600d61353d6117a4565b601181111561354e5761354e61551e565b0361355a575060245490565b50600290565b60006001601a54610100900460ff1660038111156135805761358061551e565b0361358c575060145490565b6002601a54610100900460ff1660038111156135aa576135aa61551e565b036135b6575060165490565b6003601a54610100900460ff1660038111156135d4576135d461551e565b0361113a575060185490565b600d546001600160a01b0316331461360a5760405162461bcd60e51b815260040161124790615b20565b600e54600160a01b900460ff16156136645760405162461bcd60e51b815260206004820152601f60248201527f436861696e6c696e6b2056524620616c726561647920726571756573746564006044820152606401611247565b6040516370a0823160e01b8152671bc16d674ec80000906001600160a01b037f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca16906370a08231906136ba903090600401615420565b602060405180830381865afa1580156136d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136fb9190615b07565b101561373d5760405162461bcd60e51b8152602060048201526011602482015270496e73756666696369656e74204c494e4b60781b6044820152606401611247565b613751600f54671bc16d674ec800006144af565b50600e805460ff60a01b1916600160a01b1790556040517f8bcef1354992d6b49befbd8ce23b2578ce493191f74c32b543d2f177962a139f906137979042815260200190565b60405180910390a1565b6000602a546137ae612f51565b14905090565b600d546001600160a01b031633146137de5760405162461bcd60e51b815260040161124790615b20565b601a805461ff0019166101001790556040517f82e232fa1250b177b43a967e555410ac1c850806b01cac8363fe6e94e7edfd0190600090a1565b600d546001600160a01b031633146138425760405162461bcd60e51b815260040161124790615b20565b601a805461ff0019166102001790556040517f0913c47876f976a46ce9674a2e5a22679ebf61b03b7a333913652272a9262c7790600090a1565b6001600160a01b0381166000908152603260209081526040808320805482518185028101850190935280835260609492939192909184015b828210156138fd57600084815260209081902060408051808201909152908401546001600160801b0381168252600160801b900460ff16818301528252600190920191016138b4565b505050509050919050565b600061391261406a565b3332146139315760405162461bcd60e51b8152600401611247906159eb565b600861393b6117a4565b601181111561394c5761394c61551e565b146139695760405162461bcd60e51b815260040161124790615a1d565b6139738383612959565b6139b55760405162461bcd60e51b81526020600482015260136024820152722737ba1027a3903bb434ba32b634b9ba32b21760691b6044820152606401611247565b336000908152603060205260409020546002906139d39086906140cf565b1115613a175760405162461bcd60e51b815260206004820152601360248201527220b63932b0b23c9021b630b4b6b2b21027a39760691b6044820152606401611247565b602a54613a26856113d2612f51565b1115613a705760405162461bcd60e51b8152602060048201526019602482015278115e18d9595908141c9a5d985d194814d85b1948131a5b5a5d603a1b6044820152606401611247565b613a82613a7b6120e3565b85906140c3565b341015613aa15760405162461bcd60e51b815260040161124790615a4a565b33600090815260306020526040902054613abc908590615ac4565b3360009081526030602090815260409091209190915554613add90856140cf565b602055613aea33856140db565b506031546040516001600160a01b03909116903480156108fc02916000818181858888f19350505050158015613b24573d6000803e3d6000fd5b50600190506117256001600c55565b600d546001600160a01b03163314613b5d5760405162461bcd60e51b815260040161124790615b20565b613b65612523565b15613ba55760405162461bcd60e51b815260206004820152601060248201526f105b1c9958591e481c995d99585b195960821b6044820152606401611247565b8051613bb89060139060208401906152d0565b507fb0cb658f6a70918635661157bac90270b4184dff76f6b90dfebdad09e29ce5eb81604051611bde91906153f4565b600d546001600160a01b03163314613c125760405162461bcd60e51b815260040161124790615b20565b60108190556040518181527ffd1cd879b90803328042915a0dab567886d80637d84c7875df6a3e4495c379ac90602001611bde565b600d546001600160a01b03163314613c715760405162461bcd60e51b815260040161124790615b20565b80516016819055602080830151601781905560408051938452918301527ea742ba61fbc2be98048a2bafed46ef5f837610c64f7a83e332b100f6aab0759101611bde565b60326020528160005260406000208181548110613cd157600080fd5b6000918252602090912001546001600160801b0381169250600160801b900460ff16905082565b600d546001600160a01b03163314613d225760405162461bcd60e51b815260040161124790615b20565b601a805460ff191660011790556040517f6d4e2212f1a4fcfebfe8fd91368752c56e02d80a28c18c5cce3d812cfcbcb4a790600090a1565b600d546001600160a01b03163314613d845760405162461bcd60e51b815260040161124790615b20565b602b8190556040518181527febe3296c3cc674d6155214007876758ba86e54f6a760820db1bc6c3d2520523e90602001611bde565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b613def614172565b6001600160a01b038116613e545760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401611247565b613e5d8161438f565b50565b60006001600160e01b0319821663780e9d6360e01b14806110b457506110b482614626565b613e8e81614676565b613e5d5760405162461bcd60e51b815260040161124790615ba7565b6daaeb6d7670e522a718067333cd4e3b15613e5d57604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015613f17573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f3b9190615d19565b613e5d5780604051633b79c77360e21b81526004016112479190615420565b6000613f65826125bb565b9050806001600160a01b0316836001600160a01b031603613fd25760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401611247565b336001600160a01b0382161480613fee5750613fee8133613db9565b6140605760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401611247565b61120d8383614693565b6002600c54036140bc5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401611247565b6002600c55565b60006117258284615d36565b60006117258284615ac4565b6000805b8281101561415c5760006140f2600a5490565b9050602554811015614149576141128561410d836001615ac4565b614701565b60405181906001600160a01b038716907fa512fb2532ca8587f236380171326ebb69670e86a2ba0c4412a3fcca4c3ada9b90600090a35b508061415481615bd9565b9150506140df565b5060019392505050565b60006117258284615d55565b3361417b612f42565b6001600160a01b0316146127545760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611247565b6141db338261471b565b6141f75760405162461bcd60e51b815260040161124790615d69565b61120d838383614779565b6060600061420f836148ea565b60010190506000816001600160401b0381111561422e5761422e615624565b6040519080825280601f01601f191660200182016040528015614258576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461426257509392505050565b60006117258284615b50565b602e54604080517f68e83002b91b0fd96d4df3566b5122221117e3ec6c2468fda594f6491f89b1c96020820152339181019190915260009182916060016040516020818303038152906040528051906020012060405160200161431a92919061190160f01b81526002810192909252602282015260420190565b6040516020818303038152906040528051906020012090506120db84848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525085939250506149c29050565b61120d8383836040518060200160405280600081525061308d565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80156144345760115460000361443457601181905560408051428152602081018490529081018290527f59e4c9bb1559d5420398abdcb1a7eb97cc4a7e27b2ae810b8d7f44fbc2327ffa90606001611c4f565b60408051428152602081018490529081018290527f1c01baa2e4487f389547acd2b2396e5b8938b605d047d0559c4b855b5f82c81a90606001611c4f565b612fe53383836149e6565b614487338361471b565b6144a35760405162461bcd60e51b815260040161124790615d69565b611d5884848484614ab0565b60007f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca6001600160a01b0316634000aea07f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb79528486600060405160200161451f929190918252602082015260400190565b6040516020818303038152906040526040518463ffffffff1660e01b815260040161454c93929190615db6565b6020604051808303816000875af115801561456b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061458f9190615d19565b5060008381526020818152604080832054815180840188905280830185905230606082015260808082018390528351808303909101815260a0909101909252815191830191909120868452929091526145e9906001615ac4565b60008581526020818152604091829020929092558051808301879052808201849052815180820383018152606090910190915280519101206120db565b60006001600160e01b031982166380ac58cd60e01b148061465757506001600160e01b03198216635b5e139f60e01b145b806110b457506301ffc9a760e01b6001600160e01b03198316146110b4565b6000908152600460205260409020546001600160a01b0316151590565b600081815260066020526040902080546001600160a01b0319166001600160a01b03841690811790915581906146c8826125bb565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b612fe5828260405180602001604052806000815250614ae3565b600080614727836125bb565b9050806001600160a01b0316846001600160a01b0316148061474e575061474e8185613db9565b806120db5750836001600160a01b0316614767846111d2565b6001600160a01b031614949350505050565b826001600160a01b031661478c826125bb565b6001600160a01b0316146147b25760405162461bcd60e51b815260040161124790615ddd565b6001600160a01b0382166148145760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401611247565b6148218383836001614b16565b826001600160a01b0316614834826125bb565b6001600160a01b03161461485a5760405162461bcd60e51b815260040161124790615ddd565b600081815260066020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260058552838620805460001901905590871680865283862080546001019055868652600490945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106149295772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310614955576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061497357662386f26fc10000830492506010015b6305f5e100831061498b576305f5e100830492506008015b612710831061499f57612710830492506004015b606483106149b1576064830492506002015b600a83106110b45760010192915050565b60008060006149d18585614b22565b915091506149de81614b67565b509392505050565b816001600160a01b0316836001600160a01b031603614a435760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b6044820152606401611247565b6001600160a01b03838116600081815260076020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b614abb848484614779565b614ac784848484614cac565b611d585760405162461bcd60e51b815260040161124790615e22565b614aed8383614daa565b614afa6000848484614cac565b61120d5760405162461bcd60e51b815260040161124790615e22565b611d5884848484614ec5565b6000808251604103614b585760208301516040840151606085015160001a614b4c87828585614ffe565b94509450505050614b60565b506000905060025b9250929050565b6000816004811115614b7b57614b7b61551e565b03614b835750565b6001816004811115614b9757614b9761551e565b03614bdf5760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b6044820152606401611247565b6002816004811115614bf357614bf361551e565b03614c405760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401611247565b6003816004811115614c5457614c5461551e565b03613e5d5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401611247565b60006001600160a01b0384163b15614da257604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290614cf0903390899088908890600401615e74565b6020604051808303816000875af1925050508015614d2b575060408051601f3d908101601f19168201909252614d2891810190615eb1565b60015b614d88573d808015614d59576040519150601f19603f3d011682016040523d82523d6000602084013e614d5e565b606091505b508051600003614d805760405162461bcd60e51b815260040161124790615e22565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506120db565b5060016120db565b6001600160a01b038216614e005760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401611247565b614e0981614676565b15614e265760405162461bcd60e51b815260040161124790615ece565b614e34600083836001614b16565b614e3d81614676565b15614e5a5760405162461bcd60e51b815260040161124790615ece565b6001600160a01b038216600081815260056020908152604080832080546001019055848352600490915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b614ed1848484846150b8565b6001811115614f405760405162461bcd60e51b815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e7365637574697665207472604482015274185b9cd9995c9cc81b9bdd081cdd5c1c1bdc9d1959605a1b6064820152608401611247565b816001600160a01b038516614f9c57614f9781600a80546000838152600b60205260408120829055600182018355919091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80155565b614fbf565b836001600160a01b0316856001600160a01b031614614fbf57614fbf8582615140565b6001600160a01b038416614fdb57614fd6816151dd565b6130b3565b846001600160a01b0316846001600160a01b0316146130b3576130b3848261528c565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b0383111561502b57506000905060036150af565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561507f573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166150a8576000600192509250506150af565b9150600090505b94509492505050565b6001811115611d58576001600160a01b038416156150fe576001600160a01b038416600090815260056020526040812080548392906150f8908490615b50565b90915550505b6001600160a01b03831615611d58576001600160a01b03831660009081526005602052604081208054839290615135908490615ac4565b909155505050505050565b6000600161514d846126bc565b6151579190615b50565b6000838152600960205260409020549091508082146151aa576001600160a01b03841660009081526008602090815260408083208584528252808320548484528184208190558352600990915290208190555b5060009182526009602090815260408084208490556001600160a01b039094168352600881528383209183525290812055565b600a546000906151ef90600190615b50565b6000838152600b6020526040812054600a805493945090928490811061521757615217615b67565b9060005260206000200154905080600a838154811061523857615238615b67565b6000918252602080832090910192909255828152600b9091526040808220849055858252812055600a80548061527057615270615f05565b6001900381819060005260206000200160009055905550505050565b6000615297836126bc565b6001600160a01b039093166000908152600860209081526040808320868452825280832085905593825260099052919091209190915550565b8280546152dc906159b1565b90600052602060002090601f0160209004810192826152fe5760008555615344565b82601f1061531757805160ff1916838001178555615344565b82800160010185558215615344579182015b82811115615344578251825591602001919060010190615329565b50615350929150615354565b5090565b5b808211156153505760008155600101615355565b6001600160e01b031981168114613e5d57600080fd5b60006020828403121561539157600080fd5b813561172581615369565b60005b838110156153b757818101518382015260200161539f565b83811115611d585750506000910152565b600081518084526153e081602086016020860161539c565b601f01601f19169290920160200192915050565b60208152600061172560208301846153c8565b60006020828403121561541957600080fd5b5035919050565b6001600160a01b0391909116815260200190565b6001600160a01b0381168114613e5d57600080fd5b6000806040838503121561545c57600080fd5b823561546781615434565b946020939093013593505050565b60008083601f84011261548757600080fd5b5081356001600160401b0381111561549e57600080fd5b602083019150836020828501011115614b6057600080fd5b6000806000604084860312156154cb57600080fd5b8335925060208401356001600160401b038111156154e857600080fd5b6154f486828701615475565b9497909650939450505050565b60006020828403121561551357600080fd5b813561172581615434565b634e487b7160e01b600052602160045260246000fd5b60208101601283106155485761554861551e565b91905290565b6000806040838503121561556157600080fd5b50508035926020909101359150565b60008060006060848603121561558557600080fd5b833561559081615434565b925060208401356155a081615434565b929592945050506040919091013590565b600080600080608085870312156155c757600080fd5b5050823594602084013594506040840135936060013592509050565b600080602083850312156155f657600080fd5b82356001600160401b0381111561560c57600080fd5b61561885828601615475565b90969095509350505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561566257615662615624565b604052919050565b60006001600160401b0383111561568357615683615624565b615696601f8401601f191660200161563a565b90508281528383830111156156aa57600080fd5b828260208301376000602084830101529392505050565b6000602082840312156156d357600080fd5b81356001600160401b038111156156e957600080fd5b8201601f810184136156fa57600080fd5b6120db8482356020840161566a565b60008060006060848603121561571e57600080fd5b505081359360208301359350604090920135919050565b60006040828403121561574757600080fd5b604051604081018181106001600160401b038211171561576957615769615624565b604052823581526020928301359281019290925250919050565b8015158114613e5d57600080fd5b600080604083850312156157a457600080fd5b82356157af81615434565b915060208301356157bf81615783565b809150509250929050565b60208101600383106155485761554861551e565b600080600080608085870312156157f457600080fd5b84356157ff81615434565b9350602085013561580f81615434565b92506040850135915060608501356001600160401b0381111561583157600080fd5b8501601f8101871361584257600080fd5b6158518782356020840161566a565b91505092959194509250565b6000806040838503121561587057600080fd5b82356001600160401b038082111561588757600080fd5b818501915085601f83011261589b57600080fd5b81356020828211156158af576158af615624565b8160051b92506158c081840161563a565b82815292840181019281810190898511156158da57600080fd5b948201945b8486101561590457853593506158f484615434565b83825294820194908201906158df565b9997909101359750505050505050565b602080825282518282018190526000919060409081850190868401855b8281101561596257815180516001600160801b0316855286015160ff16868501529284019290850190600101615931565b5091979650505050505050565b60208101600483106155485761554861551e565b6000806040838503121561599657600080fd5b82356159a181615434565b915060208301356157bf81615434565b600181811c908216806159c557607f821691505b6020821081036159e557634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526018908201527721b7b73a3930b1ba1034b9903737ba1030b63637bbb2b21760411b604082015260600190565b60208082526013908201527229b0b632903737ba1030bb30b4b630b136329760691b604082015260600190565b60208082526013908201527224b739bab33334b1b4b2b73a10333ab732399760691b604082015260600190565b6020808252601f908201527f4d696e7420657863656564207472616e73616374696f6e206c696d6974732e00604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60008219821115615ad757615ad7615aae565b500190565b602080825260119082015270043616e6e6f742061737369676e2030783607c1b604082015260600190565b600060208284031215615b1957600080fd5b5051919050565b60208082526016908201527527b7363c9037b832b930ba37b91030b63637bbb2b21760511b604082015260600190565b600082821015615b6257615b62615aae565b500390565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601260045260246000fd5b600082615ba257615ba2615b7d565b500690565b602080825260189082015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b604082015260600190565b600060018201615beb57615beb615aae565b5060010190565b604080825283519082018190526000906020906060840190828701845b82811015615c345781516001600160a01b031684529284019290840190600101615c0f565b50505092019290925292915050565b60008151615c5581856020860161539c565b9290920192915050565b600080845481600182811c915080831680615c7b57607f831692505b60208084108203615c9a57634e487b7160e01b86526022600452602486fd5b818015615cae5760018114615cbf57615cec565b60ff19861689528489019650615cec565b60008b81526020902060005b86811015615ce45781548b820152908501908301615ccb565b505084890196505b505050505050615d10615cff8286615c43565b64173539b7b760d91b815260050190565b95945050505050565b600060208284031215615d2b57600080fd5b815161172581615783565b6000816000190483118215151615615d5057615d50615aae565b500290565b600082615d6457615d64615b7d565b500490565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b60018060a01b0384168152826020820152606060408201526000615d1060608301846153c8565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090615ea7908301846153c8565b9695505050505050565b600060208284031215615ec357600080fd5b815161172581615369565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220eb07c8ff0f84eed01688cbff3e8b9536494dba171130f994bb03d8803c97ae6464736f6c634300080e0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000001e610000000000000000000000000000000000000000000000000138a388a43c000000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952000000000000000000000000514910771af9ca656af840dff83e8264ecf986caaa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af44500000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000006447265616d790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000444524d5900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005168747470733a2f2f647265616d792e6d7970696e6174612e636c6f75642f697066732f516d63776b536b4a6f6f336248326b3273666e4836665342576731524a4a7550685061424879616b635969694b6b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000400000000000000000000000061bf7b7bfbc55ddb551769a2ae8b3f98c25614e400000000000000000000000073b5ac2bbc29778b8114150e0ef07d6379868daf0000000000000000000000000a83b3cf4519642615f5c2cff55184e23906dc5f000000000000000000000000b07edfa58675f0f6072d2d0fe76d3bb3a7396a100000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001b000000000000000000000000000000000000000000000000000000000000001b000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000012
-----Decoded View---------------
Arg [0] : _tokenName (string): Dreamy
Arg [1] : _symbol (string): DRMY
Arg [2] : _maxSupply (uint256): 7777
Arg [3] : _startPrice (uint256): 88000000000000000
Arg [4] : _defaultURI (string): https://dreamy.mypinata.cloud/ipfs/QmcwkSkJoo3bH2k2sfnH6fSBWg1RJJuPhPaBHyakcYiiKk
Arg [5] : chainLinkParams (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]
Arg [6] : revenueShare (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]
-----Encoded View---------------
29 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000160
Arg [2] : 0000000000000000000000000000000000000000000000000000000000001e61
Arg [3] : 0000000000000000000000000000000000000000000000000138a388a43c0000
Arg [4] : 00000000000000000000000000000000000000000000000000000000000001a0
Arg [5] : 000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952
Arg [6] : 000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca
Arg [7] : aa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af445
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000220
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [10] : 447265616d790000000000000000000000000000000000000000000000000000
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [12] : 44524d5900000000000000000000000000000000000000000000000000000000
Arg [13] : 0000000000000000000000000000000000000000000000000000000000000051
Arg [14] : 68747470733a2f2f647265616d792e6d7970696e6174612e636c6f75642f6970
Arg [15] : 66732f516d63776b536b4a6f6f336248326b3273666e4836665342576731524a
Arg [16] : 4a7550685061424879616b635969694b6b000000000000000000000000000000
Arg [17] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [18] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [19] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [20] : 00000000000000000000000061bf7b7bfbc55ddb551769a2ae8b3f98c25614e4
Arg [21] : 00000000000000000000000073b5ac2bbc29778b8114150e0ef07d6379868daf
Arg [22] : 0000000000000000000000000a83b3cf4519642615f5c2cff55184e23906dc5f
Arg [23] : 000000000000000000000000b07edfa58675f0f6072d2d0fe76d3bb3a7396a10
Arg [24] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [25] : 000000000000000000000000000000000000000000000000000000000000001b
Arg [26] : 000000000000000000000000000000000000000000000000000000000000001b
Arg [27] : 000000000000000000000000000000000000000000000000000000000000001c
Arg [28] : 0000000000000000000000000000000000000000000000000000000000000012
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.