ERC-721
Overview
Max Total Supply
3,333 YOK
Holders
1,040
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
3 YOKLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Otoro
Compiler Version
v0.8.14+commit.80d49f37
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.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"; contract Otoro is Ownable, ERC721, ERC721Enumerable, ReentrancyGuard, Roles, Revealable, BlockbasedSale, RequestSigning { 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(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(_ogClaimed[msg.sender] == 0, "Already Claimed OG."); require( totalPrivateSaleMinted().add(1) <= privateSaleCapped, "Exceed Private Sale Limit" ); require(msg.value >= getPriceByMode(), "Insufficient funds."); _ogClaimed[msg.sender] = _ogClaimed[msg.sender] + 1; saleStats.totalOGMinted = saleStats.totalOGMinted.add(1); _mintToken(msg.sender, 1); 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 ) internal virtual override(ERC721, ERC721Enumerable) { super._beforeTokenTransfer(from, to, tokenId); } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) { return super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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. * * `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 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 totalReceived = address(this).balance + totalReleased(); uint256 payment = _pendingPayment(account, totalReceived, released(account)); require(payment != 0, "PaymentSplitter: account is not due payment"); _released[account] += payment; _totalReleased += 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 totalReceived = token.balanceOf(address(this)) + totalReleased(token); uint256 payment = _pendingPayment(account, totalReceived, released(token, account)); require(payment != 0, "PaymentSplitter: account is not due payment"); _erc20Released[token][account] += payment; _erc20TotalReleased[token] += 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.6.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: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be 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 owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _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: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || 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); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {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 Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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 Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT 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); 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) { seed = randomNumber; emit RandomseedFulfilmentSuccess(block.timestamp, requestId, seed); } else { seed = 1; emit RandomseedFulfilmentFail(block.timestamp, requestId); } } function isRevealed() public view returns (bool) { return seed > 0 && revealBlock > 0 && block.number > revealBlock; } 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 // OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.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)); } } /** * @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.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (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 (last updated v4.6.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 be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev 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.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 v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT 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.5.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 } 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"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' 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) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ 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. 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 if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } 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 (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // 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)); } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"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 Otoro.ChainLinkParams","name":"chainLinkParams","type":"tuple"},{"components":[{"internalType":"address[]","name":"payees","type":"address[]"},{"internalType":"uint256[]","name":"shares","type":"uint256[]"}],"internalType":"struct Otoro.RevenueShareParams","name":"revenueShare","type":"tuple"}],"stateMutability":"nonpayable","type":"constructor"},{"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"}],"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":[{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"airdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"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 Otoro.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":"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":"_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
60c0604052601a805461ffff191690556127106025556706f05b59d3b200006027819055602855602c80546001600160a01b0319908116909155602d805490911690553480156200004f57600080fd5b50604051620078373803806200783783398101604081905262000072916200066f565b8151602083015160408401516001600160a01b0380841660a05282166080528892869290918b85620000a4336200024d565b8151620000b99060029060208501906200029f565b508051620000cf9060039060208401906200029f565b50506001600c55508351620000ec9060139060208701906200029f565b50600f555050604080518082018252600981526815da1a5d195b1a5cdd60ba1b60208083019190915291517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f935062000149928592910162000751565b60408051808303601f190181528282528051602091820120838301835260018452603160f81b938201939093528151908101939093528201527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160408051601f19818403018152908290528051602091820120602e5583519084015190925090620001e8906200032e565b620001f592919062000784565b604051809103906000f08015801562000212573d6000803e3d6000fd5b50603180546001600160a01b0319166001600160a01b0392909216919091179055505050602591909155602881905560295550620008489050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620002ad906200080c565b90600052602060002090601f016020900481019282620002d157600085556200031c565b82601f10620002ec57805160ff19168380011785556200031c565b828001600101855582156200031c579182015b828111156200031c578251825591602001919060010190620002ff565b506200032a9291506200033c565b5090565b61116080620066d783390190565b5b808211156200032a57600081556001016200033d565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b03811182821017156200038e576200038e62000353565b60405290565b604051601f8201601f191681016001600160401b0381118282101715620003bf57620003bf62000353565b604052919050565b60005b83811015620003e4578181015183820152602001620003ca565b83811115620003f4576000848401525b50505050565b600082601f8301126200040c57600080fd5b81516001600160401b0381111562000428576200042862000353565b6200043d601f8201601f191660200162000394565b8181528460208386010111156200045357600080fd5b62000466826020830160208701620003c7565b949350505050565b80516001600160a01b03811681146200048657600080fd5b919050565b6000606082840312156200049e57600080fd5b604051606081016001600160401b0381118282101715620004c357620004c362000353565b604052905080620004d4836200046e565b8152620004e4602084016200046e565b6020820152604083015160408201525092915050565b60006001600160401b0382111562000516576200051662000353565b5060051b60200190565b600082601f8301126200053257600080fd5b815160206200054b6200054583620004fa565b62000394565b82815260059290921b840181019181810190868411156200056b57600080fd5b8286015b848110156200058857805183529183019183016200056f565b509695505050505050565b600060408284031215620005a657600080fd5b620005b062000369565b82519091506001600160401b0380821115620005cb57600080fd5b818401915084601f830112620005e057600080fd5b81516020620005f36200054583620004fa565b82815260059290921b840181019181810190888411156200061357600080fd5b948201945b838610156200063c576200062c866200046e565b8252948201949082019062000618565b865250858101519350828411156200065357600080fd5b620006618785880162000520565b818601525050505092915050565b6000806000806000806000610120888a0312156200068c57600080fd5b87516001600160401b0380821115620006a457600080fd5b620006b28b838c01620003fa565b985060208a0151915080821115620006c957600080fd5b620006d78b838c01620003fa565b975060408a0151965060608a0151955060808a0151915080821115620006fc57600080fd5b6200070a8b838c01620003fa565b94506200071b8b60a08c016200048b565b93506101008a01519150808211156200073357600080fd5b50620007428a828b0162000593565b91505092959891949750929550565b6000835162000765818460208801620003c7565b8351908301906200077b818360208801620003c7565b01949350505050565b604080825283519082018190526000906020906060840190828701845b82811015620007c85781516001600160a01b031684529284019290840190600101620007a1565b5050508381038285015284518082528583019183019060005b81811015620007ff57835183529284019291840191600101620007e1565b5090979650505050505050565b600181811c908216806200082157607f821691505b6020821081036200084257634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a051615e5b6200087c6000396000818161353d0152614923015260008181613bb101526148f40152615e5b6000f3fe6080604052600436106105235760003560e01c8063791a2519116102a2578063c67e8b6811610165578063dddb91ba116100cc578063efc4bc7c11610085578063efc4bc7c14610fd8578063f15c85b414610fee578063f2fde38b1461100e578063f3b3a9fa1461102e578063f698da2514611044578063fa4d280c1461105a57600080fd5b8063dddb91ba14610ecd578063df20ad8f14610eed578063dfe363ef14610f2e578063e4f2487a14610f43578063e83d508b14610f6f578063e985e9c514610f8f57600080fd5b8063d1fe033d1161011e578063d1fe033d14610e20578063d2c1f20614610e35578063d5abeb0114610e4a578063d5b1ae5e14610e60578063da1b9e0814610e8d578063da324a3014610ead57600080fd5b8063c67e8b6814610d8c578063c87b56dd14610dac578063c91621c214610dcc578063c9a8d9f714610de1578063ccc5d84714610df6578063d0b77ab414610e0b57600080fd5b806395d89b4111610209578063b6eb6d69116101c2578063b6eb6d6914610ce6578063b78ef4cb14610d06578063b88d4fde14610d1c578063ba1f879f14610d3c578063be008ccb14610d57578063c204642c14610d6c57600080fd5b806395d89b4114610c445780639b154a7114610c595780639da0d7d414610c6e578063a22cb46514610c89578063a2fb7b5d14610ca9578063aab4b09e14610cd057600080fd5b8063870843131161025b5780638708431314610b9d5780638da5cb5b14610bbd5780639024fc9614610bdb57806390aa0b0f14610bf0578063933edbb814610c0b57806394985ddd14610c2457600080fd5b8063791a251914610ad8578063792bce7014610af85780637a9e1d0314610b185780637bd07f8b14610b385780637d94792a14610b725780637ee7866114610b8857600080fd5b806333bc1c5c116103ea5780635626e404116103515780636c635d3f1161030a5780636c635d3f14610a395780636e83843a14610a5957806370a0823114610a79578063715018a614610a9957806373b19e8f14610aae578063776451b014610ac357600080fd5b80635626e404146109a55780635e9f9613146109c557806361728f39146109da5780636238e9f4146109f05780636352211e14610a0357806366bb81c714610a2357600080fd5b80634256dbe3116103a35780634256dbe3146108fb57806342842e0e1461091b578063447321801461093b57806349aaa5d9146109505780634f6ccce71461097057806354214f691461099057600080fd5b806333bc1c5c146108565780633584602814610886578063398c0ec11461089c5780633a367a67146108b15780633ccfd60b146108c65780633da65fc1146108db57600080fd5b8063191655871161048e578063276f1c4111610447578063276f1c41146107ab5780632da5ea17146107cb5780632ee723fb146107e05780632f1d5a60146107f65780632f745c591461081657806330878ba91461083657600080fd5b806319165587146106f65780631bae492e146107165780631cbe14c91461073657806320510b55146107565780632316b4da1461077657806323b872dd1461078b57600080fd5b80630f30cde0116104e05780630f30cde01461061d5780631197705e14610630578063127effb214610650578063166ca2bc1461067057806318160ddd146106bf5780631865c57d146106d457600080fd5b806301ffc9a71461052857806302410f471461055d578063031ab9f51461057e57806306fdde03146105a1578063081812fc146105c3578063095ea7b3146105fb575b600080fd5b34801561053457600080fd5b506105486105433660046153c0565b61108e565b60405190151581526020015b60405180910390f35b34801561056957600080fd5b50600e5461054890600160a01b900460ff1681565b34801561058a57600080fd5b5061059361109f565b604051908152602001610554565b3480156105ad57600080fd5b506105b6611125565b6040516105549190615435565b3480156105cf57600080fd5b506105e36105de366004615448565b6111b7565b6040516001600160a01b039091168152602001610554565b34801561060757600080fd5b5061061b610616366004615476565b611251565b005b61054861062b3660046154e4565b611366565b34801561063c57600080fd5b5061061b61064b366004615530565b611972565b34801561065c57600080fd5b50600d546105e3906001600160a01b031681565b34801561067c57600080fd5b50601e54601f54602054602154602254610697949392919085565b604080519586526020860194909452928401919091526060830152608082015260a001610554565b3480156106cb57600080fd5b50600a54610593565b3480156106e057600080fd5b506106e9611a30565b6040516105549190615563565b34801561070257600080fd5b5061061b610711366004615530565b611c94565b34801561072257600080fd5b50602c546105e3906001600160a01b031681565b34801561074257600080fd5b5061061b61075136600461557d565b611e61565b34801561076257600080fd5b5061061b610771366004615530565b611ed3565b34801561078257600080fd5b5061061b611f47565b34801561079757600080fd5b5061061b6107a636600461559f565b611fab565b3480156107b757600080fd5b50600e546105e3906001600160a01b031681565b3480156107d757600080fd5b50610548611fdc565b3480156107ec57600080fd5b50610593602b5481565b34801561080257600080fd5b5061061b610811366004615530565b612029565b34801561082257600080fd5b50610593610831366004615476565b6120e7565b34801561084257600080fd5b506105b66108513660046155e0565b61217d565b34801561086257600080fd5b50601854601954610871919082565b60408051928352602083019190915201610554565b34801561089257600080fd5b5061059360295481565b3480156108a857600080fd5b506105936123b2565b3480156108bd57600080fd5b506105b661248d565b3480156108d257600080fd5b5061061b61251b565b3480156108e757600080fd5b506105486108f6366004615612565b6125a5565b34801561090757600080fd5b5061061b610916366004615448565b61261d565b34801561092757600080fd5b5061061b61093636600461559f565b61267c565b34801561094757600080fd5b5061061b612697565b34801561095c57600080fd5b5061061b61096b366004615448565b6126f6565b34801561097c57600080fd5b5061059361098b366004615448565b612755565b34801561099c57600080fd5b506105486127e8565b3480156109b157600080fd5b5061061b6109c0366004615448565b61280f565b3480156109d157600080fd5b5061059361286e565b3480156109e657600080fd5b50610593600f5481565b6105486109fe366004615612565b612880565b348015610a0f57600080fd5b506105e3610a1e366004615448565b612b30565b348015610a2f57600080fd5b5061059360105481565b348015610a4557600080fd5b5061061b610a54366004615448565b612ba7565b348015610a6557600080fd5b5061061b610a743660046156f3565b612c06565b348015610a8557600080fd5b50610593610a94366004615530565b612c73565b348015610aa557600080fd5b5061061b612cfa565b348015610aba57600080fd5b50610593612d30565b348015610acf57600080fd5b50610593612ddd565b348015610ae457600080fd5b5061061b610af3366004615448565b612e55565b348015610b0457600080fd5b5061061b610b1336600461573c565b612eb4565b348015610b2457600080fd5b50610548610b33366004615612565b612f33565b348015610b4457600080fd5b50601b54601c54601d54610b5792919083565b60408051938452602084019290925290820152606001610554565b348015610b7e57600080fd5b5061059360115481565b348015610b9457600080fd5b506105b6612f9a565b348015610ba957600080fd5b5061061b610bb8366004615768565b6134b1565b348015610bc957600080fd5b506001546001600160a01b03166105e3565b348015610be757600080fd5b50610593613520565b348015610bfc57600080fd5b50602354602454610871919082565b348015610c1757600080fd5b50601f54602b5414610548565b348015610c3057600080fd5b5061061b610c3f36600461557d565b613532565b348015610c5057600080fd5b506105b66135b8565b348015610c6557600080fd5b506105b66135c7565b348015610c7a57600080fd5b50601454601554610871919082565b348015610c9557600080fd5b5061061b610ca43660046157c5565b6135d4565b348015610cb557600080fd5b50601a54610cc39060ff1681565b60405161055491906157fe565b348015610cdc57600080fd5b5061059360275481565b348015610cf257600080fd5b5061061b610d01366004615530565b6135df565b348015610d1257600080fd5b5061059360285481565b348015610d2857600080fd5b5061061b610d37366004615812565b613653565b348015610d4857600080fd5b50601654601754610871919082565b348015610d6357600080fd5b5061061b61368b565b348015610d7857600080fd5b5061061b610d87366004615892565b6136ed565b348015610d9857600080fd5b5061061b610da7366004615768565b6138a1565b348015610db857600080fd5b506105b6610dc7366004615448565b613910565b348015610dd857600080fd5b50610593613a38565b348015610ded57600080fd5b50610593613a8e565b348015610e0257600080fd5b5061061b613b0e565b348015610e1757600080fd5b50610548613cca565b348015610e2c57600080fd5b5061061b613cdd565b348015610e4157600080fd5b5061061b613d41565b348015610e5657600080fd5b5061059360255481565b348015610e6c57600080fd5b50610e80610e7b366004615530565b613da5565b604051610554919061594a565b348015610e9957600080fd5b5061061b610ea83660046156f3565b613e31565b348015610eb957600080fd5b5061061b610ec8366004615448565b613ee6565b348015610ed957600080fd5b5061061b610ee8366004615768565b613f45565b348015610ef957600080fd5b50610f0d610f08366004615476565b613fb3565b604080516001600160801b03909316835260ff909116602083015201610554565b348015610f3a57600080fd5b5061061b613ff6565b348015610f4f57600080fd5b50601a54610f6290610100900460ff1681565b60405161055491906159a5565b348015610f7b57600080fd5b5061061b610f8a366004615448565b614058565b348015610f9b57600080fd5b50610548610faa3660046159b9565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b348015610fe457600080fd5b50610593602a5481565b348015610ffa57600080fd5b50602d546105e3906001600160a01b031681565b34801561101a57600080fd5b5061061b611029366004615530565b6140b7565b34801561103a57600080fd5b5061059360265481565b34801561105057600080fd5b50610593602e5481565b34801561106657600080fd5b506105937f68e83002b91b0fd96d4df3566b5122221117e3ec6c2468fda594f6491f89b1c981565b600061109982614152565b92915050565b60006001601a54610100900460ff1660038111156110bf576110bf61554d565b036110cb575060155490565b6002601a54610100900460ff1660038111156110e9576110e961554d565b036110f5575060175490565b6003601a54610100900460ff1660038111156111135761111361554d565b0361111f575060195490565b50600090565b606060028054611134906159e7565b80601f0160208091040260200160405190810160405280929190818152602001828054611160906159e7565b80156111ad5780601f10611182576101008083540402835291602001916111ad565b820191906000526020600020905b81548152906001019060200180831161119057829003601f168201915b5050505050905090565b6000818152600460205260408120546001600160a01b03166112355760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061125c82612b30565b9050806001600160a01b0316836001600160a01b0316036112c95760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161122c565b336001600160a01b03821614806112e557506112e58133610faa565b6113575760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606482015260840161122c565b6113618383614177565b505050565b60006002600c540361138a5760405162461bcd60e51b815260040161122c90615a21565b6002600c556000611399611a30565b90503332146113e55760405162461bcd60e51b815260206004820152601860248201527721b7b73a3930b1ba1034b9903737ba1030b63637bbb2b21760411b604482015260640161122c565b60088160118111156113f9576113f961554d565b14806114165750600d8160118111156114145761141461554d565b145b80611432575060038160118111156114305761143061554d565b145b6114745760405162461bcd60e51b815260206004820152601360248201527229b0b632903737ba1030bb30b4b630b136329760691b604482015260640161122c565b61148661147f6123b2565b86906141e5565b3410156114cb5760405162461bcd60e51b815260206004820152601360248201527224b739bab33334b1b4b2b73a10333ab732399760691b604482015260640161122c565b60038160118111156114df576114df61554d565b0361158d576023548511156115365760405162461bcd60e51b815260206004820152601f60248201527f4d696e7420657863656564207472616e73616374696f6e206c696d6974732e00604482015260640161122c565b602b54601f5461154690876141f8565b111561158d5760405162461bcd60e51b8152602060048201526016602482015275283ab931b430b9b29032bc31b2b2b2103634b6b4ba1760511b604482015260640161122c565b600d8160118111156115a1576115a161554d565b03611667576024548511156115f85760405162461bcd60e51b815260206004820152601f60248201527f4d696e7420657863656564207472616e73616374696f6e206c696d6974732e00604482015260640161122c565b60255461161961160661286e565b61161388611613600a5490565b906141f8565b11156116675760405162461bcd60e51b815260206004820152601b60248201527f507572636861736520657863656564206d617820737570706c792e0000000000604482015260640161122c565b600881601181111561167b5761167b61554d565b036117e35761168a84846125a5565b6116c95760405162461bcd60e51b815260206004820152601060248201526f2737ba103bb434ba32b634b9ba32b21760811b604482015260640161122c565b600285111561171a5760405162461bcd60e51b815260206004820152601e60248201527f4d696e7420657863656564207472616e73616374696f6e206c696d6974730000604482015260640161122c565b336000908152602f6020526040902054600290611738908790615a6e565b11156117865760405162461bcd60e51b815260206004820152601f60248201527f4d696e74206c696d6974207065722077616c6c65742065786365656465642e00604482015260640161122c565b602a5461179586611613613520565b11156117e35760405162461bcd60e51b815260206004820152601c60248201527f5075726368617365206578636565642073616c65206361707065642e00000000604482015260640161122c565b6117ed3386614204565b5060038160118111156118025761180261554d565b036118a857601f5461181490866141f8565b601f556000611823348761428f565b33600090815260326020908152604080832081518083019092526001600160801b03808616835260ff808d1684860190815283546001810185559387529490952092519290910180549351909416600160801b0270ffffffffffffffffffffffffffffffffff199093169116171790556029549091508110156118a65760298190555b505b600d8160118111156118bc576118bc61554d565b036118d2576022546118ce90866141f8565b6022555b60088160118111156118e6576118e661554d565b0361192757336000908152602f6020526040902054611906908690615a6e565b336000908152602f602052604090205560215461192390866141f8565b6021555b6031546040516001600160a01b03909116903480156108fc02916000818181858888f19350505050158015611960573d6000803e3d6000fd5b5060019150506001600c559392505050565b6001546001600160a01b0316331461199c5760405162461bcd60e51b815260040161122c90615a86565b6001600160a01b0381166119e65760405162461bcd60e51b8152602060048201526011602482015270043616e6e6f742061737369676e2030783607c1b604482015260640161122c565b600e80546001600160a01b0319166001600160a01b0383169081179091556040517f5b92f2f101ec36b062768cd1330146da74961809b300919c88c6853ca703261590600090a250565b60006002601a5460ff166002811115611a4b57611a4b61554d565b03611a565750601190565b6001601a5460ff166002811115611a6f57611a6f61554d565b03611a7a5750601090565b6000601a54610100900460ff166003811115611a9857611a9861554d565b03611aa35750600090565b6003601a54610100900460ff166003811115611ac157611ac161554d565b03611b5a57611ace611fdc565b15611ad95750600f90565b60195415801590611aeb575060195443115b15611af65750600e90565b60185415801590611b0957506018544310155b15611b145750600d90565b60185415801590611b26575060185443105b8015611b33575060175443115b15611b3e5750600c90565b601854158015611b4f575060175443115b15611b5a5750600b90565b6002601a54610100900460ff166003811115611b7857611b7861554d565b03611bf857611b85613cca565b15611b905750600a90565b60175415801590611ba2575060175443115b15611bad5750600990565b60165415801590611bc057506016544310155b15611bcb5750600890565b60165415801590611bdd575060165443105b15611be85750600790565b601654600003611bf85750600690565b6001601a54610100900460ff166003811115611c1657611c1661554d565b0361111f57601f54602b5403611c2c5750600590565b60155415801590611c3e575060155443115b15611c495750600490565b60145415801590611c5c57506014544310155b15611c675750600390565b60145415801590611c79575060145443105b15611c845750600290565b60145460000361111f5750600190565b60315460405163673e156160e11b81523360048201526000916001600160a01b03169063ce7c2ac290602401602060405180830381865afa158015611cdd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d019190615abb565b1180611d1757506001546001600160a01b031633145b611d5b5760405162461bcd60e51b81526020600482015260156024820152743737ba1039b430b932b437b63232b917b7bbb732b960591b604482015260640161122c565b336001600160a01b0382161480611d7c57506001546001600160a01b031633145b611dc15760405162461bcd60e51b81526020600482015260166024820152752932b632b0b9b29d103737903832b936b4b9b9b4b7b760511b604482015260640161122c565b603154604051631916558760e01b81526001600160a01b03838116600483015290911690631916558790602401600060405180830381600087803b158015611e0857600080fd5b505af1158015611e1c573d6000803e3d6000fd5b50506040516001600160a01b03841681527f7955210193a82a2c13259e4b48f1e8b90a4170115a1021fdae0570d045bba205925060200190505b60405180910390a150565b600d546001600160a01b03163314611e8b5760405162461bcd60e51b815260040161122c90615ad4565b6023829055602481905560408051838152602081018390527f97720c97a8962cb9a18ee69ad344acb999cca0250317bc9b023bb6badad22e1391015b60405180910390a15050565b600d546001600160a01b03163314611efd5760405162461bcd60e51b815260040161122c90615ad4565b602c80546001600160a01b0319166001600160a01b0383169081179091556040517fb01190fe4bf51f48a33625333c07da1825c9f14d04cff4433b6e056c9dc2033a90600090a250565b600d546001600160a01b03163314611f715760405162461bcd60e51b815260040161122c90615ad4565b601a805461ff0019166103001790556040517fca29b392f61fad3260f009b6fc1de9d8efda05563601b6c91396b795eeefff2e90600090a1565b611fb5338261429b565b611fd15760405162461bcd60e51b815260040161122c90615b04565b611361838383614391565b600080602654602554611fef9190615b55565b602154602054602254601f5493945060009361200b9190615a6e565b6120159190615a6e565b61201f9190615a6e565b9190911492915050565b6001546001600160a01b031633146120535760405162461bcd60e51b815260040161122c90615a86565b6001600160a01b03811661209d5760405162461bcd60e51b8152602060048201526011602482015270043616e6e6f742061737369676e2030783607c1b604482015260640161122c565b600d80546001600160a01b0319166001600160a01b0383169081179091556040517fa508d3b137dbcdf7e06f84833fe4aca137451e1e3309f454a207d8fb85c2ccd890600090a250565b60006120f283612c73565b82106121545760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b606482015260840161122c565b506001600160a01b03919091166000908152600860209081526040808320938352929052205490565b60606121916001546001600160a01b031690565b6001600160a01b0316336001600160a01b0316146121ec57848311156121ec5760405162461bcd60e51b815260206004820152601060248201526f546f6b656e206e6f742065786973747360801b604482015260640161122c565b6121f46127e8565b61221c5750604080518082019091526007815266191959985d5b1d60ca1b60208201526123aa565b6000612229856001615a6e565b67ffffffffffffffff81111561224157612241615654565b60405190808252806020026020018201604052801561226a578160200160208202803683370190505b50905060015b8581116122a7578082828151811061228a5761228a615b6c565b60209081029190910101526122a0600182615a6e565b9050612270565b50825b85811161238357600086601154836040516020016122d2929190918252602082015260400190565b6040516020818303038152906040528051906020012060001c6122f59190615b98565b612300906001615a6e565b905082818151811061231457612314615b6c565b602002602001015183838151811061232e5761232e615b6c565b602002602001015184848151811061234857612348615b6c565b6020026020010185848151811061236157612361615b6c565b6020908102919091010191909152525061237c600182615a6e565b90506122aa565b506123a681858151811061239957612399615b6c565b6020026020010151614538565b9150505b949350505050565b6000806123bd611a30565b905060038160118111156123d3576123d361554d565b03612443576014546000906123e89043615b55565b601d54601b5491925060009161240a919061240490859061428f565b906141e5565b601c5460285491925061241d9190614639565b811061242e575050601c5492915050565b60285461243b9082614639565b935050505090565b60088160118111156124575761245761554d565b0361246457505060275490565b600d8160118111156124785761247861554d565b0361248557505060285490565b505060285490565b6013805461249a906159e7565b80601f01602080910402602001604051908101604052809291908181526020018280546124c6906159e7565b80156125135780601f106124e857610100808354040283529160200191612513565b820191906000526020600020905b8154815290600101906020018083116124f657829003601f168201915b505050505081565b600d546001600160a01b031633146125455760405162461bcd60e51b815260040161122c90615ad4565b6040514790339082156108fc029083906000818181858888f19350505050158015612574573d6000803e3d6000fd5b506040518181527f807631352cb3389b100202fae783b0b18fedc90bd3a438433796cb89462f4fad90602001611e56565b602c546000906001600160a01b03166125f65760405162461bcd60e51b815260206004820152601360248201527215d3081ad95e481b9bdd08185cdcda59db9959606a1b604482015260640161122c565b602c546001600160a01b031661260c8484614645565b6001600160a01b0316149392505050565b600d546001600160a01b031633146126475760405162461bcd60e51b815260040161122c90615ad4565b60268190556040518181527fe1fb8f58d0fe8f41debc65095588c6530f5b3c96964aee78a164712c7ab7cb3f90602001611e56565b61136183838360405180602001604052806000815250613653565b600d546001600160a01b031633146126c15760405162461bcd60e51b815260040161122c90615ad4565b601a805460ff191690556040517f4f0f641a7e3d2c654d00279745eb7cf977b86891e3c7dd11cf315972d02089ce90600090a1565b600d546001600160a01b031633146127205760405162461bcd60e51b815260040161122c90615ad4565b60278190556040518181527f8ea69d9e909b68c4f14f78ed645aa5bb6e5aaa632c8e2f365618f51f6e10373290602001611e56565b6000612760600a5490565b82106127c35760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b606482015260840161122c565b600a82815481106127d6576127d6615b6c565b90600052602060002001549050919050565b6000806011541180156127fd57506000601054115b801561280a575060105443115b905090565b600d546001600160a01b031633146128395760405162461bcd60e51b815260040161122c90615ad4565b602a8190556040518181527fee53f3111b00616aa0a325f68aaf488d4433b7f00ea57bdfe5346fb08899c1aa90602001611e56565b601e5460265460009161280a91615b55565b60006002600c54036128a45760405162461bcd60e51b815260040161122c90615a21565b6002600c553332146128f35760405162461bcd60e51b815260206004820152601860248201527721b7b73a3930b1ba1034b9903737ba1030b63637bbb2b21760411b604482015260640161122c565b60086128fd611a30565b601181111561290e5761290e61554d565b146129515760405162461bcd60e51b815260206004820152601360248201527229b0b632903737ba1030bb30b4b630b136329760691b604482015260640161122c565b61295b8383612f33565b61299d5760405162461bcd60e51b81526020600482015260136024820152722737ba1027a3903bb434ba32b634b9ba32b21760691b604482015260640161122c565b33600090815260306020526040902054156129f05760405162461bcd60e51b815260206004820152601360248201527220b63932b0b23c9021b630b4b6b2b21027a39760691b604482015260640161122c565b602a54612a006001611613613520565b1115612a4e5760405162461bcd60e51b815260206004820152601960248201527f45786365656420507269766174652053616c65204c696d697400000000000000604482015260640161122c565b612a566123b2565b341015612a9b5760405162461bcd60e51b815260206004820152601360248201527224b739bab33334b1b4b2b73a10333ab732399760691b604482015260640161122c565b33600090815260306020526040902054612ab6906001615a6e565b3360009081526030602090815260409091209190915554612ad89060016141f8565b602055612ae6336001614204565b506031546040516001600160a01b03909116903480156108fc02916000818181858888f19350505050158015612b20573d6000803e3d6000fd5b50600190506001600c5592915050565b6000818152600460205260408120546001600160a01b0316806110995760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b606482015260840161122c565b600d546001600160a01b03163314612bd15760405162461bcd60e51b815260040161122c90615ad4565b60298190556040518181527f98302d1de36f493ad21f68a7d43aada3c922bcde2576a9db30b75187321cabfc90602001611e56565b600d546001600160a01b03163314612c305760405162461bcd60e51b815260040161122c90615ad4565b8051612c43906012906020840190615311565b507fda0697149924c38db1462c9de1c03a46ce996f35d278fcf8dc4a76eb1065dc2e81604051611e569190615435565b60006001600160a01b038216612cde5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b606482015260840161122c565b506001600160a01b031660009081526005602052604090205490565b6001546001600160a01b03163314612d245760405162461bcd60e51b815260040161122c90615a86565b612d2e6000614719565b565b600080612d3b611a30565b90506003816011811115612d5157612d5161554d565b03612d5e575050602b5490565b6008816011811115612d7257612d7261554d565b03612d7f575050602a5490565b600d816011811115612d9357612d9361554d565b03612dd557601f54602654602154602054602554612db19190615b55565b612dbb9190615b55565b612dc59190615b55565b612dcf9190615b55565b91505090565b600091505090565b600080612de8611a30565b90506008816011811115612dfe57612dfe61554d565b03612e1357602154602054612dcf9190615a6e565b600d816011811115612e2757612e2761554d565b03612e3457505060225490565b6003816011811115612e4857612e4861554d565b03612dd5575050601f5490565b600d546001600160a01b03163314612e7f5760405162461bcd60e51b815260040161122c90615ad4565b60288190556040518181527ff959ca468c08c9457955f238a0ad6a31fc63f09b1e9bbafb4e409f19163bbe1490602001611e56565b600d546001600160a01b03163314612ede5760405162461bcd60e51b815260040161122c90615ad4565b601b839055601c829055601d81905560408051848152602081018490529081018290527f25712bfd18ae9c5dd63c26ade669b68a324cfbe3e863cdc207d2a06e9727d3929060600160405180910390a1505050565b602d546000906001600160a01b0316612f845760405162461bcd60e51b815260206004820152601360248201527213d1c81ad95e481b9bdd08185cdcda59db9959606a1b604482015260640161122c565b602d546001600160a01b031661260c8484614645565b60606000612fa6611a30565b90506001816011811115612fbc57612fbc61554d565b03612ffa57505060408051808201909152601e81527f447574636841756374696f6e4265666f7265576974686f7574426c6f636b0000602082015290565b600281601181111561300e5761300e61554d565b0361304c57505060408051808201909152601b81527f447574636841756374696f6e4265666f726557697468426c6f636b0000000000602082015290565b60038160118111156130605761306061554d565b03613093575050604080518082019091526012815271447574636841756374696f6e447572696e6760701b602082015290565b60048160118111156130a7576130a761554d565b036130d757505060408051808201909152600f81526e111d5d18da105d58dd1a5bdb915b99608a1b602082015290565b60058160118111156130eb576130eb61554d565b03613122575050604080518082019091526016815275111d5d18da105d58dd1a5bdb915b9914dbdb1913dd5d60521b602082015290565b60068160118111156131365761313661554d565b0361317457505060408051808201909152601d81527f5072697661746553616c654265666f7265576974686f7574426c6f636b000000602082015290565b60078160118111156131885761318861554d565b036131c657505060408051808201909152601a81527f5072697661746553616c654265666f726557697468426c6f636b000000000000602082015290565b60088160118111156131da576131da61554d565b0361320c5750506040805180820190915260118152705072697661746553616c65447572696e6760781b602082015290565b60098160118111156132205761322061554d565b0361324f57505060408051808201909152600e81526d141c9a5d985d1954d85b19515b9960921b602082015290565b600a8160118111156132635761326361554d565b03613299575050604080518082019091526015815274141c9a5d985d1954d85b19515b9914dbdb1913dd5d605a1b602082015290565b600b8160118111156132ad576132ad61554d565b036132eb57505060408051808201909152601c81527f5075626c696353616c654265666f7265576974686f7574426c6f636b00000000602082015290565b600c8160118111156132ff576132ff61554d565b0361333d57505060408051808201909152601981527f5075626c696353616c654265666f726557697468426c6f636b00000000000000602082015290565b600d8160118111156133515761335161554d565b0361338257505060408051808201909152601081526f5075626c696353616c65447572696e6760801b602082015290565b600e8160118111156133965761339661554d565b036133c457505060408051808201909152600d81526c141d589b1a58d4d85b19515b99609a1b602082015290565b600f8160118111156133d8576133d861554d565b0361340d575050604080518082019091526014815273141d589b1a58d4d85b19515b9914dbdb1913dd5d60621b602082015290565b60108160118111156134215761342161554d565b0361344b575050604080518082019091526009815268506175736553616c6560b81b602082015290565b601181601181111561345f5761345f61554d565b0361348b57505060408051808201909152600b81526a105b1b14d85b195cd15b9960aa1b602082015290565b505060408051808201909152600a815269139bdd14dd185c9d195960b21b602082015290565b600d546001600160a01b031633146134db5760405162461bcd60e51b815260040161122c90615ad4565b80516014819055602080830151601581905560408051938452918301527f46b9f9d83ded22a38ee2e31b09c026a8c683dd2e9060de026c383b15a655f4fd9101611e56565b60205460215460009161280a91615a6e565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146135aa5760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c00604482015260640161122c565b6135b4828261476b565b5050565b606060038054611134906159e7565b6012805461249a906159e7565b6135b43383836147ef565b600d546001600160a01b031633146136095760405162461bcd60e51b815260040161122c90615ad4565b602d80546001600160a01b0319166001600160a01b0383169081179091556040517f14ac04b188e9f32c0e4b3ae39771c1c288169ca48b8bddc22be8bec64d12ba0a90600090a250565b61365d338361429b565b6136795760405162461bcd60e51b815260040161122c90615b04565b613685848484846148bd565b50505050565b600d546001600160a01b031633146136b55760405162461bcd60e51b815260040161122c90615ad4565b601a805460ff191660021790556040517f58abff1119ad7689f2843996246b31faf77e0a40545d5085ee99361a768a3f7d90600090a1565b6002600c540361370f5760405162461bcd60e51b815260040161122c90615a21565b6002600c55600d546001600160a01b0316331461373e5760405162461bcd60e51b815260040161122c90615ad4565b60255482516137599061375190846141e5565b600a54611613565b11156137a75760405162461bcd60e51b815260206004820152601860248201527f457863656564206d617820737570706c79206c696d69742e0000000000000000604482015260640161122c565b60265482516137c3906137ba90846141e5565b601e54906141f8565b11156138095760405162461bcd60e51b815260206004820152601560248201527424b739bab33334b1b4b2b73a103932b9b2b93b329760591b604482015260640161122c565b8151613819906137ba90836141e5565b601e5560005b825181101561385e5761384b83828151811061383d5761383d615b6c565b602002602001015183614204565b508061385681615bac565b91505061381f565b507f08b3e41950189550b73643a90143efc8a526a17dc07e6abe0fb50ce7c10b50fc8282604051613890929190615bc5565b60405180910390a150506001600c55565b600d546001600160a01b031633146138cb5760405162461bcd60e51b815260040161122c90615ad4565b80516018819055602080830151601981905560408051938452918301527f70441bfeec4000206c01cb310438ec41bb281f98d8ea4f08f086e3329ff4eb299101611e56565b606061391b600a5490565b82111561395d5760405162461bcd60e51b815260206004820152601060248201526f2a37b5b2b7103737ba1032bc34b9ba1760811b604482015260640161122c565b6139656127e8565b6139f95760138054613976906159e7565b80601f01602080910402602001604051908101604052809291908181526020018280546139a2906159e7565b80156139ef5780601f106139c4576101008083540402835291602001916139ef565b820191906000526020600020905b8154815290600101906020018083116139d257829003601f168201915b5050505050611099565b6012613a12613a07600a5490565b60255485600161217d565b604051602001613a23929190615c32565b60405160208183030381529060405292915050565b60006003613a44611a30565b6011811115613a5557613a5561554d565b03613a61575060235490565b600d613a6b611a30565b6011811115613a7c57613a7c61554d565b03613a88575060245490565b50600290565b60006001601a54610100900460ff166003811115613aae57613aae61554d565b03613aba575060145490565b6002601a54610100900460ff166003811115613ad857613ad861554d565b03613ae4575060165490565b6003601a54610100900460ff166003811115613b0257613b0261554d565b0361111f575060185490565b600d546001600160a01b03163314613b385760405162461bcd60e51b815260040161122c90615ad4565b600e54600160a01b900460ff1615613b925760405162461bcd60e51b815260206004820152601f60248201527f436861696e6c696e6b2056524620616c72656164792072657175657374656400604482015260640161122c565b6040516370a0823160e01b8152306004820152671bc16d674ec80000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015613c00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c249190615abb565b1015613c665760405162461bcd60e51b8152602060048201526011602482015270496e73756666696369656e74204c494e4b60781b604482015260640161122c565b613c7a600f54671bc16d674ec800006148f0565b50600e805460ff60a01b1916600160a01b1790556040517f8bcef1354992d6b49befbd8ce23b2578ce493191f74c32b543d2f177962a139f90613cc09042815260200190565b60405180910390a1565b6000602a54613cd7613520565b14905090565b600d546001600160a01b03163314613d075760405162461bcd60e51b815260040161122c90615ad4565b601a805461ff0019166101001790556040517f82e232fa1250b177b43a967e555410ac1c850806b01cac8363fe6e94e7edfd0190600090a1565b600d546001600160a01b03163314613d6b5760405162461bcd60e51b815260040161122c90615ad4565b601a805461ff0019166102001790556040517f0913c47876f976a46ce9674a2e5a22679ebf61b03b7a333913652272a9262c7790600090a1565b6001600160a01b0381166000908152603260209081526040808320805482518185028101850190935280835260609492939192909184015b82821015613e2657600084815260209081902060408051808201909152908401546001600160801b0381168252600160801b900460ff1681830152825260019092019101613ddd565b505050509050919050565b600d546001600160a01b03163314613e5b5760405162461bcd60e51b815260040161122c90615ad4565b613e636127e8565b15613ea35760405162461bcd60e51b815260206004820152601060248201526f105b1c9958591e481c995d99585b195960821b604482015260640161122c565b8051613eb6906013906020840190615311565b507fb0cb658f6a70918635661157bac90270b4184dff76f6b90dfebdad09e29ce5eb81604051611e569190615435565b600d546001600160a01b03163314613f105760405162461bcd60e51b815260040161122c90615ad4565b60108190556040518181527ffd1cd879b90803328042915a0dab567886d80637d84c7875df6a3e4495c379ac90602001611e56565b600d546001600160a01b03163314613f6f5760405162461bcd60e51b815260040161122c90615ad4565b80516016819055602080830151601781905560408051938452918301527ea742ba61fbc2be98048a2bafed46ef5f837610c64f7a83e332b100f6aab0759101611e56565b60326020528160005260406000208181548110613fcf57600080fd5b6000918252602090912001546001600160801b0381169250600160801b900460ff16905082565b600d546001600160a01b031633146140205760405162461bcd60e51b815260040161122c90615ad4565b601a805460ff191660011790556040517f6d4e2212f1a4fcfebfe8fd91368752c56e02d80a28c18c5cce3d812cfcbcb4a790600090a1565b600d546001600160a01b031633146140825760405162461bcd60e51b815260040161122c90615ad4565b602b8190556040518181527febe3296c3cc674d6155214007876758ba86e54f6a760820db1bc6c3d2520523e90602001611e56565b6001546001600160a01b031633146140e15760405162461bcd60e51b815260040161122c90615a86565b6001600160a01b0381166141465760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161122c565b61414f81614719565b50565b60006001600160e01b0319821663780e9d6360e01b1480611099575061109982614a67565b600081815260066020526040902080546001600160a01b0319166001600160a01b03841690811790915581906141ac82612b30565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006141f18284615cec565b9392505050565b60006141f18284615a6e565b6000805b8281101561428557600061421b600a5490565b90506025548110156142725761423b85614236836001615a6e565b614ab7565b60405181906001600160a01b038716907fa512fb2532ca8587f236380171326ebb69670e86a2ba0c4412a3fcca4c3ada9b90600090a35b508061427d81615bac565b915050614208565b5060019392505050565b60006141f18284615d0b565b6000818152600460205260408120546001600160a01b03166143145760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161122c565b600061431f83612b30565b9050806001600160a01b0316846001600160a01b0316148061436657506001600160a01b0380821660009081526007602090815260408083209388168352929052205460ff165b806123aa5750836001600160a01b031661437f846111b7565b6001600160a01b031614949350505050565b826001600160a01b03166143a482612b30565b6001600160a01b0316146144085760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b606482015260840161122c565b6001600160a01b03821661446a5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161122c565b614475838383614ad1565b614480600082614177565b6001600160a01b03831660009081526005602052604081208054600192906144a9908490615b55565b90915550506001600160a01b03821660009081526005602052604081208054600192906144d7908490615a6e565b909155505060008181526004602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60608160000361455f5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115614589578061457381615bac565b91506145829050600a83615d0b565b9150614563565b60008167ffffffffffffffff8111156145a4576145a4615654565b6040519080825280601f01601f1916602001820160405280156145ce576020820181803683370190505b5090505b84156123aa576145e3600183615b55565b91506145f0600a86615b98565b6145fb906030615a6e565b60f81b81838151811061461057614610615b6c565b60200101906001600160f81b031916908160001a905350614632600a86615d0b565b94506145d2565b60006141f18284615b55565b602e54604080517f68e83002b91b0fd96d4df3566b5122221117e3ec6c2468fda594f6491f89b1c9602082015233918101919091526000918291606001604051602081830303815290604052805190602001206040516020016146bf92919061190160f01b81526002810192909252602282015260420190565b6040516020818303038152906040528051906020012090506123aa84848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508593925050614adc9050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80156147b457601181905560408051428152602081018490529081018290527f59e4c9bb1559d5420398abdcb1a7eb97cc4a7e27b2ae810b8d7f44fbc2327ffa90606001611ec7565b600160115560408051428152602081018490527fd9b030358bf0114e16959cea6c935e1cb862740b4d1056049f91711662fb3f959101611ec7565b816001600160a01b0316836001600160a01b0316036148505760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161122c565b6001600160a01b03838116600081815260076020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6148c8848484614391565b6148d484848484614b00565b6136855760405162461bcd60e51b815260040161122c90615d1f565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634000aea07f000000000000000000000000000000000000000000000000000000000000000084866000604051602001614960929190918252602082015260400190565b6040516020818303038152906040526040518463ffffffff1660e01b815260040161498d93929190615d71565b6020604051808303816000875af11580156149ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906149d09190615d98565b5060008381526020818152604080832054815180840188905280830185905230606082015260808082018390528351808303909101815260a090910190925281519183019190912086845292909152614a2a906001615a6e565b60008581526020818152604091829020929092558051808301879052808201849052815180820383018152606090910190915280519101206123aa565b60006001600160e01b031982166380ac58cd60e01b1480614a9857506001600160e01b03198216635b5e139f60e01b145b8061109957506301ffc9a760e01b6001600160e01b0319831614611099565b6135b4828260405180602001604052806000815250614bfe565b611361838383614c31565b6000806000614aeb8585614ce9565b91509150614af881614d57565b509392505050565b60006001600160a01b0384163b15614bf657604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290614b44903390899088908890600401615db5565b6020604051808303816000875af1925050508015614b7f575060408051601f3d908101601f19168201909252614b7c91810190615df2565b60015b614bdc573d808015614bad576040519150601f19603f3d011682016040523d82523d6000602084013e614bb2565b606091505b508051600003614bd45760405162461bcd60e51b815260040161122c90615d1f565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506123aa565b5060016123aa565b614c088383614f0d565b614c156000848484614b00565b6113615760405162461bcd60e51b815260040161122c90615d1f565b6001600160a01b038316614c8c57614c8781600a80546000838152600b60205260408120829055600182018355919091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80155565b614caf565b816001600160a01b0316836001600160a01b031614614caf57614caf838261505b565b6001600160a01b038216614cc657611361816150f8565b826001600160a01b0316826001600160a01b0316146113615761136182826151a7565b6000808251604103614d1f5760208301516040840151606085015160001a614d13878285856151eb565b94509450505050614d50565b8251604003614d485760208301516040840151614d3d8683836152d8565b935093505050614d50565b506000905060025b9250929050565b6000816004811115614d6b57614d6b61554d565b03614d735750565b6001816004811115614d8757614d8761554d565b03614dd45760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161122c565b6002816004811115614de857614de861554d565b03614e355760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161122c565b6003816004811115614e4957614e4961554d565b03614ea15760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161122c565b6004816004811115614eb557614eb561554d565b0361414f5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b606482015260840161122c565b6001600160a01b038216614f635760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161122c565b6000818152600460205260409020546001600160a01b031615614fc85760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161122c565b614fd460008383614ad1565b6001600160a01b0382166000908152600560205260408120805460019290614ffd908490615a6e565b909155505060008181526004602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000600161506884612c73565b6150729190615b55565b6000838152600960205260409020549091508082146150c5576001600160a01b03841660009081526008602090815260408083208584528252808320548484528184208190558352600990915290208190555b5060009182526009602090815260408084208490556001600160a01b039094168352600881528383209183525290812055565b600a5460009061510a90600190615b55565b6000838152600b6020526040812054600a805493945090928490811061513257615132615b6c565b9060005260206000200154905080600a838154811061515357615153615b6c565b6000918252602080832090910192909255828152600b9091526040808220849055858252812055600a80548061518b5761518b615e0f565b6001900381819060005260206000200160009055905550505050565b60006151b283612c73565b6001600160a01b039093166000908152600860209081526040808320868452825280832085905593825260099052919091209190915550565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561522257506000905060036152cf565b8460ff16601b1415801561523a57508460ff16601c14155b1561524b57506000905060046152cf565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561529f573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166152c8576000600192509250506152cf565b9150600090505b94509492505050565b6000806001600160ff1b038316816152f560ff86901c601b615a6e565b9050615303878288856151eb565b935093505050935093915050565b82805461531d906159e7565b90600052602060002090601f01602090048101928261533f5760008555615385565b82601f1061535857805160ff1916838001178555615385565b82800160010185558215615385579182015b8281111561538557825182559160200191906001019061536a565b50615391929150615395565b5090565b5b808211156153915760008155600101615396565b6001600160e01b03198116811461414f57600080fd5b6000602082840312156153d257600080fd5b81356141f1816153aa565b60005b838110156153f85781810151838201526020016153e0565b838111156136855750506000910152565b600081518084526154218160208601602086016153dd565b601f01601f19169290920160200192915050565b6020815260006141f16020830184615409565b60006020828403121561545a57600080fd5b5035919050565b6001600160a01b038116811461414f57600080fd5b6000806040838503121561548957600080fd5b823561549481615461565b946020939093013593505050565b60008083601f8401126154b457600080fd5b50813567ffffffffffffffff8111156154cc57600080fd5b602083019150836020828501011115614d5057600080fd5b6000806000604084860312156154f957600080fd5b83359250602084013567ffffffffffffffff81111561551757600080fd5b615523868287016154a2565b9497909650939450505050565b60006020828403121561554257600080fd5b81356141f181615461565b634e487b7160e01b600052602160045260246000fd5b60208101601283106155775761557761554d565b91905290565b6000806040838503121561559057600080fd5b50508035926020909101359150565b6000806000606084860312156155b457600080fd5b83356155bf81615461565b925060208401356155cf81615461565b929592945050506040919091013590565b600080600080608085870312156155f657600080fd5b5050823594602084013594506040840135936060013592509050565b6000806020838503121561562557600080fd5b823567ffffffffffffffff81111561563c57600080fd5b615648858286016154a2565b90969095509350505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561569357615693615654565b604052919050565b600067ffffffffffffffff8311156156b5576156b5615654565b6156c8601f8401601f191660200161566a565b90508281528383830111156156dc57600080fd5b828260208301376000602084830101529392505050565b60006020828403121561570557600080fd5b813567ffffffffffffffff81111561571c57600080fd5b8201601f8101841361572d57600080fd5b6123aa8482356020840161569b565b60008060006060848603121561575157600080fd5b505081359360208301359350604090920135919050565b60006040828403121561577a57600080fd5b6040516040810181811067ffffffffffffffff8211171561579d5761579d615654565b604052823581526020928301359281019290925250919050565b801515811461414f57600080fd5b600080604083850312156157d857600080fd5b82356157e381615461565b915060208301356157f3816157b7565b809150509250929050565b60208101600383106155775761557761554d565b6000806000806080858703121561582857600080fd5b843561583381615461565b9350602085013561584381615461565b925060408501359150606085013567ffffffffffffffff81111561586657600080fd5b8501601f8101871361587757600080fd5b6158868782356020840161569b565b91505092959194509250565b600080604083850312156158a557600080fd5b823567ffffffffffffffff808211156158bd57600080fd5b818501915085601f8301126158d157600080fd5b81356020828211156158e5576158e5615654565b8160051b92506158f681840161566a565b828152928401810192818101908985111561591057600080fd5b948201945b8486101561593a578535935061592a84615461565b8382529482019490820190615915565b9997909101359750505050505050565b602080825282518282018190526000919060409081850190868401855b8281101561599857815180516001600160801b0316855286015160ff16868501529284019290850190600101615967565b5091979650505050505050565b60208101600483106155775761557761554d565b600080604083850312156159cc57600080fd5b82356159d781615461565b915060208301356157f381615461565b600181811c908216806159fb57607f821691505b602082108103615a1b57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60008219821115615a8157615a81615a58565b500190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060208284031215615acd57600080fd5b5051919050565b60208082526016908201527527b7363c9037b832b930ba37b91030b63637bbb2b21760511b604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b600082821015615b6757615b67615a58565b500390565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601260045260246000fd5b600082615ba757615ba7615b82565b500690565b600060018201615bbe57615bbe615a58565b5060010190565b604080825283519082018190526000906020906060840190828701845b82811015615c075781516001600160a01b031684529284019290840190600101615be2565b50505092019290925292915050565b60008151615c288185602086016153dd565b9290920192915050565b600080845481600182811c915080831680615c4e57607f831692505b60208084108203615c6d57634e487b7160e01b86526022600452602486fd5b818015615c815760018114615c9257615cbf565b60ff19861689528489019650615cbf565b60008b81526020902060005b86811015615cb75781548b820152908501908301615c9e565b505084890196505b505050505050615ce3615cd28286615c16565b64173539b7b760d91b815260050190565b95945050505050565b6000816000190483118215151615615d0657615d06615a58565b500290565b600082615d1a57615d1a615b82565b500490565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60018060a01b0384168152826020820152606060408201526000615ce36060830184615409565b600060208284031215615daa57600080fd5b81516141f1816157b7565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090615de890830184615409565b9695505050505050565b600060208284031215615e0457600080fd5b81516141f1816153aa565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220e81b784b9ce53fe1ae72ae7f73fe317ee7875aa2e330c5ec1927865205829e7564736f6c634300080e00336080604052604051620011603803806200116083398101604081905262000026916200042e565b8051825114620000985760405162461bcd60e51b815260206004820152603260248201527f5061796d656e7453706c69747465723a2070617965657320616e6420736861726044820152710cae640d8cadccee8d040dad2e6dac2e8c6d60731b60648201526084015b60405180910390fd5b6000825111620000eb5760405162461bcd60e51b815260206004820152601a60248201527f5061796d656e7453706c69747465723a206e6f2070617965657300000000000060448201526064016200008f565b60005b82518110156200015757620001428382815181106200011157620001116200050c565b60200260200101518383815181106200012e576200012e6200050c565b60200260200101516200016060201b60201c565b806200014e8162000538565b915050620000ee565b5050506200056f565b6001600160a01b038216620001cd5760405162461bcd60e51b815260206004820152602c60248201527f5061796d656e7453706c69747465723a206163636f756e74206973207468652060448201526b7a65726f206164647265737360a01b60648201526084016200008f565b600081116200021f5760405162461bcd60e51b815260206004820152601d60248201527f5061796d656e7453706c69747465723a2073686172657320617265203000000060448201526064016200008f565b6001600160a01b038216600090815260026020526040902054156200029b5760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e7420616c726561647960448201526a206861732073686172657360a81b60648201526084016200008f565b60048054600181019091557f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b0180546001600160a01b0319166001600160a01b0384169081179091556000908152600260205260408120829055546200030390829062000554565b600055604080516001600160a01b0384168152602081018390527f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac910160405180910390a15050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156200038d576200038d6200034c565b604052919050565b60006001600160401b03821115620003b157620003b16200034c565b5060051b60200190565b600082601f830112620003cd57600080fd5b81516020620003e6620003e08362000395565b62000362565b82815260059290921b840181019181810190868411156200040657600080fd5b8286015b848110156200042357805183529183019183016200040a565b509695505050505050565b600080604083850312156200044257600080fd5b82516001600160401b03808211156200045a57600080fd5b818501915085601f8301126200046f57600080fd5b8151602062000482620003e08362000395565b82815260059290921b84018101918181019089841115620004a257600080fd5b948201945b83861015620004d95785516001600160a01b0381168114620004c95760008081fd5b82529482019490820190620004a7565b91880151919650909350505080821115620004f357600080fd5b506200050285828601620003bb565b9150509250929050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016200054d576200054d62000522565b5060010190565b600082198211156200056a576200056a62000522565b500190565b610be1806200057f6000396000f3fe60806040526004361061008a5760003560e01c80638b83209b116100595780638b83209b146101845780639852595c146101bc578063ce7c2ac2146101f2578063d79779b214610228578063e33b7de31461025e57600080fd5b806319165587146100d85780633a98ef39146100fa578063406072a91461011e57806348b750441461016457600080fd5b366100d3577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033604080516001600160a01b0390921682523460208301520160405180910390a1005b600080fd5b3480156100e457600080fd5b506100f86100f3366004610955565b610273565b005b34801561010657600080fd5b506000545b6040519081526020015b60405180910390f35b34801561012a57600080fd5b5061010b610139366004610972565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205490565b34801561017057600080fd5b506100f861017f366004610972565b6103ad565b34801561019057600080fd5b506101a461019f3660046109ab565b610589565b6040516001600160a01b039091168152602001610115565b3480156101c857600080fd5b5061010b6101d7366004610955565b6001600160a01b031660009081526003602052604090205490565b3480156101fe57600080fd5b5061010b61020d366004610955565b6001600160a01b031660009081526002602052604090205490565b34801561023457600080fd5b5061010b610243366004610955565b6001600160a01b031660009081526005602052604090205490565b34801561026a57600080fd5b5060015461010b565b6001600160a01b0381166000908152600260205260409020546102b15760405162461bcd60e51b81526004016102a8906109c4565b60405180910390fd5b60006102bc60015490565b6102c69047610a20565b905060006102f383836102ee866001600160a01b031660009081526003602052604090205490565b6105b9565b9050806000036103155760405162461bcd60e51b81526004016102a890610a38565b6001600160a01b0383166000908152600360205260408120805483929061033d908490610a20565b9250508190555080600160008282546103569190610a20565b90915550610366905083826105fe565b604080516001600160a01b0385168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a1505050565b6001600160a01b0381166000908152600260205260409020546103e25760405162461bcd60e51b81526004016102a8906109c4565b6001600160a01b0382166000908152600560205260408120546040516370a0823160e01b81523060048201526001600160a01b038516906370a0823190602401602060405180830381865afa15801561043f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104639190610a83565b61046d9190610a20565b905060006104a683836102ee87876001600160a01b03918216600090815260066020908152604080832093909416825291909152205490565b9050806000036104c85760405162461bcd60e51b81526004016102a890610a38565b6001600160a01b038085166000908152600660209081526040808320938716835292905290812080548392906104ff908490610a20565b90915550506001600160a01b0384166000908152600560205260408120805483929061052c908490610a20565b9091555061053d905084848361071c565b604080516001600160a01b038581168252602082018490528616917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a250505050565b60006004828154811061059e5761059e610a9c565b6000918252602090912001546001600160a01b031692915050565b600080546001600160a01b0385168252600260205260408220548391906105e09086610ab2565b6105ea9190610ad1565b6105f49190610af3565b90505b9392505050565b8047101561064e5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016102a8565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461069b576040519150601f19603f3d011682016040523d82523d6000602084013e6106a0565b606091505b50509050806107175760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016102a8565b505050565b604080516001600160a01b03848116602483015260448083018590528351808403909101815260649092018352602080830180516001600160e01b031663a9059cbb60e01b17905283518085019094528084527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656490840152610717928692916000916107ac918516908490610829565b80519091501561071757808060200190518101906107ca9190610b0a565b6107175760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016102a8565b60606105f48484600085856001600160a01b0385163b61088b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016102a8565b600080866001600160a01b031685876040516108a79190610b5c565b60006040518083038185875af1925050503d80600081146108e4576040519150601f19603f3d011682016040523d82523d6000602084013e6108e9565b606091505b50915091506108f9828286610904565b979650505050505050565b606083156109135750816105f7565b8251156109235782518084602001fd5b8160405162461bcd60e51b81526004016102a89190610b78565b6001600160a01b038116811461095257600080fd5b50565b60006020828403121561096757600080fd5b81356105f78161093d565b6000806040838503121561098557600080fd5b82356109908161093d565b915060208301356109a08161093d565b809150509250929050565b6000602082840312156109bd57600080fd5b5035919050565b60208082526026908201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060408201526573686172657360d01b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b60008219821115610a3357610a33610a0a565b500190565b6020808252602b908201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060408201526a191d59481c185e5b595b9d60aa1b606082015260800190565b600060208284031215610a9557600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b6000816000190483118215151615610acc57610acc610a0a565b500290565b600082610aee57634e487b7160e01b600052601260045260246000fd5b500490565b600082821015610b0557610b05610a0a565b500390565b600060208284031215610b1c57600080fd5b815180151581146105f757600080fd5b60005b83811015610b47578181015183820152602001610b2f565b83811115610b56576000848401525b50505050565b60008251610b6e818460208701610b2c565b9190910192915050565b6020815260008251806020840152610b97816040850160208701610b2c565b601f01601f1916919091016040019291505056fea2646970667358221220e10b12854edbd47e95fbd9af8c6637bdc07b2c5d2161bf5dcfe173f77add1a4464736f6c634300080e003300000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000270f000000000000000000000000000000000000000000000000013c31074902800000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952000000000000000000000000514910771af9ca656af840dff83e8264ecf986caaa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af44500000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000000005596f6b65650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003594f4b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000006000000000000000000000000e0a0262ac02312ba25d4b963e8375dac7bb173e2000000000000000000000000ffd52e420ba9dfa1394551ce77c0094d565ea4400000000000000000000000000082f288421026419ed6dcbf90c4e113dab9bb770000000000000000000000009939a8c8293f0a720c4843d1c6c20594ee6a9218000000000000000000000000bacf5a6a349acae3be6be11db6400a033d875dad000000000000000000000000cffff14187372ad7160871ebc76f5403931db00a00000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000013000000000000000000000000000000000000000000000000000000000000002a000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a
Deployed Bytecode
0x6080604052600436106105235760003560e01c8063791a2519116102a2578063c67e8b6811610165578063dddb91ba116100cc578063efc4bc7c11610085578063efc4bc7c14610fd8578063f15c85b414610fee578063f2fde38b1461100e578063f3b3a9fa1461102e578063f698da2514611044578063fa4d280c1461105a57600080fd5b8063dddb91ba14610ecd578063df20ad8f14610eed578063dfe363ef14610f2e578063e4f2487a14610f43578063e83d508b14610f6f578063e985e9c514610f8f57600080fd5b8063d1fe033d1161011e578063d1fe033d14610e20578063d2c1f20614610e35578063d5abeb0114610e4a578063d5b1ae5e14610e60578063da1b9e0814610e8d578063da324a3014610ead57600080fd5b8063c67e8b6814610d8c578063c87b56dd14610dac578063c91621c214610dcc578063c9a8d9f714610de1578063ccc5d84714610df6578063d0b77ab414610e0b57600080fd5b806395d89b4111610209578063b6eb6d69116101c2578063b6eb6d6914610ce6578063b78ef4cb14610d06578063b88d4fde14610d1c578063ba1f879f14610d3c578063be008ccb14610d57578063c204642c14610d6c57600080fd5b806395d89b4114610c445780639b154a7114610c595780639da0d7d414610c6e578063a22cb46514610c89578063a2fb7b5d14610ca9578063aab4b09e14610cd057600080fd5b8063870843131161025b5780638708431314610b9d5780638da5cb5b14610bbd5780639024fc9614610bdb57806390aa0b0f14610bf0578063933edbb814610c0b57806394985ddd14610c2457600080fd5b8063791a251914610ad8578063792bce7014610af85780637a9e1d0314610b185780637bd07f8b14610b385780637d94792a14610b725780637ee7866114610b8857600080fd5b806333bc1c5c116103ea5780635626e404116103515780636c635d3f1161030a5780636c635d3f14610a395780636e83843a14610a5957806370a0823114610a79578063715018a614610a9957806373b19e8f14610aae578063776451b014610ac357600080fd5b80635626e404146109a55780635e9f9613146109c557806361728f39146109da5780636238e9f4146109f05780636352211e14610a0357806366bb81c714610a2357600080fd5b80634256dbe3116103a35780634256dbe3146108fb57806342842e0e1461091b578063447321801461093b57806349aaa5d9146109505780634f6ccce71461097057806354214f691461099057600080fd5b806333bc1c5c146108565780633584602814610886578063398c0ec11461089c5780633a367a67146108b15780633ccfd60b146108c65780633da65fc1146108db57600080fd5b8063191655871161048e578063276f1c4111610447578063276f1c41146107ab5780632da5ea17146107cb5780632ee723fb146107e05780632f1d5a60146107f65780632f745c591461081657806330878ba91461083657600080fd5b806319165587146106f65780631bae492e146107165780631cbe14c91461073657806320510b55146107565780632316b4da1461077657806323b872dd1461078b57600080fd5b80630f30cde0116104e05780630f30cde01461061d5780631197705e14610630578063127effb214610650578063166ca2bc1461067057806318160ddd146106bf5780631865c57d146106d457600080fd5b806301ffc9a71461052857806302410f471461055d578063031ab9f51461057e57806306fdde03146105a1578063081812fc146105c3578063095ea7b3146105fb575b600080fd5b34801561053457600080fd5b506105486105433660046153c0565b61108e565b60405190151581526020015b60405180910390f35b34801561056957600080fd5b50600e5461054890600160a01b900460ff1681565b34801561058a57600080fd5b5061059361109f565b604051908152602001610554565b3480156105ad57600080fd5b506105b6611125565b6040516105549190615435565b3480156105cf57600080fd5b506105e36105de366004615448565b6111b7565b6040516001600160a01b039091168152602001610554565b34801561060757600080fd5b5061061b610616366004615476565b611251565b005b61054861062b3660046154e4565b611366565b34801561063c57600080fd5b5061061b61064b366004615530565b611972565b34801561065c57600080fd5b50600d546105e3906001600160a01b031681565b34801561067c57600080fd5b50601e54601f54602054602154602254610697949392919085565b604080519586526020860194909452928401919091526060830152608082015260a001610554565b3480156106cb57600080fd5b50600a54610593565b3480156106e057600080fd5b506106e9611a30565b6040516105549190615563565b34801561070257600080fd5b5061061b610711366004615530565b611c94565b34801561072257600080fd5b50602c546105e3906001600160a01b031681565b34801561074257600080fd5b5061061b61075136600461557d565b611e61565b34801561076257600080fd5b5061061b610771366004615530565b611ed3565b34801561078257600080fd5b5061061b611f47565b34801561079757600080fd5b5061061b6107a636600461559f565b611fab565b3480156107b757600080fd5b50600e546105e3906001600160a01b031681565b3480156107d757600080fd5b50610548611fdc565b3480156107ec57600080fd5b50610593602b5481565b34801561080257600080fd5b5061061b610811366004615530565b612029565b34801561082257600080fd5b50610593610831366004615476565b6120e7565b34801561084257600080fd5b506105b66108513660046155e0565b61217d565b34801561086257600080fd5b50601854601954610871919082565b60408051928352602083019190915201610554565b34801561089257600080fd5b5061059360295481565b3480156108a857600080fd5b506105936123b2565b3480156108bd57600080fd5b506105b661248d565b3480156108d257600080fd5b5061061b61251b565b3480156108e757600080fd5b506105486108f6366004615612565b6125a5565b34801561090757600080fd5b5061061b610916366004615448565b61261d565b34801561092757600080fd5b5061061b61093636600461559f565b61267c565b34801561094757600080fd5b5061061b612697565b34801561095c57600080fd5b5061061b61096b366004615448565b6126f6565b34801561097c57600080fd5b5061059361098b366004615448565b612755565b34801561099c57600080fd5b506105486127e8565b3480156109b157600080fd5b5061061b6109c0366004615448565b61280f565b3480156109d157600080fd5b5061059361286e565b3480156109e657600080fd5b50610593600f5481565b6105486109fe366004615612565b612880565b348015610a0f57600080fd5b506105e3610a1e366004615448565b612b30565b348015610a2f57600080fd5b5061059360105481565b348015610a4557600080fd5b5061061b610a54366004615448565b612ba7565b348015610a6557600080fd5b5061061b610a743660046156f3565b612c06565b348015610a8557600080fd5b50610593610a94366004615530565b612c73565b348015610aa557600080fd5b5061061b612cfa565b348015610aba57600080fd5b50610593612d30565b348015610acf57600080fd5b50610593612ddd565b348015610ae457600080fd5b5061061b610af3366004615448565b612e55565b348015610b0457600080fd5b5061061b610b1336600461573c565b612eb4565b348015610b2457600080fd5b50610548610b33366004615612565b612f33565b348015610b4457600080fd5b50601b54601c54601d54610b5792919083565b60408051938452602084019290925290820152606001610554565b348015610b7e57600080fd5b5061059360115481565b348015610b9457600080fd5b506105b6612f9a565b348015610ba957600080fd5b5061061b610bb8366004615768565b6134b1565b348015610bc957600080fd5b506001546001600160a01b03166105e3565b348015610be757600080fd5b50610593613520565b348015610bfc57600080fd5b50602354602454610871919082565b348015610c1757600080fd5b50601f54602b5414610548565b348015610c3057600080fd5b5061061b610c3f36600461557d565b613532565b348015610c5057600080fd5b506105b66135b8565b348015610c6557600080fd5b506105b66135c7565b348015610c7a57600080fd5b50601454601554610871919082565b348015610c9557600080fd5b5061061b610ca43660046157c5565b6135d4565b348015610cb557600080fd5b50601a54610cc39060ff1681565b60405161055491906157fe565b348015610cdc57600080fd5b5061059360275481565b348015610cf257600080fd5b5061061b610d01366004615530565b6135df565b348015610d1257600080fd5b5061059360285481565b348015610d2857600080fd5b5061061b610d37366004615812565b613653565b348015610d4857600080fd5b50601654601754610871919082565b348015610d6357600080fd5b5061061b61368b565b348015610d7857600080fd5b5061061b610d87366004615892565b6136ed565b348015610d9857600080fd5b5061061b610da7366004615768565b6138a1565b348015610db857600080fd5b506105b6610dc7366004615448565b613910565b348015610dd857600080fd5b50610593613a38565b348015610ded57600080fd5b50610593613a8e565b348015610e0257600080fd5b5061061b613b0e565b348015610e1757600080fd5b50610548613cca565b348015610e2c57600080fd5b5061061b613cdd565b348015610e4157600080fd5b5061061b613d41565b348015610e5657600080fd5b5061059360255481565b348015610e6c57600080fd5b50610e80610e7b366004615530565b613da5565b604051610554919061594a565b348015610e9957600080fd5b5061061b610ea83660046156f3565b613e31565b348015610eb957600080fd5b5061061b610ec8366004615448565b613ee6565b348015610ed957600080fd5b5061061b610ee8366004615768565b613f45565b348015610ef957600080fd5b50610f0d610f08366004615476565b613fb3565b604080516001600160801b03909316835260ff909116602083015201610554565b348015610f3a57600080fd5b5061061b613ff6565b348015610f4f57600080fd5b50601a54610f6290610100900460ff1681565b60405161055491906159a5565b348015610f7b57600080fd5b5061061b610f8a366004615448565b614058565b348015610f9b57600080fd5b50610548610faa3660046159b9565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b348015610fe457600080fd5b50610593602a5481565b348015610ffa57600080fd5b50602d546105e3906001600160a01b031681565b34801561101a57600080fd5b5061061b611029366004615530565b6140b7565b34801561103a57600080fd5b5061059360265481565b34801561105057600080fd5b50610593602e5481565b34801561106657600080fd5b506105937f68e83002b91b0fd96d4df3566b5122221117e3ec6c2468fda594f6491f89b1c981565b600061109982614152565b92915050565b60006001601a54610100900460ff1660038111156110bf576110bf61554d565b036110cb575060155490565b6002601a54610100900460ff1660038111156110e9576110e961554d565b036110f5575060175490565b6003601a54610100900460ff1660038111156111135761111361554d565b0361111f575060195490565b50600090565b606060028054611134906159e7565b80601f0160208091040260200160405190810160405280929190818152602001828054611160906159e7565b80156111ad5780601f10611182576101008083540402835291602001916111ad565b820191906000526020600020905b81548152906001019060200180831161119057829003601f168201915b5050505050905090565b6000818152600460205260408120546001600160a01b03166112355760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061125c82612b30565b9050806001600160a01b0316836001600160a01b0316036112c95760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161122c565b336001600160a01b03821614806112e557506112e58133610faa565b6113575760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606482015260840161122c565b6113618383614177565b505050565b60006002600c540361138a5760405162461bcd60e51b815260040161122c90615a21565b6002600c556000611399611a30565b90503332146113e55760405162461bcd60e51b815260206004820152601860248201527721b7b73a3930b1ba1034b9903737ba1030b63637bbb2b21760411b604482015260640161122c565b60088160118111156113f9576113f961554d565b14806114165750600d8160118111156114145761141461554d565b145b80611432575060038160118111156114305761143061554d565b145b6114745760405162461bcd60e51b815260206004820152601360248201527229b0b632903737ba1030bb30b4b630b136329760691b604482015260640161122c565b61148661147f6123b2565b86906141e5565b3410156114cb5760405162461bcd60e51b815260206004820152601360248201527224b739bab33334b1b4b2b73a10333ab732399760691b604482015260640161122c565b60038160118111156114df576114df61554d565b0361158d576023548511156115365760405162461bcd60e51b815260206004820152601f60248201527f4d696e7420657863656564207472616e73616374696f6e206c696d6974732e00604482015260640161122c565b602b54601f5461154690876141f8565b111561158d5760405162461bcd60e51b8152602060048201526016602482015275283ab931b430b9b29032bc31b2b2b2103634b6b4ba1760511b604482015260640161122c565b600d8160118111156115a1576115a161554d565b03611667576024548511156115f85760405162461bcd60e51b815260206004820152601f60248201527f4d696e7420657863656564207472616e73616374696f6e206c696d6974732e00604482015260640161122c565b60255461161961160661286e565b61161388611613600a5490565b906141f8565b11156116675760405162461bcd60e51b815260206004820152601b60248201527f507572636861736520657863656564206d617820737570706c792e0000000000604482015260640161122c565b600881601181111561167b5761167b61554d565b036117e35761168a84846125a5565b6116c95760405162461bcd60e51b815260206004820152601060248201526f2737ba103bb434ba32b634b9ba32b21760811b604482015260640161122c565b600285111561171a5760405162461bcd60e51b815260206004820152601e60248201527f4d696e7420657863656564207472616e73616374696f6e206c696d6974730000604482015260640161122c565b336000908152602f6020526040902054600290611738908790615a6e565b11156117865760405162461bcd60e51b815260206004820152601f60248201527f4d696e74206c696d6974207065722077616c6c65742065786365656465642e00604482015260640161122c565b602a5461179586611613613520565b11156117e35760405162461bcd60e51b815260206004820152601c60248201527f5075726368617365206578636565642073616c65206361707065642e00000000604482015260640161122c565b6117ed3386614204565b5060038160118111156118025761180261554d565b036118a857601f5461181490866141f8565b601f556000611823348761428f565b33600090815260326020908152604080832081518083019092526001600160801b03808616835260ff808d1684860190815283546001810185559387529490952092519290910180549351909416600160801b0270ffffffffffffffffffffffffffffffffff199093169116171790556029549091508110156118a65760298190555b505b600d8160118111156118bc576118bc61554d565b036118d2576022546118ce90866141f8565b6022555b60088160118111156118e6576118e661554d565b0361192757336000908152602f6020526040902054611906908690615a6e565b336000908152602f602052604090205560215461192390866141f8565b6021555b6031546040516001600160a01b03909116903480156108fc02916000818181858888f19350505050158015611960573d6000803e3d6000fd5b5060019150506001600c559392505050565b6001546001600160a01b0316331461199c5760405162461bcd60e51b815260040161122c90615a86565b6001600160a01b0381166119e65760405162461bcd60e51b8152602060048201526011602482015270043616e6e6f742061737369676e2030783607c1b604482015260640161122c565b600e80546001600160a01b0319166001600160a01b0383169081179091556040517f5b92f2f101ec36b062768cd1330146da74961809b300919c88c6853ca703261590600090a250565b60006002601a5460ff166002811115611a4b57611a4b61554d565b03611a565750601190565b6001601a5460ff166002811115611a6f57611a6f61554d565b03611a7a5750601090565b6000601a54610100900460ff166003811115611a9857611a9861554d565b03611aa35750600090565b6003601a54610100900460ff166003811115611ac157611ac161554d565b03611b5a57611ace611fdc565b15611ad95750600f90565b60195415801590611aeb575060195443115b15611af65750600e90565b60185415801590611b0957506018544310155b15611b145750600d90565b60185415801590611b26575060185443105b8015611b33575060175443115b15611b3e5750600c90565b601854158015611b4f575060175443115b15611b5a5750600b90565b6002601a54610100900460ff166003811115611b7857611b7861554d565b03611bf857611b85613cca565b15611b905750600a90565b60175415801590611ba2575060175443115b15611bad5750600990565b60165415801590611bc057506016544310155b15611bcb5750600890565b60165415801590611bdd575060165443105b15611be85750600790565b601654600003611bf85750600690565b6001601a54610100900460ff166003811115611c1657611c1661554d565b0361111f57601f54602b5403611c2c5750600590565b60155415801590611c3e575060155443115b15611c495750600490565b60145415801590611c5c57506014544310155b15611c675750600390565b60145415801590611c79575060145443105b15611c845750600290565b60145460000361111f5750600190565b60315460405163673e156160e11b81523360048201526000916001600160a01b03169063ce7c2ac290602401602060405180830381865afa158015611cdd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d019190615abb565b1180611d1757506001546001600160a01b031633145b611d5b5760405162461bcd60e51b81526020600482015260156024820152743737ba1039b430b932b437b63232b917b7bbb732b960591b604482015260640161122c565b336001600160a01b0382161480611d7c57506001546001600160a01b031633145b611dc15760405162461bcd60e51b81526020600482015260166024820152752932b632b0b9b29d103737903832b936b4b9b9b4b7b760511b604482015260640161122c565b603154604051631916558760e01b81526001600160a01b03838116600483015290911690631916558790602401600060405180830381600087803b158015611e0857600080fd5b505af1158015611e1c573d6000803e3d6000fd5b50506040516001600160a01b03841681527f7955210193a82a2c13259e4b48f1e8b90a4170115a1021fdae0570d045bba205925060200190505b60405180910390a150565b600d546001600160a01b03163314611e8b5760405162461bcd60e51b815260040161122c90615ad4565b6023829055602481905560408051838152602081018390527f97720c97a8962cb9a18ee69ad344acb999cca0250317bc9b023bb6badad22e1391015b60405180910390a15050565b600d546001600160a01b03163314611efd5760405162461bcd60e51b815260040161122c90615ad4565b602c80546001600160a01b0319166001600160a01b0383169081179091556040517fb01190fe4bf51f48a33625333c07da1825c9f14d04cff4433b6e056c9dc2033a90600090a250565b600d546001600160a01b03163314611f715760405162461bcd60e51b815260040161122c90615ad4565b601a805461ff0019166103001790556040517fca29b392f61fad3260f009b6fc1de9d8efda05563601b6c91396b795eeefff2e90600090a1565b611fb5338261429b565b611fd15760405162461bcd60e51b815260040161122c90615b04565b611361838383614391565b600080602654602554611fef9190615b55565b602154602054602254601f5493945060009361200b9190615a6e565b6120159190615a6e565b61201f9190615a6e565b9190911492915050565b6001546001600160a01b031633146120535760405162461bcd60e51b815260040161122c90615a86565b6001600160a01b03811661209d5760405162461bcd60e51b8152602060048201526011602482015270043616e6e6f742061737369676e2030783607c1b604482015260640161122c565b600d80546001600160a01b0319166001600160a01b0383169081179091556040517fa508d3b137dbcdf7e06f84833fe4aca137451e1e3309f454a207d8fb85c2ccd890600090a250565b60006120f283612c73565b82106121545760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b606482015260840161122c565b506001600160a01b03919091166000908152600860209081526040808320938352929052205490565b60606121916001546001600160a01b031690565b6001600160a01b0316336001600160a01b0316146121ec57848311156121ec5760405162461bcd60e51b815260206004820152601060248201526f546f6b656e206e6f742065786973747360801b604482015260640161122c565b6121f46127e8565b61221c5750604080518082019091526007815266191959985d5b1d60ca1b60208201526123aa565b6000612229856001615a6e565b67ffffffffffffffff81111561224157612241615654565b60405190808252806020026020018201604052801561226a578160200160208202803683370190505b50905060015b8581116122a7578082828151811061228a5761228a615b6c565b60209081029190910101526122a0600182615a6e565b9050612270565b50825b85811161238357600086601154836040516020016122d2929190918252602082015260400190565b6040516020818303038152906040528051906020012060001c6122f59190615b98565b612300906001615a6e565b905082818151811061231457612314615b6c565b602002602001015183838151811061232e5761232e615b6c565b602002602001015184848151811061234857612348615b6c565b6020026020010185848151811061236157612361615b6c565b6020908102919091010191909152525061237c600182615a6e565b90506122aa565b506123a681858151811061239957612399615b6c565b6020026020010151614538565b9150505b949350505050565b6000806123bd611a30565b905060038160118111156123d3576123d361554d565b03612443576014546000906123e89043615b55565b601d54601b5491925060009161240a919061240490859061428f565b906141e5565b601c5460285491925061241d9190614639565b811061242e575050601c5492915050565b60285461243b9082614639565b935050505090565b60088160118111156124575761245761554d565b0361246457505060275490565b600d8160118111156124785761247861554d565b0361248557505060285490565b505060285490565b6013805461249a906159e7565b80601f01602080910402602001604051908101604052809291908181526020018280546124c6906159e7565b80156125135780601f106124e857610100808354040283529160200191612513565b820191906000526020600020905b8154815290600101906020018083116124f657829003601f168201915b505050505081565b600d546001600160a01b031633146125455760405162461bcd60e51b815260040161122c90615ad4565b6040514790339082156108fc029083906000818181858888f19350505050158015612574573d6000803e3d6000fd5b506040518181527f807631352cb3389b100202fae783b0b18fedc90bd3a438433796cb89462f4fad90602001611e56565b602c546000906001600160a01b03166125f65760405162461bcd60e51b815260206004820152601360248201527215d3081ad95e481b9bdd08185cdcda59db9959606a1b604482015260640161122c565b602c546001600160a01b031661260c8484614645565b6001600160a01b0316149392505050565b600d546001600160a01b031633146126475760405162461bcd60e51b815260040161122c90615ad4565b60268190556040518181527fe1fb8f58d0fe8f41debc65095588c6530f5b3c96964aee78a164712c7ab7cb3f90602001611e56565b61136183838360405180602001604052806000815250613653565b600d546001600160a01b031633146126c15760405162461bcd60e51b815260040161122c90615ad4565b601a805460ff191690556040517f4f0f641a7e3d2c654d00279745eb7cf977b86891e3c7dd11cf315972d02089ce90600090a1565b600d546001600160a01b031633146127205760405162461bcd60e51b815260040161122c90615ad4565b60278190556040518181527f8ea69d9e909b68c4f14f78ed645aa5bb6e5aaa632c8e2f365618f51f6e10373290602001611e56565b6000612760600a5490565b82106127c35760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b606482015260840161122c565b600a82815481106127d6576127d6615b6c565b90600052602060002001549050919050565b6000806011541180156127fd57506000601054115b801561280a575060105443115b905090565b600d546001600160a01b031633146128395760405162461bcd60e51b815260040161122c90615ad4565b602a8190556040518181527fee53f3111b00616aa0a325f68aaf488d4433b7f00ea57bdfe5346fb08899c1aa90602001611e56565b601e5460265460009161280a91615b55565b60006002600c54036128a45760405162461bcd60e51b815260040161122c90615a21565b6002600c553332146128f35760405162461bcd60e51b815260206004820152601860248201527721b7b73a3930b1ba1034b9903737ba1030b63637bbb2b21760411b604482015260640161122c565b60086128fd611a30565b601181111561290e5761290e61554d565b146129515760405162461bcd60e51b815260206004820152601360248201527229b0b632903737ba1030bb30b4b630b136329760691b604482015260640161122c565b61295b8383612f33565b61299d5760405162461bcd60e51b81526020600482015260136024820152722737ba1027a3903bb434ba32b634b9ba32b21760691b604482015260640161122c565b33600090815260306020526040902054156129f05760405162461bcd60e51b815260206004820152601360248201527220b63932b0b23c9021b630b4b6b2b21027a39760691b604482015260640161122c565b602a54612a006001611613613520565b1115612a4e5760405162461bcd60e51b815260206004820152601960248201527f45786365656420507269766174652053616c65204c696d697400000000000000604482015260640161122c565b612a566123b2565b341015612a9b5760405162461bcd60e51b815260206004820152601360248201527224b739bab33334b1b4b2b73a10333ab732399760691b604482015260640161122c565b33600090815260306020526040902054612ab6906001615a6e565b3360009081526030602090815260409091209190915554612ad89060016141f8565b602055612ae6336001614204565b506031546040516001600160a01b03909116903480156108fc02916000818181858888f19350505050158015612b20573d6000803e3d6000fd5b50600190506001600c5592915050565b6000818152600460205260408120546001600160a01b0316806110995760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b606482015260840161122c565b600d546001600160a01b03163314612bd15760405162461bcd60e51b815260040161122c90615ad4565b60298190556040518181527f98302d1de36f493ad21f68a7d43aada3c922bcde2576a9db30b75187321cabfc90602001611e56565b600d546001600160a01b03163314612c305760405162461bcd60e51b815260040161122c90615ad4565b8051612c43906012906020840190615311565b507fda0697149924c38db1462c9de1c03a46ce996f35d278fcf8dc4a76eb1065dc2e81604051611e569190615435565b60006001600160a01b038216612cde5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b606482015260840161122c565b506001600160a01b031660009081526005602052604090205490565b6001546001600160a01b03163314612d245760405162461bcd60e51b815260040161122c90615a86565b612d2e6000614719565b565b600080612d3b611a30565b90506003816011811115612d5157612d5161554d565b03612d5e575050602b5490565b6008816011811115612d7257612d7261554d565b03612d7f575050602a5490565b600d816011811115612d9357612d9361554d565b03612dd557601f54602654602154602054602554612db19190615b55565b612dbb9190615b55565b612dc59190615b55565b612dcf9190615b55565b91505090565b600091505090565b600080612de8611a30565b90506008816011811115612dfe57612dfe61554d565b03612e1357602154602054612dcf9190615a6e565b600d816011811115612e2757612e2761554d565b03612e3457505060225490565b6003816011811115612e4857612e4861554d565b03612dd5575050601f5490565b600d546001600160a01b03163314612e7f5760405162461bcd60e51b815260040161122c90615ad4565b60288190556040518181527ff959ca468c08c9457955f238a0ad6a31fc63f09b1e9bbafb4e409f19163bbe1490602001611e56565b600d546001600160a01b03163314612ede5760405162461bcd60e51b815260040161122c90615ad4565b601b839055601c829055601d81905560408051848152602081018490529081018290527f25712bfd18ae9c5dd63c26ade669b68a324cfbe3e863cdc207d2a06e9727d3929060600160405180910390a1505050565b602d546000906001600160a01b0316612f845760405162461bcd60e51b815260206004820152601360248201527213d1c81ad95e481b9bdd08185cdcda59db9959606a1b604482015260640161122c565b602d546001600160a01b031661260c8484614645565b60606000612fa6611a30565b90506001816011811115612fbc57612fbc61554d565b03612ffa57505060408051808201909152601e81527f447574636841756374696f6e4265666f7265576974686f7574426c6f636b0000602082015290565b600281601181111561300e5761300e61554d565b0361304c57505060408051808201909152601b81527f447574636841756374696f6e4265666f726557697468426c6f636b0000000000602082015290565b60038160118111156130605761306061554d565b03613093575050604080518082019091526012815271447574636841756374696f6e447572696e6760701b602082015290565b60048160118111156130a7576130a761554d565b036130d757505060408051808201909152600f81526e111d5d18da105d58dd1a5bdb915b99608a1b602082015290565b60058160118111156130eb576130eb61554d565b03613122575050604080518082019091526016815275111d5d18da105d58dd1a5bdb915b9914dbdb1913dd5d60521b602082015290565b60068160118111156131365761313661554d565b0361317457505060408051808201909152601d81527f5072697661746553616c654265666f7265576974686f7574426c6f636b000000602082015290565b60078160118111156131885761318861554d565b036131c657505060408051808201909152601a81527f5072697661746553616c654265666f726557697468426c6f636b000000000000602082015290565b60088160118111156131da576131da61554d565b0361320c5750506040805180820190915260118152705072697661746553616c65447572696e6760781b602082015290565b60098160118111156132205761322061554d565b0361324f57505060408051808201909152600e81526d141c9a5d985d1954d85b19515b9960921b602082015290565b600a8160118111156132635761326361554d565b03613299575050604080518082019091526015815274141c9a5d985d1954d85b19515b9914dbdb1913dd5d605a1b602082015290565b600b8160118111156132ad576132ad61554d565b036132eb57505060408051808201909152601c81527f5075626c696353616c654265666f7265576974686f7574426c6f636b00000000602082015290565b600c8160118111156132ff576132ff61554d565b0361333d57505060408051808201909152601981527f5075626c696353616c654265666f726557697468426c6f636b00000000000000602082015290565b600d8160118111156133515761335161554d565b0361338257505060408051808201909152601081526f5075626c696353616c65447572696e6760801b602082015290565b600e8160118111156133965761339661554d565b036133c457505060408051808201909152600d81526c141d589b1a58d4d85b19515b99609a1b602082015290565b600f8160118111156133d8576133d861554d565b0361340d575050604080518082019091526014815273141d589b1a58d4d85b19515b9914dbdb1913dd5d60621b602082015290565b60108160118111156134215761342161554d565b0361344b575050604080518082019091526009815268506175736553616c6560b81b602082015290565b601181601181111561345f5761345f61554d565b0361348b57505060408051808201909152600b81526a105b1b14d85b195cd15b9960aa1b602082015290565b505060408051808201909152600a815269139bdd14dd185c9d195960b21b602082015290565b600d546001600160a01b031633146134db5760405162461bcd60e51b815260040161122c90615ad4565b80516014819055602080830151601581905560408051938452918301527f46b9f9d83ded22a38ee2e31b09c026a8c683dd2e9060de026c383b15a655f4fd9101611e56565b60205460215460009161280a91615a6e565b336001600160a01b037f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb795216146135aa5760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c00604482015260640161122c565b6135b4828261476b565b5050565b606060038054611134906159e7565b6012805461249a906159e7565b6135b43383836147ef565b600d546001600160a01b031633146136095760405162461bcd60e51b815260040161122c90615ad4565b602d80546001600160a01b0319166001600160a01b0383169081179091556040517f14ac04b188e9f32c0e4b3ae39771c1c288169ca48b8bddc22be8bec64d12ba0a90600090a250565b61365d338361429b565b6136795760405162461bcd60e51b815260040161122c90615b04565b613685848484846148bd565b50505050565b600d546001600160a01b031633146136b55760405162461bcd60e51b815260040161122c90615ad4565b601a805460ff191660021790556040517f58abff1119ad7689f2843996246b31faf77e0a40545d5085ee99361a768a3f7d90600090a1565b6002600c540361370f5760405162461bcd60e51b815260040161122c90615a21565b6002600c55600d546001600160a01b0316331461373e5760405162461bcd60e51b815260040161122c90615ad4565b60255482516137599061375190846141e5565b600a54611613565b11156137a75760405162461bcd60e51b815260206004820152601860248201527f457863656564206d617820737570706c79206c696d69742e0000000000000000604482015260640161122c565b60265482516137c3906137ba90846141e5565b601e54906141f8565b11156138095760405162461bcd60e51b815260206004820152601560248201527424b739bab33334b1b4b2b73a103932b9b2b93b329760591b604482015260640161122c565b8151613819906137ba90836141e5565b601e5560005b825181101561385e5761384b83828151811061383d5761383d615b6c565b602002602001015183614204565b508061385681615bac565b91505061381f565b507f08b3e41950189550b73643a90143efc8a526a17dc07e6abe0fb50ce7c10b50fc8282604051613890929190615bc5565b60405180910390a150506001600c55565b600d546001600160a01b031633146138cb5760405162461bcd60e51b815260040161122c90615ad4565b80516018819055602080830151601981905560408051938452918301527f70441bfeec4000206c01cb310438ec41bb281f98d8ea4f08f086e3329ff4eb299101611e56565b606061391b600a5490565b82111561395d5760405162461bcd60e51b815260206004820152601060248201526f2a37b5b2b7103737ba1032bc34b9ba1760811b604482015260640161122c565b6139656127e8565b6139f95760138054613976906159e7565b80601f01602080910402602001604051908101604052809291908181526020018280546139a2906159e7565b80156139ef5780601f106139c4576101008083540402835291602001916139ef565b820191906000526020600020905b8154815290600101906020018083116139d257829003601f168201915b5050505050611099565b6012613a12613a07600a5490565b60255485600161217d565b604051602001613a23929190615c32565b60405160208183030381529060405292915050565b60006003613a44611a30565b6011811115613a5557613a5561554d565b03613a61575060235490565b600d613a6b611a30565b6011811115613a7c57613a7c61554d565b03613a88575060245490565b50600290565b60006001601a54610100900460ff166003811115613aae57613aae61554d565b03613aba575060145490565b6002601a54610100900460ff166003811115613ad857613ad861554d565b03613ae4575060165490565b6003601a54610100900460ff166003811115613b0257613b0261554d565b0361111f575060185490565b600d546001600160a01b03163314613b385760405162461bcd60e51b815260040161122c90615ad4565b600e54600160a01b900460ff1615613b925760405162461bcd60e51b815260206004820152601f60248201527f436861696e6c696e6b2056524620616c72656164792072657175657374656400604482015260640161122c565b6040516370a0823160e01b8152306004820152671bc16d674ec80000907f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca6001600160a01b0316906370a0823190602401602060405180830381865afa158015613c00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c249190615abb565b1015613c665760405162461bcd60e51b8152602060048201526011602482015270496e73756666696369656e74204c494e4b60781b604482015260640161122c565b613c7a600f54671bc16d674ec800006148f0565b50600e805460ff60a01b1916600160a01b1790556040517f8bcef1354992d6b49befbd8ce23b2578ce493191f74c32b543d2f177962a139f90613cc09042815260200190565b60405180910390a1565b6000602a54613cd7613520565b14905090565b600d546001600160a01b03163314613d075760405162461bcd60e51b815260040161122c90615ad4565b601a805461ff0019166101001790556040517f82e232fa1250b177b43a967e555410ac1c850806b01cac8363fe6e94e7edfd0190600090a1565b600d546001600160a01b03163314613d6b5760405162461bcd60e51b815260040161122c90615ad4565b601a805461ff0019166102001790556040517f0913c47876f976a46ce9674a2e5a22679ebf61b03b7a333913652272a9262c7790600090a1565b6001600160a01b0381166000908152603260209081526040808320805482518185028101850190935280835260609492939192909184015b82821015613e2657600084815260209081902060408051808201909152908401546001600160801b0381168252600160801b900460ff1681830152825260019092019101613ddd565b505050509050919050565b600d546001600160a01b03163314613e5b5760405162461bcd60e51b815260040161122c90615ad4565b613e636127e8565b15613ea35760405162461bcd60e51b815260206004820152601060248201526f105b1c9958591e481c995d99585b195960821b604482015260640161122c565b8051613eb6906013906020840190615311565b507fb0cb658f6a70918635661157bac90270b4184dff76f6b90dfebdad09e29ce5eb81604051611e569190615435565b600d546001600160a01b03163314613f105760405162461bcd60e51b815260040161122c90615ad4565b60108190556040518181527ffd1cd879b90803328042915a0dab567886d80637d84c7875df6a3e4495c379ac90602001611e56565b600d546001600160a01b03163314613f6f5760405162461bcd60e51b815260040161122c90615ad4565b80516016819055602080830151601781905560408051938452918301527ea742ba61fbc2be98048a2bafed46ef5f837610c64f7a83e332b100f6aab0759101611e56565b60326020528160005260406000208181548110613fcf57600080fd5b6000918252602090912001546001600160801b0381169250600160801b900460ff16905082565b600d546001600160a01b031633146140205760405162461bcd60e51b815260040161122c90615ad4565b601a805460ff191660011790556040517f6d4e2212f1a4fcfebfe8fd91368752c56e02d80a28c18c5cce3d812cfcbcb4a790600090a1565b600d546001600160a01b031633146140825760405162461bcd60e51b815260040161122c90615ad4565b602b8190556040518181527febe3296c3cc674d6155214007876758ba86e54f6a760820db1bc6c3d2520523e90602001611e56565b6001546001600160a01b031633146140e15760405162461bcd60e51b815260040161122c90615a86565b6001600160a01b0381166141465760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161122c565b61414f81614719565b50565b60006001600160e01b0319821663780e9d6360e01b1480611099575061109982614a67565b600081815260066020526040902080546001600160a01b0319166001600160a01b03841690811790915581906141ac82612b30565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006141f18284615cec565b9392505050565b60006141f18284615a6e565b6000805b8281101561428557600061421b600a5490565b90506025548110156142725761423b85614236836001615a6e565b614ab7565b60405181906001600160a01b038716907fa512fb2532ca8587f236380171326ebb69670e86a2ba0c4412a3fcca4c3ada9b90600090a35b508061427d81615bac565b915050614208565b5060019392505050565b60006141f18284615d0b565b6000818152600460205260408120546001600160a01b03166143145760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161122c565b600061431f83612b30565b9050806001600160a01b0316846001600160a01b0316148061436657506001600160a01b0380821660009081526007602090815260408083209388168352929052205460ff165b806123aa5750836001600160a01b031661437f846111b7565b6001600160a01b031614949350505050565b826001600160a01b03166143a482612b30565b6001600160a01b0316146144085760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b606482015260840161122c565b6001600160a01b03821661446a5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161122c565b614475838383614ad1565b614480600082614177565b6001600160a01b03831660009081526005602052604081208054600192906144a9908490615b55565b90915550506001600160a01b03821660009081526005602052604081208054600192906144d7908490615a6e565b909155505060008181526004602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60608160000361455f5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115614589578061457381615bac565b91506145829050600a83615d0b565b9150614563565b60008167ffffffffffffffff8111156145a4576145a4615654565b6040519080825280601f01601f1916602001820160405280156145ce576020820181803683370190505b5090505b84156123aa576145e3600183615b55565b91506145f0600a86615b98565b6145fb906030615a6e565b60f81b81838151811061461057614610615b6c565b60200101906001600160f81b031916908160001a905350614632600a86615d0b565b94506145d2565b60006141f18284615b55565b602e54604080517f68e83002b91b0fd96d4df3566b5122221117e3ec6c2468fda594f6491f89b1c9602082015233918101919091526000918291606001604051602081830303815290604052805190602001206040516020016146bf92919061190160f01b81526002810192909252602282015260420190565b6040516020818303038152906040528051906020012090506123aa84848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508593925050614adc9050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80156147b457601181905560408051428152602081018490529081018290527f59e4c9bb1559d5420398abdcb1a7eb97cc4a7e27b2ae810b8d7f44fbc2327ffa90606001611ec7565b600160115560408051428152602081018490527fd9b030358bf0114e16959cea6c935e1cb862740b4d1056049f91711662fb3f959101611ec7565b816001600160a01b0316836001600160a01b0316036148505760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161122c565b6001600160a01b03838116600081815260076020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6148c8848484614391565b6148d484848484614b00565b6136855760405162461bcd60e51b815260040161122c90615d1f565b60007f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca6001600160a01b0316634000aea07f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb795284866000604051602001614960929190918252602082015260400190565b6040516020818303038152906040526040518463ffffffff1660e01b815260040161498d93929190615d71565b6020604051808303816000875af11580156149ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906149d09190615d98565b5060008381526020818152604080832054815180840188905280830185905230606082015260808082018390528351808303909101815260a090910190925281519183019190912086845292909152614a2a906001615a6e565b60008581526020818152604091829020929092558051808301879052808201849052815180820383018152606090910190915280519101206123aa565b60006001600160e01b031982166380ac58cd60e01b1480614a9857506001600160e01b03198216635b5e139f60e01b145b8061109957506301ffc9a760e01b6001600160e01b0319831614611099565b6135b4828260405180602001604052806000815250614bfe565b611361838383614c31565b6000806000614aeb8585614ce9565b91509150614af881614d57565b509392505050565b60006001600160a01b0384163b15614bf657604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290614b44903390899088908890600401615db5565b6020604051808303816000875af1925050508015614b7f575060408051601f3d908101601f19168201909252614b7c91810190615df2565b60015b614bdc573d808015614bad576040519150601f19603f3d011682016040523d82523d6000602084013e614bb2565b606091505b508051600003614bd45760405162461bcd60e51b815260040161122c90615d1f565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506123aa565b5060016123aa565b614c088383614f0d565b614c156000848484614b00565b6113615760405162461bcd60e51b815260040161122c90615d1f565b6001600160a01b038316614c8c57614c8781600a80546000838152600b60205260408120829055600182018355919091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80155565b614caf565b816001600160a01b0316836001600160a01b031614614caf57614caf838261505b565b6001600160a01b038216614cc657611361816150f8565b826001600160a01b0316826001600160a01b0316146113615761136182826151a7565b6000808251604103614d1f5760208301516040840151606085015160001a614d13878285856151eb565b94509450505050614d50565b8251604003614d485760208301516040840151614d3d8683836152d8565b935093505050614d50565b506000905060025b9250929050565b6000816004811115614d6b57614d6b61554d565b03614d735750565b6001816004811115614d8757614d8761554d565b03614dd45760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161122c565b6002816004811115614de857614de861554d565b03614e355760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161122c565b6003816004811115614e4957614e4961554d565b03614ea15760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161122c565b6004816004811115614eb557614eb561554d565b0361414f5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b606482015260840161122c565b6001600160a01b038216614f635760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161122c565b6000818152600460205260409020546001600160a01b031615614fc85760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161122c565b614fd460008383614ad1565b6001600160a01b0382166000908152600560205260408120805460019290614ffd908490615a6e565b909155505060008181526004602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000600161506884612c73565b6150729190615b55565b6000838152600960205260409020549091508082146150c5576001600160a01b03841660009081526008602090815260408083208584528252808320548484528184208190558352600990915290208190555b5060009182526009602090815260408084208490556001600160a01b039094168352600881528383209183525290812055565b600a5460009061510a90600190615b55565b6000838152600b6020526040812054600a805493945090928490811061513257615132615b6c565b9060005260206000200154905080600a838154811061515357615153615b6c565b6000918252602080832090910192909255828152600b9091526040808220849055858252812055600a80548061518b5761518b615e0f565b6001900381819060005260206000200160009055905550505050565b60006151b283612c73565b6001600160a01b039093166000908152600860209081526040808320868452825280832085905593825260099052919091209190915550565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561522257506000905060036152cf565b8460ff16601b1415801561523a57508460ff16601c14155b1561524b57506000905060046152cf565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561529f573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166152c8576000600192509250506152cf565b9150600090505b94509492505050565b6000806001600160ff1b038316816152f560ff86901c601b615a6e565b9050615303878288856151eb565b935093505050935093915050565b82805461531d906159e7565b90600052602060002090601f01602090048101928261533f5760008555615385565b82601f1061535857805160ff1916838001178555615385565b82800160010185558215615385579182015b8281111561538557825182559160200191906001019061536a565b50615391929150615395565b5090565b5b808211156153915760008155600101615396565b6001600160e01b03198116811461414f57600080fd5b6000602082840312156153d257600080fd5b81356141f1816153aa565b60005b838110156153f85781810151838201526020016153e0565b838111156136855750506000910152565b600081518084526154218160208601602086016153dd565b601f01601f19169290920160200192915050565b6020815260006141f16020830184615409565b60006020828403121561545a57600080fd5b5035919050565b6001600160a01b038116811461414f57600080fd5b6000806040838503121561548957600080fd5b823561549481615461565b946020939093013593505050565b60008083601f8401126154b457600080fd5b50813567ffffffffffffffff8111156154cc57600080fd5b602083019150836020828501011115614d5057600080fd5b6000806000604084860312156154f957600080fd5b83359250602084013567ffffffffffffffff81111561551757600080fd5b615523868287016154a2565b9497909650939450505050565b60006020828403121561554257600080fd5b81356141f181615461565b634e487b7160e01b600052602160045260246000fd5b60208101601283106155775761557761554d565b91905290565b6000806040838503121561559057600080fd5b50508035926020909101359150565b6000806000606084860312156155b457600080fd5b83356155bf81615461565b925060208401356155cf81615461565b929592945050506040919091013590565b600080600080608085870312156155f657600080fd5b5050823594602084013594506040840135936060013592509050565b6000806020838503121561562557600080fd5b823567ffffffffffffffff81111561563c57600080fd5b615648858286016154a2565b90969095509350505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561569357615693615654565b604052919050565b600067ffffffffffffffff8311156156b5576156b5615654565b6156c8601f8401601f191660200161566a565b90508281528383830111156156dc57600080fd5b828260208301376000602084830101529392505050565b60006020828403121561570557600080fd5b813567ffffffffffffffff81111561571c57600080fd5b8201601f8101841361572d57600080fd5b6123aa8482356020840161569b565b60008060006060848603121561575157600080fd5b505081359360208301359350604090920135919050565b60006040828403121561577a57600080fd5b6040516040810181811067ffffffffffffffff8211171561579d5761579d615654565b604052823581526020928301359281019290925250919050565b801515811461414f57600080fd5b600080604083850312156157d857600080fd5b82356157e381615461565b915060208301356157f3816157b7565b809150509250929050565b60208101600383106155775761557761554d565b6000806000806080858703121561582857600080fd5b843561583381615461565b9350602085013561584381615461565b925060408501359150606085013567ffffffffffffffff81111561586657600080fd5b8501601f8101871361587757600080fd5b6158868782356020840161569b565b91505092959194509250565b600080604083850312156158a557600080fd5b823567ffffffffffffffff808211156158bd57600080fd5b818501915085601f8301126158d157600080fd5b81356020828211156158e5576158e5615654565b8160051b92506158f681840161566a565b828152928401810192818101908985111561591057600080fd5b948201945b8486101561593a578535935061592a84615461565b8382529482019490820190615915565b9997909101359750505050505050565b602080825282518282018190526000919060409081850190868401855b8281101561599857815180516001600160801b0316855286015160ff16868501529284019290850190600101615967565b5091979650505050505050565b60208101600483106155775761557761554d565b600080604083850312156159cc57600080fd5b82356159d781615461565b915060208301356157f381615461565b600181811c908216806159fb57607f821691505b602082108103615a1b57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60008219821115615a8157615a81615a58565b500190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060208284031215615acd57600080fd5b5051919050565b60208082526016908201527527b7363c9037b832b930ba37b91030b63637bbb2b21760511b604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b600082821015615b6757615b67615a58565b500390565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601260045260246000fd5b600082615ba757615ba7615b82565b500690565b600060018201615bbe57615bbe615a58565b5060010190565b604080825283519082018190526000906020906060840190828701845b82811015615c075781516001600160a01b031684529284019290840190600101615be2565b50505092019290925292915050565b60008151615c288185602086016153dd565b9290920192915050565b600080845481600182811c915080831680615c4e57607f831692505b60208084108203615c6d57634e487b7160e01b86526022600452602486fd5b818015615c815760018114615c9257615cbf565b60ff19861689528489019650615cbf565b60008b81526020902060005b86811015615cb75781548b820152908501908301615c9e565b505084890196505b505050505050615ce3615cd28286615c16565b64173539b7b760d91b815260050190565b95945050505050565b6000816000190483118215151615615d0657615d06615a58565b500290565b600082615d1a57615d1a615b82565b500490565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60018060a01b0384168152826020820152606060408201526000615ce36060830184615409565b600060208284031215615daa57600080fd5b81516141f1816157b7565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090615de890830184615409565b9695505050505050565b600060208284031215615e0457600080fd5b81516141f1816153aa565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220e81b784b9ce53fe1ae72ae7f73fe317ee7875aa2e330c5ec1927865205829e7564736f6c634300080e0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000270f000000000000000000000000000000000000000000000000013c31074902800000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952000000000000000000000000514910771af9ca656af840dff83e8264ecf986caaa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af44500000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000000005596f6b65650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003594f4b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000006000000000000000000000000e0a0262ac02312ba25d4b963e8375dac7bb173e2000000000000000000000000ffd52e420ba9dfa1394551ce77c0094d565ea4400000000000000000000000000082f288421026419ed6dcbf90c4e113dab9bb770000000000000000000000009939a8c8293f0a720c4843d1c6c20594ee6a9218000000000000000000000000bacf5a6a349acae3be6be11db6400a033d875dad000000000000000000000000cffff14187372ad7160871ebc76f5403931db00a00000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000013000000000000000000000000000000000000000000000000000000000000002a000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a
-----Decoded View---------------
Arg [0] : _tokenName (string): Yokee
Arg [1] : _symbol (string): YOK
Arg [2] : _maxSupply (uint256): 9999
Arg [3] : _startPrice (uint256): 89000000000000000
Arg [4] : _defaultURI (string):
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---------------
30 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000160
Arg [2] : 000000000000000000000000000000000000000000000000000000000000270f
Arg [3] : 000000000000000000000000000000000000000000000000013c310749028000
Arg [4] : 00000000000000000000000000000000000000000000000000000000000001a0
Arg [5] : 000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952
Arg [6] : 000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca
Arg [7] : aa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af445
Arg [8] : 00000000000000000000000000000000000000000000000000000000000001c0
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [10] : 596f6b6565000000000000000000000000000000000000000000000000000000
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [12] : 594f4b0000000000000000000000000000000000000000000000000000000000
Arg [13] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [14] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [15] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [16] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [17] : 000000000000000000000000e0a0262ac02312ba25d4b963e8375dac7bb173e2
Arg [18] : 000000000000000000000000ffd52e420ba9dfa1394551ce77c0094d565ea440
Arg [19] : 0000000000000000000000000082f288421026419ed6dcbf90c4e113dab9bb77
Arg [20] : 0000000000000000000000009939a8c8293f0a720c4843d1c6c20594ee6a9218
Arg [21] : 000000000000000000000000bacf5a6a349acae3be6be11db6400a033d875dad
Arg [22] : 000000000000000000000000cffff14187372ad7160871ebc76f5403931db00a
Arg [23] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [24] : 0000000000000000000000000000000000000000000000000000000000000013
Arg [25] : 000000000000000000000000000000000000000000000000000000000000002a
Arg [26] : 0000000000000000000000000000000000000000000000000000000000000014
Arg [27] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [28] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [29] : 000000000000000000000000000000000000000000000000000000000000000a
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.