ERC-721
Overview
Max Total Supply
1,111 AOP
Holders
356
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 AOPLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
ArchOfPeace
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; import "./MonuverseEpisode.sol"; import "erc721psi/contracts/extension/ERC721PsiBurnable.sol"; import "./ArchOfPeaceEntropy.sol"; import "./ArchOfPeaceWhitelist.sol"; import "@openzeppelin/contracts/finance/PaymentSplitter.sol"; import "fpe-map/contracts/FPEMap.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; /*░└╬┘░*\ ░ ░█░┘────════════╩════════────└╩┘── ▒ ▒█ ████████████████████████████████ ▒█ ═════════════╗░░▒▒▒▒▒░░╔═════════════ ▒ ▒ █▒▒▒░░░░▒▒▒░░╚═════════╝░░▒▒▒░░░░░░▒ ░ █▒ █ ███████████░░░▒▒▒░░░█████████████ █ ░╦░ ╦╦╦ ╚█████████╝ ╦╦╦ ╦╦╦ │▒│░░▒▒▒│█│░▒▒▒░░ ░░▒▒▒░│█│▒▒▒░░│█│ ▒ │█│─────│█│─═▒░╔═╩═╗░▒══│█│═════│█│═ │█│░▒▒░░│█│▒░┌┘' '╚╗░▒│█│░░▒▒░│█│ │▒│▒▒░ ░│█│░┌┘ \┌┴┐/ ╚╗░│█│░ ░▒▒│█│ │▒░┌┴░│█│░│ ┘ └┐ ║░│█│╔╩╗░▒│█│ │▒│▒┌┘\ │█│░│ └┐║░│█│╝/╚╗▒│█│ █ │█│▒│┌┘ │█│ │ │║▒│█│ └┐║▒│█│ █ ▒ ╩╩╩▒││ ╩╩╩░│ ░ │║▒╩╩╩ │║▒╩╩╩ ░ █ ▒███▒││ ████▒│ ░░░ │║▒████ │║▒████ ░ ▒█ ▒██▒█▒││ ████▒│ ░░░░░ │║▒████ │║▒████ __ __ ___ ▒█▒▒█▒││ ██▒░▒│ ░░░▒░░░│║▒████_│║▒████_____________________ | \/ |/ _ \█ \░▒ |│ ▒█ |\ \░░▒▒▒░░/ /__ ____/__ __ \_ ___/__ ____/ | |\/| | | | | \▒ |│ ░▒ | \ ░▒▒▒▒▒░ /__ __/ __ /_/ /____ \__ __/ | | | | |_| | |\ | \_░ | \ ▒▒█▒▒ /__ /___ _ _, _/____/ /_ /___ |_| |_|\___/|_| \_|\___/ \ ███ / /_____/ /_/ |_| /____/ /_____/ \ █ / creativity by Ouchhh \*/ /** * @title Monuverse Episode 1 ─ Arch Of Peace * @author Maxim Gaina * * @notice ArchOfPeace Collection Contract with * @notice On-chain programmable lifecycle and, regardless of collection size, * @notice O(1) fully decentralized and unpredictable reveal. * * @dev ArchOfPeace Collection is a Monuverse Episode; * @dev an Episode has a lifecycle that is composed of Chapters; * @dev each Chapter selectively enables contract features and emits Monumental Events; * @dev each Monumental Event can make the Episode transition into a new Chapter; * @dev each transition follows the onchain programmable story branching; * @dev episode branching is a configurable Deterministic Finite Automata. */ contract ArchOfPeace is MonuverseEpisode, ArchOfPeaceEntropy, ArchOfPeaceWhitelist, ERC721PsiBurnable, PaymentSplitter { using FPEMap for uint256; using Strings for uint256; uint256 private _maxSupply; string private _archVeilURI; string private _archBaseURI; mapping(address => uint256) _mintCounter; constructor( uint256 maxSupply_, string memory name_, string memory symbol_, string memory archVeilURI_, string memory archBaseURI_, string memory initialChapter_, address vrfCoordinator_, bytes32 vrfGasLane_, uint64 vrfSubscriptionId_, address[] memory payee_, uint256[] memory shares_ ) MonuverseEpisode(initialChapter_) ArchOfPeaceEntropy(vrfCoordinator_, vrfGasLane_, vrfSubscriptionId_) ERC721Psi(name_, symbol_) PaymentSplitter(payee_, shares_) { _maxSupply = maxSupply_; _archVeilURI = archVeilURI_; _archBaseURI = archBaseURI_; } function setWhitelistRoot(bytes32 newWhitelistRoot) public override onlyWhitelistingChapter onlyOwner { super.setWhitelistRoot(newWhitelistRoot); } function mint( uint256 quantity, uint256 limit, bytes32 group, bytes32[] memory proof ) public payable whenNotPaused { if (!_chapterAllowsOpenMint()) { require( isAccountWhitelisted(limit, group, proof), "ArchOfPeace: sender not whitelisted" ); } require(entropy() == 0, "ArchOfPeace: already revealed"); require( _isQuantityWhitelisted(_mintCounter[_msgSender()], quantity, limit), "ArchOfPeace: quantity not allowed" ); require(_chapterAllowsMint(quantity, _minted), "ArchOfPeace: no mint chapter"); require(_chapterAllowsMintGroup(group), "ArchOfPeace: group not allowed"); require(_chapterMatchesOffer(quantity, msg.value, group), "ArchOfPeace: offer unmatched"); _mintCounter[_msgSender()] += quantity; _mint(_msgSender(), quantity); if (_minted == chapterMintLimit()) { _maxSupply == chapterMintLimit() ? _emitMonumentalEvent(EpisodeMinted.selector) : _emitMonumentalEvent(ChapterMinted.selector); } } function mint(uint256 quantity) public payable { mint(quantity, 3, currentChapter(), new bytes32[](0x00)); } /** * @notice Reveals the entire collection when call effects are successful. * * @dev Requests a random seed that will be fulfilled in the future; * @dev seed will be used to randomly map token ids to metadata ids; * @dev callable only once in the entire Episode (i.e. collection lifecycle), * @dev that is, if seed is still default value and not waiting for any request; * @dev callable by anyone at any moment only during Reveal Chapter. */ function reveal() public onlyRevealChapter whenNotPaused { require(entropy() == 0, "ArchOfPeace: already revealed"); require(!fulfilling(), "ArchOfPeace: currently fulfilling"); _requestRandomWord(); } function fulfillRandomWords(uint256, uint256[] memory randomWords) internal override onlyRevealChapter emitsEpisodeRevealedEvent { super.fulfillRandomWords(0, randomWords); } function sealMinting() external onlyMintChapter onlyOwner { require(_minted > 0, "ArchOfPeace: no token minted"); _emitMonumentalEvent(MintingSealed.selector); } function burn(uint256 tokenId) public { require(_exists(tokenId), "ArchOfPeace: non existent token"); require(_msgSender() == ownerOf(tokenId), "ArchOfPeace: sender not token owner"); super._burn(tokenId); } /** * @notice Obtains mapped URI for an existing token. * @param tokenId existing token ID. * * @dev Pre-reveal all tokens are mapped to the same `_archVeilURI`; * @dev post-reveal each token is unpredictably mapped to its own URI; * @dev post-reveal is when VRFCoordinatorV2 has successfully fulfilled random word request; * @dev more info https://mirror.xyz/ctor.xyz/ZEY5-wn-3EeHzkTUhACNJZVKc0-R6EsDwwHMr5YJEn0. * * @return tokenURI token URI string */ function tokenURI(uint256 tokenId) public view override returns (string memory) { require(_exists(tokenId), "ArchOfPeace: non existent token"); return entropy() == 0 ? _archVeilURI : string( abi.encodePacked( _archBaseURI, tokenId.fpeMappingFeistelAuto(entropy(), _maxSupply).toString() ) ); } function tokensMintedByUser(address minter) public view returns (uint256) { return _mintCounter[minter]; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; import "@openzeppelin/contracts/access/Ownable.sol"; import "@chainlink/contracts/src/v0.8/interfaces/VRFCoordinatorV2Interface.sol"; import "@chainlink/contracts/src/v0.8/VRFConsumerBaseV2.sol"; contract ArchOfPeaceEntropy is VRFConsumerBaseV2, Ownable { VRFCoordinatorV2Interface private immutable _coordinator; struct VRFRequestParams { bytes32 gasLane; uint64 subscriptionId; uint16 requestConfirmations; uint32 callbackGasLimit; } VRFRequestParams private _vrfRequestParams; bool private _fulfilling; uint256 private _entropy; event RandomnessRequested(uint256 requestId); constructor( address coordinator_, bytes32 gasLane_, uint64 subscriptionId_ ) VRFConsumerBaseV2(coordinator_) { _coordinator = VRFCoordinatorV2Interface(coordinator_); _vrfRequestParams = VRFRequestParams(gasLane_, subscriptionId_, 5, 300000); } /// @notice Assumes the subscription is set sufficiently funded function _requestRandomWord() internal { uint256 requestId = _coordinator.requestRandomWords( _vrfRequestParams.gasLane, _vrfRequestParams.subscriptionId, _vrfRequestParams.requestConfirmations, _vrfRequestParams.callbackGasLimit, 1 ); _fulfilling = true; emit RandomnessRequested(requestId); } function fulfillRandomWords( uint256, /* requestId */ uint256[] memory randomWords ) internal virtual override { _entropy = randomWords[0]; _fulfilling = false; } // TODO: cover function updateVRFParams(VRFRequestParams calldata newParams) public onlyOwner { _vrfRequestParams = newParams; } function fulfilling() public view returns (bool) { return _fulfilling; } function entropy() public view returns (uint256) { return _entropy; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; // import "./MonuverseEpisode.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract ArchOfPeaceWhitelist is Ownable { bytes32 private _whitelistRoot; function setWhitelistRoot(bytes32 newWhitelistRoot) public virtual onlyOwner { _whitelistRoot = newWhitelistRoot; } function isAccountWhitelisted( address account, uint256 limit, bytes32 birth, bytes32[] memory proof ) public view returns (bool) { require( owner() == _msgSender() || account == _msgSender(), "ArchOfPeaceWhitelist: account check forbidden" ); return MerkleProof.verify( proof, _whitelistRoot, _generateWhitelistLeaf(account, limit, birth) ); } function isAccountWhitelisted( uint256 limit, bytes32 birth, bytes32[] memory proof ) public view returns (bool) { return isAccountWhitelisted(_msgSender(), limit, birth, proof); } function whitelistRoot() public view returns (bytes32) { return _whitelistRoot; } function _generateWhitelistLeaf( address account, uint256 limit, bytes32 birth ) internal pure returns (bytes32) { return keccak256(abi.encodePacked(account, limit, birth)); } function _isQuantityWhitelisted( uint256 balance, uint256 quantity, uint256 limit ) internal pure returns (bool) { return balance + quantity <= limit; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; import "./IMonuverseEpisode.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "./DFA.sol"; contract MonuverseEpisode is IMonuverseEpisode, Ownable, Pausable { using DFA for DFA.Dfa; /// @dev Episode Chapters mapping(bytes32 => Chapter) private _chapters; /// @dev Episode story Branching DFA.Dfa private _branching; /// @dev Current Chapter bytes32 private _current; modifier onlyInitialChapter() { require(_current == _branching.initial(), "MonuverseEpisode: updates forbidden"); _; } modifier onlyWhitelistingChapter() { require(_chapters[_current].whitelisting, "MonuverseEpisode: whitelisting not allowed"); _; } modifier onlyMintChapter() { require(_chapters[_current].minting.limit > 0, "MonuverseEpisode: mint not allowed"); _; } modifier onlyRevealChapter() { require(_chapters[_current].revealing, "MonuverseEpisode: reveal not allowed"); _; } modifier emitsEpisodeRevealedEvent() { _; _emitMonumentalEvent(EpisodeRevealed.selector); } constructor(string memory initial_) { _current = writeChapter(initial_, false, 0, 0, false, false, false); _branching.setInitial(_current); } /** * @dev It's still possible to insert mint chapter after reveal chapter * @dev since DFAs don't have state order guarantees: make mint function * @dev check for occured reveal. */ function writeChapter( string memory label, bool whitelisting, uint256 mintAllocation, uint256 mintPrice, bool mintOpen, bool revealing, bool isConclusion ) public onlyOwner onlyInitialChapter returns (bytes32) { require( /// @dev Logical conversion from `isConlusion => everything disabled` !isConclusion || (!whitelisting && mintAllocation == 0 && !revealing), "MonuverseEpisode: features disabled during conclusion" ); require( !(revealing && mintAllocation > 0), "MonuverseEpisode: reveal with mint forbidden" ); _chapters[_hash(label)].whitelisting = whitelisting; _chapters[_hash(label)].minting.limit = mintAllocation; _chapters[_hash(label)].minting.price = mintPrice; _chapters[_hash(label)].minting.isOpen = mintOpen; _chapters[_hash(label)].revealing = revealing; _chapters[_hash(label)].exists = true; isConclusion ? _branching.addAccepting(_hash(label)) : _branching.removeAccepting(_hash(label)); emit ChapterWritten( label, whitelisting, mintAllocation, mintPrice, mintOpen, revealing, isConclusion ); return _hash(label); } /// @dev Chapter-related transitions should be separately removed before, /// @dev MintGroupRules should be removed separately before. function removeChapter(string calldata label) external onlyOwner onlyInitialChapter { require(_branching.initial() != _hash(label), "MonuverseEpisode: initial non deletable"); delete _chapters[_hash(label)]; emit ChapterRemoved(label); } function writeMintGroup( string calldata chapter, string calldata group, MintGroupRules calldata mintRules ) external onlyOwner onlyInitialChapter { require(_chapters[_hash(group)].exists, "MonuverseEpisode: group non existent"); require( _chapters[_hash(chapter)].minting.limit > 0, "MonuverseEpisode: chapter mint disabled" ); _chapters[_hash(chapter)].minting.rules[_hash(group)] = mintRules; emit MintGroupWritten(chapter, group, mintRules.fixedPrice); } function removeMintGroup(string calldata chapter, string calldata group) external onlyOwner onlyInitialChapter { delete _chapters[_hash(chapter)].minting.rules[_hash(group)]; emit MintGroupRemoved(chapter, group); } function writeTransition( string calldata from, string calldata to, string calldata monumentalEvent ) external onlyOwner onlyInitialChapter { require(_chapters[_hash(from)].exists, "MonuverseEpisode: from not set"); require(_chapters[_hash(to)].exists, "MonuverseEpisode: to not set"); _branching.addTransition( _hash(from), _hash(to), keccak256(abi.encodePacked(monumentalEvent, "(bytes32,bytes32)")) ); emit TransitionWritten(from, to, monumentalEvent); } function removeTransition(string calldata from, string calldata monumentalEvent) external onlyOwner onlyInitialChapter { _branching.removeTransition(_hash(from), _hash(monumentalEvent)); emit TransitionRemoved(from, monumentalEvent); } function emitOnlifeEvent() public onlyOwner { _emitMonumentalEvent(EpisodeProgressedOnlife.selector); } /** * @dev `aux` equals `_current` when transition destination is same as origin, * @dev `aux` equals `_current` also when no transition has been specified, * @dev (to prevent user from seeing its tx reverted) * @return aux previous state, 0x00 if no transition exists * @return _current new current post-transition state */ function _tryTransition(bytes32 symbol) private returns (bytes32, bytes32) { bytes32 aux = _branching.transition(_current, symbol); if (_current != aux && aux != 0x00) { (_current, aux) = (aux, _current); } return (aux, _current); } function _emitMonumentalEvent(bytes32 selector) internal whenNotPaused { (bytes32 prev, bytes32 current) = _tryTransition(selector); if (selector == ChapterMinted.selector) { emit ChapterMinted(prev, current); } else if (selector == EpisodeProgressedOnlife.selector) { emit EpisodeProgressedOnlife(prev, current); } else if (selector == EpisodeMinted.selector) { emit EpisodeMinted(prev, current); } else if (selector == MintingSealed.selector) { emit MintingSealed(prev, current); } else if (selector == EpisodeRevealed.selector) { emit EpisodeRevealed(prev, current); } else { revert("MonuverseEpisode: event non existent"); } } function initialChapter() public view returns (bytes32) { return _branching.initial(); } function currentChapter() public view returns (bytes32) { return _current; } function groupRule(string calldata label, string calldata group) public view returns (bool, bool) { return ( _chapters[_hash(label)].minting.rules[_hash(group)].enabled, _chapters[_hash(label)].minting.rules[_hash(group)].fixedPrice ); } function chapterMintLimit() public view returns (uint256) { return _chapters[_current].minting.limit; } function currentDefaultPrice() public view returns (uint256) { return _currentGroupPrice(_current); } function currentGroupPrice(string calldata group) public view returns (uint256) { return _currentGroupPrice(_hash(group)); } function offerMatchesGroupPrice( string calldata group, uint256 quantity, uint256 offer ) public view returns (bool) { return _offerMatchesGroupPrice(_hash(group), quantity, offer); } function isFinal() public view returns (bool) { return _branching.isAccepting(_current); } /** * @notice Calculates current group price for minting. * * @dev Also works when minting is forbidden, but it doesn't matter * @dev since `enabled` actually responds for allowing it or not. * * @param group for which current price has to be calculated * @return price of minting. */ function _currentGroupPrice(bytes32 group) internal view returns (uint256) { uint256 price; _chapters[_current].minting.rules[group].fixedPrice ? price = _chapters[group].minting.price : price = _chapters[_current].minting.price; return price; } function _offerMatchesGroupPrice( bytes32 group, uint256 quantity, uint256 offer ) internal view returns (bool) { return quantity * _currentGroupPrice(group) <= offer; } /** * @notice Checks for two conditions at once: * @notice (a) if minting allowed at all (current chapter allocation > 0), and * @notice (b) if current available chapter allocation is not enough for quantity. */ function _chapterAllowsMint(uint256 quantity, uint256 minted) internal view returns (bool) { return minted + quantity <= _chapters[_current].minting.limit; } function _chapterAllowsOpenMint() internal view returns (bool) { return _chapters[_current].minting.isOpen; } /** * @param group of Minters. * @return boolean true if group is current chapter, is open mint or enabled. */ function _chapterAllowsMintGroup(bytes32 group) internal view returns (bool) { return group == _current || _chapters[_current].minting.isOpen || _chapters[_current].minting.rules[group].enabled; } function _chapterMatchesOffer( uint256 quantity, uint256 offer, bytes32 group ) internal view returns (bool) { return quantity * _currentGroupPrice(group) <= offer; } function _hash(string memory str) internal pure returns (bytes32) { return keccak256(abi.encodePacked(str)); } }
//SPDX-License-Identifier: MIT /** ███████╗██████╗ ███████╗ ███╗ ███╗ █████╗ ██████╗ ██╔════╝██╔══██╗██╔════╝ ████╗ ████║██╔══██╗██╔══██╗ █████╗ ██████╔╝█████╗█████╗██╔████╔██║███████║██████╔╝ ██╔══╝ ██╔═══╝ ██╔══╝╚════╝██║╚██╔╝██║██╔══██║██╔═══╝ ██║ ██║ ███████╗ ██║ ╚═╝ ██║██║ ██║██║ ╚═╝ ╚═╝ ╚══════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ github: https://github.com/estarriolvetch/fpe-mapping */ pragma solidity ^0.8.0; import "solidity-bits/contracts/BitScan.sol"; import "./Feistel.sol"; library FPEMap { using Feistel for uint256; string constant DOMAIN_ERROR_MSG = "The FPE domain should be within the domain of the Fiestel network (domain <= 2 ** size)"; string constant INPUT_OUTSIDE_DOMAIN_ERROR_MSG = "input is not within the domain"; uint256 constant DEFAULT_ROUND = 3; function fpeMappingFeistel(uint256 input, uint256 key, uint256 round, uint256 size, uint256 domain) internal pure returns (uint256 output) { require(input < domain, INPUT_OUTSIDE_DOMAIN_ERROR_MSG); require(2 ** size >= domain, DOMAIN_ERROR_MSG); while(true) { output = input.feistel(key, round, size); if(output < domain) { break; } else { input = output; } } } function fpeMappingFeistelUnbalanced(uint256 input, uint256 key, uint256 round, uint256 size, uint256 domain) internal pure returns (uint256 output) { require(input < domain, INPUT_OUTSIDE_DOMAIN_ERROR_MSG); require(2 ** size >= domain, DOMAIN_ERROR_MSG); while(true) { output = input.feistelUnbalanced(key, round, size); if(output < domain) { break; } else { input = output; } } } function fpeMappingFeistelAuto(uint256 input, uint256 key, uint256 domain) internal pure returns (uint256 output) { require(input < domain, INPUT_OUTSIDE_DOMAIN_ERROR_MSG); uint256 size; // Calculate the smallest required block size of the unbalanced Feistel network unchecked { size = BitScan.log2(domain) + 1; } while(true) { output = input.feistelUnbalanced(key, DEFAULT_ROUND, size); if(output < domain) { break; } else { input = output; } } } }
// SPDX-License-Identifier: MIT /** ______ _____ _____ ______ ___ __ _ _ _ | ____| __ \ / ____|____ |__ \/_ | || || | | |__ | |__) | | / / ) || | \| |/ | | __| | _ /| | / / / / | |\_ _/ | |____| | \ \| |____ / / / /_ | | | | |______|_| \_\\_____|/_/ |____||_| |_| */ pragma solidity ^0.8.0; import "solidity-bits/contracts/BitMaps.sol"; import "../ERC721Psi.sol"; abstract contract ERC721PsiBurnable is ERC721Psi { using BitMaps for BitMaps.BitMap; BitMaps.BitMap private _burnedToken; /** * @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 from = ownerOf(tokenId); _beforeTokenTransfers(from, address(0), tokenId, 1); _burnedToken.set(tokenId); emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); } /** * @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 override virtual returns (bool){ if(_burnedToken.get(tokenId)) { return false; } return super._exists(tokenId); } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _minted - _burned(); } /** * @dev Returns number of token burned. */ function _burned() internal view returns (uint256 burned){ uint256 totalBucket = (_minted >> 8) + 1; for(uint256 i=0; i < totalBucket; i++) { uint256 bucket = _burnedToken.getBucket(i); burned += _popcount(bucket); } } /** * @dev Returns number of set bits. */ function _popcount(uint256 x) private pure returns (uint256 count) { unchecked{ for (count=0; x!=0; count++) x &= x - 1; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // 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); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (finance/PaymentSplitter.sol) pragma solidity ^0.8.0; import "../token/ERC20/utils/SafeERC20.sol"; import "../utils/Address.sol"; import "../utils/Context.sol"; /** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each * account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim * an amount proportional to the percentage of total shares they were assigned. The distribution of shares is set at the * time of contract deployment and can't be updated thereafter. * * `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the * accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release} * function. * * NOTE: This contract assumes that ERC20 tokens will behave similarly to native tokens (Ether). Rebasing tokens, and * tokens that apply fees during transfers, are likely to not be supported as expected. If in doubt, we encourage you * to run tests before sending real value to this contract. */ contract PaymentSplitter is Context { event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount); event PaymentReceived(address from, uint256 amount); uint256 private _totalShares; uint256 private _totalReleased; mapping(address => uint256) private _shares; mapping(address => uint256) private _released; address[] private _payees; mapping(IERC20 => uint256) private _erc20TotalReleased; mapping(IERC20 => mapping(address => uint256)) private _erc20Released; /** * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at * the matching position in the `shares` array. * * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no * duplicates in `payees`. */ constructor(address[] memory payees, uint256[] memory shares_) payable { require(payees.length == shares_.length, "PaymentSplitter: payees and shares length mismatch"); require(payees.length > 0, "PaymentSplitter: no payees"); for (uint256 i = 0; i < payees.length; i++) { _addPayee(payees[i], shares_[i]); } } /** * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the * reliability of the events, and not the actual splitting of Ether. * * To learn more about this see the Solidity documentation for * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback * functions]. */ receive() external payable virtual { emit PaymentReceived(_msgSender(), msg.value); } /** * @dev Getter for the total shares held by payees. */ function totalShares() public view returns (uint256) { return _totalShares; } /** * @dev Getter for the total amount of Ether already released. */ function totalReleased() public view returns (uint256) { return _totalReleased; } /** * @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20 * contract. */ function totalReleased(IERC20 token) public view returns (uint256) { return _erc20TotalReleased[token]; } /** * @dev Getter for the amount of shares held by an account. */ function shares(address account) public view returns (uint256) { return _shares[account]; } /** * @dev Getter for the amount of Ether already released to a payee. */ function released(address account) public view returns (uint256) { return _released[account]; } /** * @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an * IERC20 contract. */ function released(IERC20 token, address account) public view returns (uint256) { return _erc20Released[token][account]; } /** * @dev Getter for the address of the payee number `index`. */ function payee(uint256 index) public view returns (address) { return _payees[index]; } /** * @dev Getter for the amount of payee's releasable Ether. */ function releasable(address account) public view returns (uint256) { uint256 totalReceived = address(this).balance + totalReleased(); return _pendingPayment(account, totalReceived, released(account)); } /** * @dev Getter for the amount of payee's releasable `token` tokens. `token` should be the address of an * IERC20 contract. */ function releasable(IERC20 token, address account) public view returns (uint256) { uint256 totalReceived = token.balanceOf(address(this)) + totalReleased(token); return _pendingPayment(account, totalReceived, released(token, account)); } /** * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the * total shares and their previous withdrawals. */ function release(address payable account) public virtual { require(_shares[account] > 0, "PaymentSplitter: account has no shares"); uint256 payment = releasable(account); require(payment != 0, "PaymentSplitter: account is not due payment"); _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 payment = releasable(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.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /** **************************************************************************** * @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. It ensures 2 things: * @dev 1. The fulfillment came from the VRFCoordinator * @dev 2. The consumer contract implements fulfillRandomWords. * ***************************************************************************** * @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) 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). Create subscription, fund it * @dev and your consumer contract as a consumer of it (see VRFCoordinatorInterface * @dev subscription management functions). * @dev Call requestRandomWords(keyHash, subId, minimumRequestConfirmations, * @dev callbackGasLimit, numWords), * @dev see (VRFCoordinatorInterface for a description of the arguments). * * @dev Once the VRFCoordinator has received and validated the oracle's response * @dev to your request, it will call your contract's fulfillRandomWords method. * * @dev The randomness argument to fulfillRandomWords is a set of random words * @dev generated from your requestId and the blockHash of the request. * * @dev If your contract could have concurrent requests open, you can use the * @dev requestId returned from requestRandomWords to track which response is associated * @dev with which randomness request. * @dev 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. * * ***************************************************************************** * @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 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. It is for this reason that * @dev that you can signal to an oracle you'd like them to wait longer before * @dev responding to the request (however this is not enforced in the contract * @dev and so remains effective only in the case of unmodified oracle software). */ abstract contract VRFConsumerBaseV2 { error OnlyCoordinatorCanFulfill(address have, address want); address private immutable vrfCoordinator; /** * @param _vrfCoordinator address of VRFCoordinator contract */ constructor(address _vrfCoordinator) { vrfCoordinator = _vrfCoordinator; } /** * @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 VRFConsumerBaseV2 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 randomWords the VRF output expanded to the requested number of words */ function fulfillRandomWords(uint256 requestId, uint256[] memory randomWords) internal virtual; // rawFulfillRandomness is called by VRFCoordinator when it receives a valid VRF // proof. rawFulfillRandomness then calls fulfillRandomness, after validating // the origin of the call function rawFulfillRandomWords(uint256 requestId, uint256[] memory randomWords) external { if (msg.sender != vrfCoordinator) { revert OnlyCoordinatorCanFulfill(msg.sender, vrfCoordinator); } fulfillRandomWords(requestId, randomWords); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface VRFCoordinatorV2Interface { /** * @notice Get configuration relevant for making requests * @return minimumRequestConfirmations global min for request confirmations * @return maxGasLimit global max for request gas limit * @return s_provingKeyHashes list of registered key hashes */ function getRequestConfig() external view returns ( uint16, uint32, bytes32[] memory ); /** * @notice Request a set of random words. * @param keyHash - Corresponds to a particular oracle job which uses * that key for generating the VRF proof. Different keyHash's have different gas price * ceilings, so you can select a specific one to bound your maximum per request cost. * @param subId - The ID of the VRF subscription. Must be funded * with the minimum subscription balance required for the selected keyHash. * @param minimumRequestConfirmations - How many blocks you'd like the * oracle to wait before responding to the request. See SECURITY CONSIDERATIONS * for why you may want to request more. The acceptable range is * [minimumRequestBlockConfirmations, 200]. * @param callbackGasLimit - How much gas you'd like to receive in your * fulfillRandomWords callback. Note that gasleft() inside fulfillRandomWords * may be slightly less than this amount because of gas used calling the function * (argument decoding etc.), so you may need to request slightly more than you expect * to have inside fulfillRandomWords. The acceptable range is * [0, maxGasLimit] * @param numWords - The number of uint256 random values you'd like to receive * in your fulfillRandomWords callback. Note these numbers are expanded in a * secure way by the VRFCoordinator from a single random value supplied by the oracle. * @return requestId - A unique identifier of the request. Can be used to match * a request to a response in fulfillRandomWords. */ function requestRandomWords( bytes32 keyHash, uint64 subId, uint16 minimumRequestConfirmations, uint32 callbackGasLimit, uint32 numWords ) external returns (uint256 requestId); /** * @notice Create a VRF subscription. * @return subId - A unique subscription id. * @dev You can manage the consumer set dynamically with addConsumer/removeConsumer. * @dev Note to fund the subscription, use transferAndCall. For example * @dev LINKTOKEN.transferAndCall( * @dev address(COORDINATOR), * @dev amount, * @dev abi.encode(subId)); */ function createSubscription() external returns (uint64 subId); /** * @notice Get a VRF subscription. * @param subId - ID of the subscription * @return balance - LINK balance of the subscription in juels. * @return reqCount - number of requests for this subscription, determines fee tier. * @return owner - owner of the subscription. * @return consumers - list of consumer address which are able to use this subscription. */ function getSubscription(uint64 subId) external view returns ( uint96 balance, uint64 reqCount, address owner, address[] memory consumers ); /** * @notice Request subscription owner transfer. * @param subId - ID of the subscription * @param newOwner - proposed new owner of the subscription */ function requestSubscriptionOwnerTransfer(uint64 subId, address newOwner) external; /** * @notice Request subscription owner transfer. * @param subId - ID of the subscription * @dev will revert if original owner of subId has * not requested that msg.sender become the new owner. */ function acceptSubscriptionOwnerTransfer(uint64 subId) external; /** * @notice Add a consumer to a VRF subscription. * @param subId - ID of the subscription * @param consumer - New consumer which can use the subscription */ function addConsumer(uint64 subId, address consumer) external; /** * @notice Remove a consumer from a VRF subscription. * @param subId - ID of the subscription * @param consumer - Consumer to remove from the subscription */ function removeConsumer(uint64 subId, address consumer) external; /** * @notice Cancel a subscription * @param subId - ID of the subscription * @param to - Where to send the remaining LINK to */ function cancelSubscription(uint64 subId, address to) external; /* * @notice Check to see if there exists a request commitment consumers * for all consumers and keyhashes for a given sub. * @param subId - ID of the subscription * @return true if there exists at least one unfulfilled request for the subscription, false * otherwise. */ function pendingRequestExists(uint64 subId) external view returns (bool); }
// 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.7.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Calldata version of {verify} * * _Available since v4.7._ */ function verifyCalldata( bytes32[] calldata proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} * * _Available since v4.7._ */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be proved to be a part of a Merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * _Available since v4.7._ */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * _Available since v4.7._ */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and the sibling nodes in `proof`, * consuming from one or the other at each step according to the instructions given by * `proofFlags`. * * _Available since v4.7._ */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof} * * _Available since v4.7._ */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0 <0.9.0; interface IMonuverseEpisode { struct MintGroupRules { bool enabled; bool fixedPrice; } struct Minting { uint256 limit; uint256 price; mapping(bytes32 => MintGroupRules) rules; bool isOpen; } struct Chapter { Minting minting; bool whitelisting; bool revealing; bool exists; } /// @notice Episode writing events event ChapterWritten( string label, bool whitelisting, uint256 mintAllocation, uint256 mintPrice, bool mintOpen, bool revealing, bool isConclusion ); event ChapterRemoved(string label); event TransitionWritten(string from, string to, string monumentalEvent); event TransitionRemoved(string from, string monumentalEvent); event MintGroupWritten(string chapter, string group, bool fixedPrice); event MintGroupRemoved(string chapter, string group); /// @notice Special Monumental Events event ChapterMinted(bytes32 prev, bytes32 current); event MintingSealed(bytes32 prev, bytes32 current); event EpisodeMinted(bytes32 prev, bytes32 current); event EpisodeRevealed(bytes32 prev, bytes32 current); event EpisodeProgressedOnlife(bytes32 prev, bytes32 current); function writeChapter( string calldata label, bool whitelisting, uint256 mintAllocation, uint256 mintPrice, bool mintOpen, bool revealing, bool isConlusion ) external returns (bytes32); function removeChapter(string calldata label) external; function writeMintGroup( string calldata chapter, string calldata group, MintGroupRules calldata mintingRules ) external; function removeMintGroup(string calldata chapter, string calldata group) external; function writeTransition( string calldata from, string calldata to, string calldata storyEvent ) external; function removeTransition(string calldata from, string calldata storyEvent) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @dev Each possible state except default value (0x00) is a valid state /// @dev Any valid state can only be reached if there is a transition allowing so /// @dev DFA correctness and minimization has to be evaluated offchain /// @dev DFA eventual runtime info must be kept into importing contract or offchain library DFA { struct Dfa { bytes32 init; mapping(bytes32 => bool) accepting; mapping(bytes32 => mapping(bytes32 => bytes32)) transitions; } function addTransition(Dfa storage self, bytes32 from, bytes32 to, bytes32 symbol) internal { require(from != 0x00, "DFA: from invalid"); require(to != 0x00, "DFA: to invalid"); require(self.transitions[from][symbol] == 0x00, "DFA: existent transition"); self.transitions[from][symbol] = to; } function removeTransition(Dfa storage self, bytes32 from, bytes32 symbol) internal { delete self.transitions[from][symbol]; } function setInitial(Dfa storage self, bytes32 state) internal { self.init = state; } function addAccepting(Dfa storage self, bytes32 state) internal { self.accepting[state] = true; } function removeAccepting(Dfa storage self, bytes32 state) internal { delete self.accepting[state]; } /// @dev Caller must handle non existing transition returning 0x00 function transition(Dfa storage self, bytes32 from, bytes32 symbol) internal view returns (bytes32) { return self.transitions[from][symbol]; } function isAccepting(Dfa storage self, bytes32 state) internal view returns (bool) { return self.accepting[state]; } function initial(Dfa storage self) internal view returns (bytes32) { return self.init; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { require(paused(), "Pausable: not paused"); } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
//SPDX-License-Identifier: MIT /** ███████╗██████╗ ███████╗ ███╗ ███╗ █████╗ ██████╗ ██╔════╝██╔══██╗██╔════╝ ████╗ ████║██╔══██╗██╔══██╗ █████╗ ██████╔╝█████╗█████╗██╔████╔██║███████║██████╔╝ ██╔══╝ ██╔═══╝ ██╔══╝╚════╝██║╚██╔╝██║██╔══██║██╔═══╝ ██║ ██║ ███████╗ ██║ ╚═╝ ██║██║ ██║██║ ╚═╝ ╚═╝ ╚══════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ github: https://github.com/estarriolvetch/fpe-mapping */ pragma solidity ^0.8.0; library Feistel { /// Balanced Feistel network function feistel(uint256 input, uint256 key, uint256 round, uint256 size) internal pure returns (uint256) { unchecked { uint256 halfSize = size / 2; uint256 halfMap = (2 ** halfSize) - 1; uint256 left = (input >> halfSize) & halfMap; uint256 right = (input & halfMap); for(uint256 i=0; i < round; i++) { uint256 roundKey = uint256(keccak256(abi.encode(key, i))); uint256 left_new = right; uint256 right_new = left ^ (halfMap & uint256(keccak256(abi.encode(right, roundKey)))); left = left_new; right = right_new; } return (left << halfSize) | right; } } /// Unbalanced Feistel network function feistelUnbalanced(uint256 input, uint256 key, uint256 round, uint256 size) internal pure returns (uint256) { unchecked { uint256 shortSize = size / 2; uint256 longSize = size - shortSize; uint256 longMap = (1 << longSize) - 1; uint256 shortMap = (1 << shortSize) - 1; uint256 left = (input >> shortSize) & longMap; uint256 right = (input & shortMap); for(uint256 i=0; i < round; i++) { uint256 roundKey = uint256(keccak256(abi.encode(key, i))); uint256 left_new = right; uint256 right_new; if(i % 2 == 0){ right_new = left ^ (longMap & uint256(keccak256(abi.encode(right, roundKey)))); } else { right_new = left ^ (shortMap & uint256(keccak256(abi.encode(right, roundKey)))); } left = left_new; right = right_new; } if (round % 2 == 0) { return (left << shortSize) | right; } else { return (left << longSize) | right; } } } }
// SPDX-License-Identifier: MIT /** _____ ___ ___ __ ____ _ __ / ___/____ / (_)___/ (_) /___ __ / __ )(_) /______ \__ \/ __ \/ / / __ / / __/ / / / / __ / / __/ ___/ ___/ / /_/ / / / /_/ / / /_/ /_/ / / /_/ / / /_(__ ) /____/\____/_/_/\__,_/_/\__/\__, / /_____/_/\__/____/ /____/ - npm: https://www.npmjs.com/package/solidity-bits - github: https://github.com/estarriolvetch/solidity-bits */ pragma solidity ^0.8.0; library BitScan { uint256 constant private DEBRUIJN_256 = 0x818283848586878898a8b8c8d8e8f929395969799a9b9d9e9faaeb6bedeeff; bytes constant private LOOKUP_TABLE_256 = hex"0001020903110a19042112290b311a3905412245134d2a550c5d32651b6d3a7506264262237d468514804e8d2b95569d0d495ea533a966b11c886eb93bc176c9071727374353637324837e9b47af86c7155181ad4fd18ed32c9096db57d59ee30e2e4a6a5f92a6be3498aae067ddb2eb1d5989b56fd7baf33ca0c2ee77e5caf7ff0810182028303840444c545c646c7425617c847f8c949c48a4a8b087b8c0c816365272829aaec650acd0d28fdad4e22d6991bd97dfdcea58b4d6f29fede4f6fe0f1f2f3f4b5b6b607b8b93a3a7b7bf357199c5abcfd9e168bcdee9b3f1ecf5fd1e3e5a7a8aa2b670c4ced8bbe8f0f4fc3d79a1c3cde7effb78cce6facbf9f8"; /** @dev Isolate the least significant set bit. */ function isolateLS1B256(uint256 bb) pure internal returns (uint256) { require(bb > 0); unchecked { return bb & (0 - bb); } } /** @dev Isolate the most significant set bit. */ function isolateMS1B256(uint256 bb) pure internal returns (uint256) { require(bb > 0); unchecked { bb |= bb >> 128; bb |= bb >> 64; bb |= bb >> 32; bb |= bb >> 16; bb |= bb >> 8; bb |= bb >> 4; bb |= bb >> 2; bb |= bb >> 1; return (bb >> 1) + 1; } } /** @dev Find the index of the lest significant set bit. (trailing zero count) */ function bitScanForward256(uint256 bb) pure internal returns (uint8) { unchecked { return uint8(LOOKUP_TABLE_256[(isolateLS1B256(bb) * DEBRUIJN_256) >> 248]); } } /** @dev Find the index of the most significant set bit. */ function bitScanReverse256(uint256 bb) pure internal returns (uint8) { unchecked { return 255 - uint8(LOOKUP_TABLE_256[((isolateMS1B256(bb) * DEBRUIJN_256) >> 248)]); } } function log2(uint256 bb) pure internal returns (uint8) { unchecked { return uint8(LOOKUP_TABLE_256[(isolateMS1B256(bb) * DEBRUIJN_256) >> 248]); } } }
// SPDX-License-Identifier: MIT /** _____ ___ ___ __ ____ _ __ / ___/____ / (_)___/ (_) /___ __ / __ )(_) /______ \__ \/ __ \/ / / __ / / __/ / / / / __ / / __/ ___/ ___/ / /_/ / / / /_/ / / /_/ /_/ / / /_/ / / /_(__ ) /____/\____/_/_/\__,_/_/\__/\__, / /_____/_/\__/____/ /____/ - npm: https://www.npmjs.com/package/solidity-bits - github: https://github.com/estarriolvetch/solidity-bits */ pragma solidity ^0.8.0; import "./BitScan.sol"; /** * @dev This Library is a modified version of Openzeppelin's BitMaps library. * Functions of finding the index of the closest set bit from a given index are added. * The indexing of each bucket is modifed to count from the MSB to the LSB instead of from the LSB to the MSB. * The modification of indexing makes finding the closest previous set bit more efficient in gas usage. */ /** * @dev Library for managing uint256 to bool mapping in a compact and efficient way, providing the keys are sequential. * Largelly inspired by Uniswap's https://github.com/Uniswap/merkle-distributor/blob/master/contracts/MerkleDistributor.sol[merkle-distributor]. */ library BitMaps { using BitScan for uint256; uint256 private constant MASK_INDEX_ZERO = (1 << 255); uint256 private constant MASK_FULL = type(uint256).max; struct BitMap { mapping(uint256 => uint256) _data; } /** * @dev Returns whether the bit at `index` is set. */ function get(BitMap storage bitmap, uint256 index) internal view returns (bool) { uint256 bucket = index >> 8; uint256 mask = MASK_INDEX_ZERO >> (index & 0xff); return bitmap._data[bucket] & mask != 0; } /** * @dev Sets the bit at `index` to the boolean `value`. */ function setTo( BitMap storage bitmap, uint256 index, bool value ) internal { if (value) { set(bitmap, index); } else { unset(bitmap, index); } } /** * @dev Sets the bit at `index`. */ function set(BitMap storage bitmap, uint256 index) internal { uint256 bucket = index >> 8; uint256 mask = MASK_INDEX_ZERO >> (index & 0xff); bitmap._data[bucket] |= mask; } /** * @dev Unsets the bit at `index`. */ function unset(BitMap storage bitmap, uint256 index) internal { uint256 bucket = index >> 8; uint256 mask = MASK_INDEX_ZERO >> (index & 0xff); bitmap._data[bucket] &= ~mask; } /** * @dev Consecutively sets `amount` of bits starting from the bit at `startIndex`. */ function setBatch(BitMap storage bitmap, uint256 startIndex, uint256 amount) internal { uint256 bucket = startIndex >> 8; uint256 bucketStartIndex = (startIndex & 0xff); unchecked { if(bucketStartIndex + amount < 256) { bitmap._data[bucket] |= MASK_FULL << (256 - amount) >> bucketStartIndex; } else { bitmap._data[bucket] |= MASK_FULL >> bucketStartIndex; amount -= (256 - bucketStartIndex); bucket++; while(amount > 256) { bitmap._data[bucket] = MASK_FULL; amount -= 256; bucket++; } bitmap._data[bucket] |= MASK_FULL << (256 - amount); } } } /** * @dev Consecutively unsets `amount` of bits starting from the bit at `startIndex`. */ function unsetBatch(BitMap storage bitmap, uint256 startIndex, uint256 amount) internal { uint256 bucket = startIndex >> 8; uint256 bucketStartIndex = (startIndex & 0xff); unchecked { if(bucketStartIndex + amount < 256) { bitmap._data[bucket] &= ~(MASK_FULL << (256 - amount) >> bucketStartIndex); } else { bitmap._data[bucket] &= ~(MASK_FULL >> bucketStartIndex); amount -= (256 - bucketStartIndex); bucket++; while(amount > 256) { bitmap._data[bucket] = 0; amount -= 256; bucket++; } bitmap._data[bucket] &= ~(MASK_FULL << (256 - amount)); } } } /** * @dev Find the closest index of the set bit before `index`. */ function scanForward(BitMap storage bitmap, uint256 index) internal view returns (uint256 setBitIndex) { uint256 bucket = index >> 8; // index within the bucket uint256 bucketIndex = (index & 0xff); // load a bitboard from the bitmap. uint256 bb = bitmap._data[bucket]; // offset the bitboard to scan from `bucketIndex`. bb = bb >> (0xff ^ bucketIndex); // bb >> (255 - bucketIndex) if(bb > 0) { unchecked { setBitIndex = (bucket << 8) | (bucketIndex - bb.bitScanForward256()); } } else { while(true) { require(bucket > 0, "BitMaps: The set bit before the index doesn't exist."); unchecked { bucket--; } // No offset. Always scan from the least significiant bit now. bb = bitmap._data[bucket]; if(bb > 0) { unchecked { setBitIndex = (bucket << 8) | (255 - bb.bitScanForward256()); break; } } } } } function getBucket(BitMap storage bitmap, uint256 bucket) internal view returns (uint256) { return bitmap._data[bucket]; } }
// SPDX-License-Identifier: MIT /** ______ _____ _____ ______ ___ __ _ _ _ | ____| __ \ / ____|____ |__ \/_ | || || | | |__ | |__) | | / / ) || | \| |/ | | __| | _ /| | / / / / | |\_ _/ | |____| | \ \| |____ / / / /_ | | | | |______|_| \_\\_____|/_/ |____||_| |_| */ pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/StorageSlot.sol"; import "solidity-bits/contracts/BitMaps.sol"; contract ERC721Psi is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; using BitMaps for BitMaps.BitMap; BitMaps.BitMap private _batchHead; string private _name; string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) internal _owners; uint256 internal _minted; mapping(uint256 => address) private _tokenApprovals; 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 || interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint) { require(owner != address(0), "ERC721Psi: balance query for the zero address"); uint count; for( uint i; i < _minted; ++i ){ if(_exists(i)){ if( owner == ownerOf(i)){ ++count; } } } return count; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { (address owner, ) = _ownerAndBatchHeadOf(tokenId); return owner; } function _ownerAndBatchHeadOf(uint256 tokenId) internal view returns (address owner, uint256 tokenIdBatchHead){ require(_exists(tokenId), "ERC721Psi: owner query for nonexistent token"); tokenIdBatchHead = _getBatchHead(tokenId); owner = _owners[tokenIdBatchHead]; } /** * @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), "ERC721Psi: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ownerOf(tokenId); require(to != owner, "ERC721Psi: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721Psi: 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), "ERC721Psi: approved query for nonexistent token" ); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { require(operator != _msgSender(), "ERC721Psi: approve to caller"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require( _isApprovedOrOwner(_msgSender(), tokenId), "ERC721Psi: 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), "ERC721Psi: 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, 1,_data), "ERC721Psi: 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`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return tokenId < _minted; } /** * @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), "ERC721Psi: operator query for nonexistent token" ); address owner = ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 quantity) internal virtual { _safeMint(to, quantity, ""); } function _safeMint( address to, uint256 quantity, bytes memory _data ) internal virtual { uint256 startTokenId = _minted; _mint(to, quantity); require( _checkOnERC721Received(address(0), to, startTokenId, quantity, _data), "ERC721Psi: transfer to non ERC721Receiver implementer" ); } function _mint( address to, uint256 quantity ) internal virtual { uint256 tokenIdBatchHead = _minted; require(quantity > 0, "ERC721Psi: quantity must be greater 0"); require(to != address(0), "ERC721Psi: mint to the zero address"); _beforeTokenTransfers(address(0), to, tokenIdBatchHead, quantity); _minted += quantity; _owners[tokenIdBatchHead] = to; _batchHead.set(tokenIdBatchHead); _afterTokenTransfers(address(0), to, tokenIdBatchHead, quantity); // Emit events for(uint256 tokenId=tokenIdBatchHead;tokenId < tokenIdBatchHead + quantity; tokenId++){ emit Transfer(address(0), to, 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 { (address owner, uint256 tokenIdBatchHead) = _ownerAndBatchHeadOf(tokenId); require( owner == from, "ERC721Psi: transfer of token that is not own" ); require(to != address(0), "ERC721Psi: transfer to the zero address"); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId); uint256 nextTokenId = tokenId + 1; if(!_batchHead.get(nextTokenId) && nextTokenId < _minted ) { _owners[nextTokenId] = from; _batchHead.set(nextTokenId); } _owners[tokenId] = to; if(tokenId != tokenIdBatchHead) { _batchHead.set(tokenId); } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ownerOf(tokenId), to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param startTokenId uint256 the first ID of the tokens to be transferred * @param quantity uint256 amount of the tokens to be transfered. * @param _data bytes optional data to send along with the call * @return r bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 startTokenId, uint256 quantity, bytes memory _data ) private returns (bool r) { if (to.isContract()) { r = true; for(uint256 tokenId = startTokenId; tokenId < startTokenId + quantity; tokenId++){ try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { r = r && retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721Psi: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } return r; } else { return true; } } function _getBatchHead(uint256 tokenId) internal view returns (uint256 tokenIdBatchHead) { tokenIdBatchHead = _batchHead.scanForward(tokenId); } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _minted; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256 tokenId) { require(index < totalSupply(), "ERC721Psi: global index out of bounds"); uint count; for(uint i; i < _minted; i++){ if(_exists(i)){ if(count == index) return i; else count++; } } } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256 tokenId) { uint count; for(uint i; i < _minted; i++){ if(_exists(i) && owner == ownerOf(i)){ if(count == index) return i; else count++; } } revert("ERC721Psi: owner index out of bounds"); } /** * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.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 /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: 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.7.0) (utils/StorageSlot.sol) pragma solidity ^0.8.0; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ``` * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` * * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._ */ library StorageSlot { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } }
// 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 (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 (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 (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 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.7.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
{ "optimizer": { "enabled": true, "runs": 1000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"uint256","name":"maxSupply_","type":"uint256"},{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"string","name":"archVeilURI_","type":"string"},{"internalType":"string","name":"archBaseURI_","type":"string"},{"internalType":"string","name":"initialChapter_","type":"string"},{"internalType":"address","name":"vrfCoordinator_","type":"address"},{"internalType":"bytes32","name":"vrfGasLane_","type":"bytes32"},{"internalType":"uint64","name":"vrfSubscriptionId_","type":"uint64"},{"internalType":"address[]","name":"payee_","type":"address[]"},{"internalType":"uint256[]","name":"shares_","type":"uint256[]"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"have","type":"address"},{"internalType":"address","name":"want","type":"address"}],"name":"OnlyCoordinatorCanFulfill","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"prev","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"current","type":"bytes32"}],"name":"ChapterMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"label","type":"string"}],"name":"ChapterRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"label","type":"string"},{"indexed":false,"internalType":"bool","name":"whitelisting","type":"bool"},{"indexed":false,"internalType":"uint256","name":"mintAllocation","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"mintPrice","type":"uint256"},{"indexed":false,"internalType":"bool","name":"mintOpen","type":"bool"},{"indexed":false,"internalType":"bool","name":"revealing","type":"bool"},{"indexed":false,"internalType":"bool","name":"isConclusion","type":"bool"}],"name":"ChapterWritten","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IERC20","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ERC20PaymentReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"prev","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"current","type":"bytes32"}],"name":"EpisodeMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"prev","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"current","type":"bytes32"}],"name":"EpisodeProgressedOnlife","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"prev","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"current","type":"bytes32"}],"name":"EpisodeRevealed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"chapter","type":"string"},{"indexed":false,"internalType":"string","name":"group","type":"string"}],"name":"MintGroupRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"chapter","type":"string"},{"indexed":false,"internalType":"string","name":"group","type":"string"},{"indexed":false,"internalType":"bool","name":"fixedPrice","type":"bool"}],"name":"MintGroupWritten","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"prev","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"current","type":"bytes32"}],"name":"MintingSealed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"PayeeAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"requestId","type":"uint256"}],"name":"RandomnessRequested","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":"string","name":"from","type":"string"},{"indexed":false,"internalType":"string","name":"monumentalEvent","type":"string"}],"name":"TransitionRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"from","type":"string"},{"indexed":false,"internalType":"string","name":"to","type":"string"},{"indexed":false,"internalType":"string","name":"monumentalEvent","type":"string"}],"name":"TransitionWritten","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"chapterMintLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentChapter","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentDefaultPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"group","type":"string"}],"name":"currentGroupPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"emitOnlifeEvent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"entropy","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fulfilling","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"label","type":"string"},{"internalType":"string","name":"group","type":"string"}],"name":"groupRule","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialChapter","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"limit","type":"uint256"},{"internalType":"bytes32","name":"birth","type":"bytes32"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"isAccountWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"limit","type":"uint256"},{"internalType":"bytes32","name":"birth","type":"bytes32"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"isAccountWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"isFinal","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"uint256","name":"limit","type":"uint256"},{"internalType":"bytes32","name":"group","type":"bytes32"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"group","type":"string"},{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"uint256","name":"offer","type":"uint256"}],"name":"offerMatchesGroupPrice","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"payee","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"requestId","type":"uint256"},{"internalType":"uint256[]","name":"randomWords","type":"uint256[]"}],"name":"rawFulfillRandomWords","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"releasable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"releasable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"label","type":"string"}],"name":"removeChapter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"chapter","type":"string"},{"internalType":"string","name":"group","type":"string"}],"name":"removeMintGroup","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"from","type":"string"},{"internalType":"string","name":"monumentalEvent","type":"string"}],"name":"removeTransition","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reveal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sealMinting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"newWhitelistRoot","type":"bytes32"}],"name":"setWhitelistRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"shares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"tokenId","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":"tokenId","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":[{"internalType":"address","name":"minter","type":"address"}],"name":"tokensMintedByUser","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalShares","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":[{"components":[{"internalType":"bytes32","name":"gasLane","type":"bytes32"},{"internalType":"uint64","name":"subscriptionId","type":"uint64"},{"internalType":"uint16","name":"requestConfirmations","type":"uint16"},{"internalType":"uint32","name":"callbackGasLimit","type":"uint32"}],"internalType":"struct ArchOfPeaceEntropy.VRFRequestParams","name":"newParams","type":"tuple"}],"name":"updateVRFParams","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"whitelistRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"label","type":"string"},{"internalType":"bool","name":"whitelisting","type":"bool"},{"internalType":"uint256","name":"mintAllocation","type":"uint256"},{"internalType":"uint256","name":"mintPrice","type":"uint256"},{"internalType":"bool","name":"mintOpen","type":"bool"},{"internalType":"bool","name":"revealing","type":"bool"},{"internalType":"bool","name":"isConclusion","type":"bool"}],"name":"writeChapter","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"chapter","type":"string"},{"internalType":"string","name":"group","type":"string"},{"components":[{"internalType":"bool","name":"enabled","type":"bool"},{"internalType":"bool","name":"fixedPrice","type":"bool"}],"internalType":"struct IMonuverseEpisode.MintGroupRules","name":"mintRules","type":"tuple"}],"name":"writeMintGroup","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"from","type":"string"},{"internalType":"string","name":"to","type":"string"},{"internalType":"string","name":"monumentalEvent","type":"string"}],"name":"writeTransition","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60c06040523480156200001157600080fd5b5060405162006ba138038062006ba1833981016040819052620000349162000b37565b6001600160a01b03851660805281818b8b8888888c620000543362000295565b6000805460ff60a01b19168155620000739082908080808080620002e5565b6005819055506200009660055460026200065c60201b620032a61790919060201c565b506001600160a01b039290921660a052604080516080810182528281526001600160401b0390931660208401819052600591840191909152620493e0606090930192909252600655600780546001600160501b031916909117680500000000000000001763ffffffff60501b191661249f60551b179055600c6200011b838262000d60565b50600d6200012a828262000d60565b50505080518251146200019f5760405162461bcd60e51b815260206004820152603260248201527f5061796d656e7453706c69747465723a2070617965657320616e6420736861726044820152710cae640d8cadccee8d040dad2e6dac2e8c6d60731b60648201526084015b60405180910390fd5b6000825111620001f25760405162461bcd60e51b815260206004820152601a60248201527f5061796d656e7453706c69747465723a206e6f20706179656573000000000000604482015260640162000196565b60005b82518110156200025e576200024983828151811062000218576200021862000e2c565b602002602001015183838151811062000235576200023562000e2c565b60200260200101516200066060201b60201c565b80620002558162000e58565b915050620001f5565b505050601a8b9055601b62000274898262000d60565b50601c62000283888262000d60565b50505050505050505050505062000f10565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000620002f16200084e565b620003086002620008ac60201b620032aa1760201c565b60055414620003665760405162461bcd60e51b815260206004820152602360248201527f4d6f6e757665727365457069736f64653a207570646174657320666f726269646044820152623232b760e91b606482015260840162000196565b811580620003875750861580156200037c575085155b801562000387575082155b620003fb5760405162461bcd60e51b815260206004820152603560248201527f4d6f6e757665727365457069736f64653a20666561747572657320646973616260448201527f6c656420647572696e6720636f6e636c7573696f6e0000000000000000000000606482015260840162000196565b828015620004095750600086115b156200046d5760405162461bcd60e51b815260206004820152602c60248201527f4d6f6e757665727365457069736f64653a2072657665616c2077697468206d6960448201526b373a103337b93134b23232b760a11b606482015260840162000196565b86600160006200047d8b620008b0565b815260200190815260200160002060040160006101000a81548160ff0219169083151502179055508560016000620004bb8b620008b060201b60201c565b815260208101919091526040016000908120919091558590600190620004e18b620008b0565b81526020019081526020016000206000016001018190555083600160006200050f8b620008b060201b60201c565b815260208101919091526040016000908120600301805460ff1916921515929092179091558390600190620005448b620008b0565b815260200190815260200160002060040160016101000a81548160ff0219169083151502179055506001806000620005828b620008b060201b60201c565b815260200190815260200160002060040160026101000a81548160ff02191690831515021790555081620005db57620005d5620005bf89620008b0565b6002620008e260201b620032ae1790919060201c565b62000600565b62000600620005ea89620008b0565b6002620008fd60201b620032c91790919060201c565b7f9095707c269f32c8e4fabd7b3d61241d12a5e619d43f4cbdabfafc19b6697b39888888888888886040516200063d979695949392919062000e74565b60405180910390a16200065088620008b0565b98975050505050505050565b9055565b6001600160a01b038216620006cd5760405162461bcd60e51b815260206004820152602c60248201527f5061796d656e7453706c69747465723a206163636f756e74206973207468652060448201526b7a65726f206164647265737360a01b606482015260840162000196565b600081116200071f5760405162461bcd60e51b815260206004820152601d60248201527f5061796d656e7453706c69747465723a20736861726573206172652030000000604482015260640162000196565b6001600160a01b038216600090815260156020526040902054156200079b5760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e7420616c726561647960448201526a206861732073686172657360a81b606482015260840162000196565b60178054600181019091557fc624b66cc0138b8fabc209247f72d758e1cf3343756d543badbf24212bed8c150180546001600160a01b0319166001600160a01b03841690811790915560009081526015602052604090208190556013546200080590829062000ed6565b601355604080516001600160a01b0384168152602081018390527f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac910160405180910390a15050565b6000546001600160a01b03163314620008aa5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640162000196565b565b5490565b600081604051602001620008c5919062000ef2565b604051602081830303815290604052805190602001209050919050565b6000908152600190910160205260409020805460ff19169055565b6000908152600191820160205260409020805460ff19169091179055565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156200095c576200095c6200091b565b604052919050565b60005b838110156200098157818101518382015260200162000967565b50506000910152565b600082601f8301126200099c57600080fd5b81516001600160401b03811115620009b857620009b86200091b565b620009cd601f8201601f191660200162000931565b818152846020838601011115620009e357600080fd5b620009f682602083016020870162000964565b949350505050565b80516001600160a01b038116811462000a1657600080fd5b919050565b80516001600160401b038116811462000a1657600080fd5b60006001600160401b0382111562000a4f5762000a4f6200091b565b5060051b60200190565b600082601f83011262000a6b57600080fd5b8151602062000a8462000a7e8362000a33565b62000931565b82815260059290921b8401810191818101908684111562000aa457600080fd5b8286015b8481101562000aca5762000abc81620009fe565b835291830191830162000aa8565b509695505050505050565b600082601f83011262000ae757600080fd5b8151602062000afa62000a7e8362000a33565b82815260059290921b8401810191818101908684111562000b1a57600080fd5b8286015b8481101562000aca578051835291830191830162000b1e565b60008060008060008060008060008060006101608c8e03121562000b5a57600080fd5b8b5160208d0151909b506001600160401b0381111562000b7957600080fd5b62000b878e828f016200098a565b60408e0151909b5090506001600160401b0381111562000ba657600080fd5b62000bb48e828f016200098a565b60608e0151909a5090506001600160401b0381111562000bd357600080fd5b62000be18e828f016200098a565b60808e015190995090506001600160401b0381111562000c0057600080fd5b62000c0e8e828f016200098a565b60a08e015190985090506001600160401b0381111562000c2d57600080fd5b62000c3b8e828f016200098a565b96505062000c4c60c08d01620009fe565b945060e08c0151935062000c646101008d0162000a1b565b6101208d01519093506001600160401b0381111562000c8257600080fd5b62000c908e828f0162000a59565b6101408e015190935090506001600160401b0381111562000cb057600080fd5b62000cbe8e828f0162000ad5565b9150509295989b509295989b9093969950565b600181811c9082168062000ce657607f821691505b60208210810362000d0757634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111562000d5b57600081815260208120601f850160051c8101602086101562000d365750805b601f850160051c820191505b8181101562000d575782815560010162000d42565b5050505b505050565b81516001600160401b0381111562000d7c5762000d7c6200091b565b62000d948162000d8d845462000cd1565b8462000d0d565b602080601f83116001811462000dcc576000841562000db35750858301515b600019600386901b1c1916600185901b17855562000d57565b600085815260208120601f198616915b8281101562000dfd5788860151825594840194600190910190840162000ddc565b508582101562000e1c5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820162000e6d5762000e6d62000e42565b5060010190565b60e08152600088518060e084015261010062000e978282860160208e0162000964565b981515602084015260408301979097525060608101949094529115156080840152151560a0830152151560c0820152601f909101601f19160101919050565b8082018082111562000eec5762000eec62000e42565b92915050565b6000825162000f0681846020870162000964565b9190910192915050565b60805160a051615c6462000f3d60003960006142b90152600081816111ec01526112470152615c646000f3fe60806040526004361061039b5760003560e01c806367f11ef0116101dc578063a475b5dd11610102578063d79779b2116100a0578063f2fde38b1161006f578063f2fde38b14610b41578063f341878114610b61578063f5aa406d14610b76578063fbef35d814610b9657600080fd5b8063d79779b214610a98578063e33b7de314610ace578063e985e9c514610ae3578063f15de7aa14610b2c57600080fd5b8063c45ac050116100dc578063c45ac05014610a02578063c87b56dd14610a22578063ce7c2ac214610a42578063d37b2ba914610a7857600080fd5b8063a475b5dd14610997578063a94df4f4146109ac578063b88d4fde146109e257600080fd5b80638b83209b1161017a5780639b70ccf9116101495780639b70ccf914610924578063a0712d6814610944578063a22cb46514610957578063a3f8eace1461097757600080fd5b80638b83209b1461089b5780638da5cb5b146108bb57806395d89b41146108d95780639852595c146108ee57600080fd5b8063715018a6116101b6578063715018a61461083157806376f0a0e8146108465780637a4410c71461085b5780637dac7fd41461087b57600080fd5b806367f11ef0146107d957806369d30a49146107f957806370a082311461081157600080fd5b8063406072a9116102c15780634a1703ad1161025f5780635e821ed41161022e5780635e821ed41461076457806362f93a32146107845780636352211e14610799578063661be8f0146107b957600080fd5b80634a1703ad146106f05780634f6ccce7146107055780635745fcad146107255780635c975abb1461074557600080fd5b806342966c681161029b57806342966c681461067b5780634654b08a1461069b57806347ce07cc146106bb57806348b75044146106d057600080fd5b8063406072a9146105f557806340ce964d1461063b57806342842e0e1461065b57600080fd5b80631fe543e31161033957806329f4ba131161030857806329f4ba131461058b5780632f745c59146105ab578063386bfc98146105cb5780633a98ef39146105e057600080fd5b80631fe543e314610514578063232471051461053457806323b872dd14610547578063264258121461056757600080fd5b80630850ba5d116103755780630850ba5d14610478578063095ea7b3146104af57806318160ddd146104d157806319165587146104f457600080fd5b806301ffc9a7146103e957806306fdde031461041e578063081812fc1461044057600080fd5b366103e4577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033604080516001600160a01b0390921682523460208301520160405180910390a1005b600080fd5b3480156103f557600080fd5b50610409610404366004614e4a565b610bab565b60405190151581526020015b60405180910390f35b34801561042a57600080fd5b50610433610c7c565b6040516104159190614eb7565b34801561044c57600080fd5b5061046061045b366004614eca565b610d0e565b6040516001600160a01b039091168152602001610415565b34801561048457600080fd5b50610498610493366004614f2c565b610dac565b604080519215158352901515602083015201610415565b3480156104bb57600080fd5b506104cf6104ca366004614fad565b610f18565b005b3480156104dd57600080fd5b506104e6611048565b604051908152602001610415565b34801561050057600080fd5b506104cf61050f366004614fd9565b611064565b34801561052057600080fd5b506104cf61052f366004615061565b6111e1565b6104cf610542366004615169565b611282565b34801561055357600080fd5b506104cf6105623660046151c3565b6115c4565b34801561057357600080fd5b506005546000908152600160205260409020546104e6565b34801561059757600080fd5b506104cf6105a6366004615204565b61164b565b3480156105b757600080fd5b506104e66105c6366004614fad565b611812565b3480156105d757600080fd5b50600a546104e6565b3480156105ec57600080fd5b506013546104e6565b34801561060157600080fd5b506104e6610610366004615246565b6001600160a01b03918216600090815260196020908152604080832093909416825291909152205490565b34801561064757600080fd5b506104cf61065636600461527f565b6118f3565b34801561066757600080fd5b506104cf6106763660046151c3565b611bb7565b34801561068757600080fd5b506104cf610696366004614eca565b611bd2565b3480156106a757600080fd5b506104cf6106b6366004615319565b611cc2565b3480156106c757600080fd5b506009546104e6565b3480156106dc57600080fd5b506104cf6106eb366004615246565b611fb5565b3480156106fc57600080fd5b506104e661215b565b34801561071157600080fd5b506104e6610720366004614eca565b612168565b34801561073157600080fd5b506104cf610740366004614f2c565b612237565b34801561075157600080fd5b50600054600160a01b900460ff16610409565b34801561077057600080fd5b506104e661077f36600461540b565b61237e565b34801561079057600080fd5b506104e66126cb565b3480156107a557600080fd5b506104606107b4366004614eca565b6126d6565b3480156107c557600080fd5b506104096107d43660046154bc565b6126ea565b3480156107e557600080fd5b506104096107f436600461550c565b612702565b34801561080557600080fd5b5060085460ff16610409565b34801561081d57600080fd5b506104e661082c366004614fd9565b6127f6565b34801561083d57600080fd5b506104cf6128d4565b34801561085257600080fd5b506005546104e6565b34801561086757600080fd5b506104cf610876366004614f2c565b6128e8565b34801561088757600080fd5b506104cf610896366004615557565b612a36565b3480156108a757600080fd5b506104606108b6366004614eca565b612a4b565b3480156108c757600080fd5b506000546001600160a01b0316610460565b3480156108e557600080fd5b50610433612a7b565b3480156108fa57600080fd5b506104e6610909366004614fd9565b6001600160a01b031660009081526016602052604090205490565b34801561093057600080fd5b5061040961093f36600461556f565b612a8a565b6104cf610952366004614eca565b612ad5565b34801561096357600080fd5b506104cf6109723660046155c0565b612af8565b34801561098357600080fd5b506104e6610992366004614fd9565b612bbc565b3480156109a357600080fd5b506104cf612bfd565b3480156109b857600080fd5b506104e66109c7366004614fd9565b6001600160a01b03166000908152601d602052604090205490565b3480156109ee57600080fd5b506104cf6109fd3660046155ee565b612d4b565b348015610a0e57600080fd5b506104e6610a1d366004615246565b612dd3565b348015610a2e57600080fd5b50610433610a3d366004614eca565b612eaf565b348015610a4e57600080fd5b506104e6610a5d366004614fd9565b6001600160a01b031660009081526015602052604090205490565b348015610a8457600080fd5b506104e6610a93366004615204565b612fe5565b348015610aa457600080fd5b506104e6610ab3366004614fd9565b6001600160a01b031660009081526018602052604090205490565b348015610ada57600080fd5b506014546104e6565b348015610aef57600080fd5b50610409610afe366004615246565b6001600160a01b03918216600090815260116020908152604080832093909416825291909152205460ff1690565b348015610b3857600080fd5b506104cf61302e565b348015610b4d57600080fd5b506104cf610b5c366004614fd9565b613135565b348015610b6d57600080fd5b506104096131c2565b348015610b8257600080fd5b506104cf610b91366004614eca565b6131da565b348015610ba257600080fd5b506104cf613275565b60006001600160e01b031982167f80ac58cd000000000000000000000000000000000000000000000000000000001480610c0e57506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610c4257506001600160e01b031982167f780e9d6300000000000000000000000000000000000000000000000000000000145b80610c7657507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b6060600c8054610c8b90615662565b80601f0160208091040260200160405190810160405280929190818152602001828054610cb790615662565b8015610d045780601f10610cd957610100808354040283529160200191610d04565b820191906000526020600020905b815481529060010190602001808311610ce757829003601f168201915b5050505050905090565b6000610d19826132e7565b610d905760405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a20617070726f76656420717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e000000000000000000000000000000000060648201526084015b60405180910390fd5b506000908152601060205260409020546001600160a01b031690565b60008060016000610df288888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061331e92505050565b81526020019081526020016000206000016002016000610e4786868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061331e92505050565b815260208082019290925260409081016000908120548251601f8a0185900485028101850190935288835260ff1692600192610e9d918b908b908190840183828082843760009201919091525061331e92505050565b81526020019081526020016000206000016002016000610ef287878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061331e92505050565b8152602081019190915260400160002054909761010090910460ff169650945050505050565b6000610f23826126d6565b9050806001600160a01b0316836001600160a01b031603610fab5760405162461bcd60e51b8152602060048201526024808201527f4552433732315073693a20617070726f76616c20746f2063757272656e74206f60448201527f776e6572000000000000000000000000000000000000000000000000000000006064820152608401610d87565b336001600160a01b0382161480610fc75750610fc78133610afe565b6110395760405162461bcd60e51b815260206004820152603b60248201527f4552433732315073693a20617070726f76652063616c6c6572206973206e6f7460448201527f206f776e6572206e6f7220617070726f76656420666f7220616c6c00000000006064820152608401610d87565b611043838361334e565b505050565b60006110526133bc565b600f5461105f91906156ac565b905090565b6001600160a01b0381166000908152601560205260409020546110d85760405162461bcd60e51b815260206004820152602660248201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060448201526573686172657360d01b6064820152608401610d87565b60006110e382612bbc565b9050806000036111495760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060448201526a191d59481c185e5b595b9d60aa1b6064820152608401610d87565b6001600160a01b038216600090815260166020526040812080548392906111719084906156bf565b92505081905550806014600082825461118a91906156bf565b9091555061119a9050828261341c565b604080516001600160a01b0384168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b05691015b60405180910390a15050565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611274576040517f1cf993f40000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166024820152604401610d87565b61127e8282613535565b5050565b61128a6135de565b60055460009081526001602052604090206003015460ff16611323576112b18383836126ea565b6113235760405162461bcd60e51b815260206004820152602360248201527f417263684f6650656163653a2073656e646572206e6f742077686974656c697360448201527f74656400000000000000000000000000000000000000000000000000000000006064820152608401610d87565b600954156113735760405162461bcd60e51b815260206004820152601d60248201527f417263684f6650656163653a20616c72656164792072657665616c65640000006044820152606401610d87565b336000908152601d602052604090205461138e908585613638565b6114005760405162461bcd60e51b815260206004820152602160248201527f417263684f6650656163653a207175616e74697479206e6f7420616c6c6f776560448201527f64000000000000000000000000000000000000000000000000000000000000006064820152608401610d87565b61140c84600f5461364f565b6114585760405162461bcd60e51b815260206004820152601c60248201527f417263684f6650656163653a206e6f206d696e742063686170746572000000006044820152606401610d87565b61146182613674565b6114ad5760405162461bcd60e51b815260206004820152601e60248201527f417263684f6650656163653a2067726f7570206e6f7420616c6c6f77656400006044820152606401610d87565b6114b88434846136c7565b6115045760405162461bcd60e51b815260206004820152601c60248201527f417263684f6650656163653a206f6666657220756e6d617463686564000000006044820152606401610d87565b336000908152601d6020526040812080548692906115239084906156bf565b90915550611533905033856136dd565b600554600090815260016020526040902054600f54036115be57600554600090815260016020526040902054601a5414611595576115907f3682fcea3c2ce4f677e5f9a0c04b5afa5ff6cd8d2d88596b34fd07a8536df56861388a565b6115be565b6115be7f870329f3a558053d4992d3bde4e6426cebe0e337fb755a25e985486397c47dbd61388a565b50505050565b6115ce3382613ad0565b6116405760405162461bcd60e51b815260206004820152603460248201527f4552433732315073693a207472616e736665722063616c6c6572206973206e6f60448201527f74206f776e6572206e6f7220617070726f7665640000000000000000000000006064820152608401610d87565b611043838383613bc7565b611653613e09565b600254600554146116b25760405162461bcd60e51b815260206004820152602360248201527f4d6f6e757665727365457069736f64653a207570646174657320666f726269646044820152623232b760e91b6064820152608401610d87565b6116f182828080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061331e92505050565b600254036117675760405162461bcd60e51b815260206004820152602760248201527f4d6f6e757665727365457069736f64653a20696e697469616c206e6f6e20646560448201527f6c657461626c65000000000000000000000000000000000000000000000000006064820152608401610d87565b600160006117aa84848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061331e92505050565b8152602081019190915260409081016000908120818155600181019190915560038101805460ff19169055600401805462ffffff19169055517fc759122f1bb65845cb6e526e95bd428763f49b30efe59497ec7d8fc54191e30f906111d590849084906156fb565b60008060005b600f548110156118855761182b816132e7565b8015611850575061183b816126d6565b6001600160a01b0316856001600160a01b0316145b1561187357838203611865579150610c769050565b8161186f8161570f565b9250505b8061187d8161570f565b915050611818565b5060405162461bcd60e51b8152602060048201526024808201527f4552433732315073693a206f776e657220696e646578206f7574206f6620626f60448201527f756e6473000000000000000000000000000000000000000000000000000000006064820152608401610d87565b6118fb613e09565b6002546005541461195a5760405162461bcd60e51b815260206004820152602360248201527f4d6f6e757665727365457069736f64653a207570646174657320666f726269646044820152623232b760e91b6064820152608401610d87565b6001600061199d88888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061331e92505050565b815260208101919091526040016000206004015462010000900460ff16611a065760405162461bcd60e51b815260206004820152601e60248201527f4d6f6e757665727365457069736f64653a2066726f6d206e6f742073657400006044820152606401610d87565b60016000611a4986868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061331e92505050565b815260208101919091526040016000206004015462010000900460ff16611ab25760405162461bcd60e51b815260206004820152601c60248201527f4d6f6e757665727365457069736f64653a20746f206e6f7420736574000000006044820152606401610d87565b611b6e611af487878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061331e92505050565b611b3386868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061331e92505050565b8484604051602001611b46929190615728565b604051602081830303815290604052805190602001206002613e63909392919063ffffffff16565b7fa5fa045302df1190e7522c88350b2c1d256d5070b46265fd61cab34114f56785868686868686604051611ba79695949392919061575a565b60405180910390a1505050505050565b61104383838360405180602001604052806000815250612d4b565b611bdb816132e7565b611c275760405162461bcd60e51b815260206004820152601f60248201527f417263684f6650656163653a206e6f6e206578697374656e7420746f6b656e006044820152606401610d87565b611c30816126d6565b6001600160a01b0316336001600160a01b031614611cb65760405162461bcd60e51b815260206004820152602360248201527f417263684f6650656163653a2073656e646572206e6f7420746f6b656e206f7760448201527f6e657200000000000000000000000000000000000000000000000000000000006064820152608401610d87565b611cbf81613f8e565b50565b611cca613e09565b60025460055414611d295760405162461bcd60e51b815260206004820152602360248201527f4d6f6e757665727365457069736f64653a207570646174657320666f726269646044820152623232b760e91b6064820152608401610d87565b60016000611d6c85858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061331e92505050565b815260208101919091526040016000206004015462010000900460ff16611de15760405162461bcd60e51b8152602060048201526024808201527f4d6f6e757665727365457069736f64653a2067726f7570206e6f6e20657869736044820152631d195b9d60e21b6064820152608401610d87565b600060016000611e2688888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061331e92505050565b815260208101919091526040016000205411611eaa5760405162461bcd60e51b815260206004820152602760248201527f4d6f6e757665727365457069736f64653a2063686170746572206d696e74206460448201527f697361626c6564000000000000000000000000000000000000000000000000006064820152608401610d87565b8060016000611eee88888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061331e92505050565b81526020019081526020016000206000016002016000611f4386868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061331e92505050565b81526020019081526020016000208181611f5d91906157a3565b507f2c078826f3e7e4547743ae7b52e4ca5544f8ffb7b349fbe6d6b12ef37141fde7905085858585611f9560408701602088016157e9565b604051611fa6959493929190615806565b60405180910390a15050505050565b6001600160a01b0381166000908152601560205260409020546120295760405162461bcd60e51b815260206004820152602660248201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060448201526573686172657360d01b6064820152608401610d87565b60006120358383612dd3565b90508060000361209b5760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060448201526a191d59481c185e5b595b9d60aa1b6064820152608401610d87565b6001600160a01b038084166000908152601960209081526040808320938616835292905290812080548392906120d29084906156bf565b90915550506001600160a01b038316600090815260186020526040812080548392906120ff9084906156bf565b909155506121109050838383613ff6565b604080516001600160a01b038481168252602082018490528516917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a2505050565b600061105f600554614076565b6000612172611048565b82106121e65760405162461bcd60e51b815260206004820152602560248201527f4552433732315073693a20676c6f62616c20696e646578206f7574206f66206260448201527f6f756e64730000000000000000000000000000000000000000000000000000006064820152608401610d87565b6000805b600f54811015612230576121fd816132e7565b1561221e57838203612210579392505050565b8161221a8161570f565b9250505b806122288161570f565b9150506121ea565b5050919050565b61223f613e09565b6002546005541461229e5760405162461bcd60e51b815260206004820152602360248201527f4d6f6e757665727365457069736f64653a207570646174657320666f726269646044820152623232b760e91b6064820152608401610d87565b61233b6122e085858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061331e92505050565b61231f84848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061331e92505050565b6000918252600460209081526040808420928452919052812055565b7f8633d2a2bc8cc30093b92a6fda073c3d18891b24913d83ff6b9103154ed09e48848484846040516123709493929190615842565b60405180910390a150505050565b6000612388613e09565b600254600554146123e75760405162461bcd60e51b815260206004820152602360248201527f4d6f6e757665727365457069736f64653a207570646174657320666f726269646044820152623232b760e91b6064820152608401610d87565b8115806124055750861580156123fb575085155b8015612405575082155b6124775760405162461bcd60e51b815260206004820152603560248201527f4d6f6e757665727365457069736f64653a20666561747572657320646973616260448201527f6c656420647572696e6720636f6e636c7573696f6e00000000000000000000006064820152608401610d87565b8280156124845750600086115b156124f75760405162461bcd60e51b815260206004820152602c60248201527f4d6f6e757665727365457069736f64653a2072657665616c2077697468206d6960448201527f6e7420666f7262696464656e00000000000000000000000000000000000000006064820152608401610d87565b86600160006125058b61331e565b815260200190815260200160002060040160006101000a81548160ff021916908315150217905550856001600061253b8b61331e565b81526020019081526020016000206000016000018190555084600160006125618b61331e565b81526020019081526020016000206000016001018190555083600160006125878b61331e565b815260200190815260200160002060000160030160006101000a81548160ff02191690831515021790555082600160006125c08b61331e565b815260200190815260200160002060040160016101000a81548160ff02191690831515021790555060018060006125f68b61331e565b815260200190815260200160002060040160026101000a81548160ff0219169083151502179055508161264c5761264761262f8961331e565b6000908152600360205260409020805460ff19169055565b612673565b6126736126588961331e565b6000908152600360205260409020805460ff19166001179055565b7f9095707c269f32c8e4fabd7b3d61241d12a5e619d43f4cbdabfafc19b6697b39888888888888886040516126ae9796959493929190615869565b60405180910390a16126bf8861331e565b98975050505050505050565b600061105f60025490565b6000806126e2836140d9565b509392505050565b60006126f833858585612702565b90505b9392505050565b600080546001600160a01b031633148061272457506001600160a01b03851633145b6127965760405162461bcd60e51b815260206004820152602d60248201527f417263684f66506561636557686974656c6973743a206163636f756e7420636860448201527f65636b20666f7262696464656e000000000000000000000000000000000000006064820152608401610d87565b600a5460408051606088901b6bffffffffffffffffffffffff191660208083019190915260348201889052605480830188905283518084039091018152607490920190925280519101206127eb918491614181565b90505b949350505050565b60006001600160a01b0382166128745760405162461bcd60e51b815260206004820152602d60248201527f4552433732315073693a2062616c616e636520717565727920666f722074686560448201527f207a65726f2061646472657373000000000000000000000000000000000000006064820152608401610d87565b6000805b600f548110156128cd5761288b816132e7565b156128bd57612899816126d6565b6001600160a01b0316846001600160a01b0316036128bd576128ba8261570f565b91505b6128c68161570f565b9050612878565b5092915050565b6128dc613e09565b6128e66000614197565b565b6128f0613e09565b6002546005541461294f5760405162461bcd60e51b815260206004820152602360248201527f4d6f6e757665727365457069736f64653a207570646174657320666f726269646044820152623232b760e91b6064820152608401610d87565b6001600061299286868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061331e92505050565b815260200190815260200160002060000160020160006129e784848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061331e92505050565b815260208101919091526040908101600020805461ffff19169055517f7d460d27013b22d35c12328508431d9757ee76f51b10e5e0008a81a1841d384290612370908690869086908690615842565b612a3e613e09565b80600661104382826158b1565b600060178281548110612a6057612a6061595b565b6000918252602090912001546001600160a01b031692915050565b6060600d8054610c8b90615662565b60006127eb612ace86868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061331e92505050565b84846141e7565b611cbf816003612ae460055490565b604080516000815260208101909152611282565b336001600160a01b03831603612b505760405162461bcd60e51b815260206004820152601c60248201527f4552433732315073693a20617070726f766520746f2063616c6c6572000000006044820152606401610d87565b3360008181526011602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600080612bc860145490565b612bd290476156bf565b90506126fb8382612bf8866001600160a01b031660009081526016602052604090205490565b6141fd565b600554600090815260016020526040902060040154610100900460ff16612c725760405162461bcd60e51b8152602060048201526024808201527f4d6f6e757665727365457069736f64653a2072657665616c206e6f7420616c6c6044820152631bddd95960e21b6064820152608401610d87565b612c7a6135de565b60095415612cca5760405162461bcd60e51b815260206004820152601d60248201527f417263684f6650656163653a20616c72656164792072657665616c65640000006044820152606401610d87565b60085460ff1615612d435760405162461bcd60e51b815260206004820152602160248201527f417263684f6650656163653a2063757272656e746c792066756c66696c6c696e60448201527f67000000000000000000000000000000000000000000000000000000000000006064820152608401610d87565b6128e661423b565b612d553383613ad0565b612dc75760405162461bcd60e51b815260206004820152603460248201527f4552433732315073693a207472616e736665722063616c6c6572206973206e6f60448201527f74206f776e6572206e6f7220617070726f7665640000000000000000000000006064820152608401610d87565b6115be8484848461437b565b6001600160a01b03821660009081526018602052604081205481906040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038616906370a0823190602401602060405180830381865afa158015612e4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e6f9190615971565b612e7991906156bf565b6001600160a01b038086166000908152601960209081526040808320938816835292905220549091506127ee90849083906141fd565b6060612eba826132e7565b612f065760405162461bcd60e51b815260206004820152601f60248201527f417263684f6650656163653a206e6f6e206578697374656e7420746f6b656e006044820152606401610d87565b60095415612f5457601c612f2f612f2a612f1f60095490565b601a54869190614406565b614492565b604051602001612f409291906159a6565b604051602081830303815290604052610c76565b601b8054612f6190615662565b80601f0160208091040260200160405190810160405280929190818152602001828054612f8d90615662565b8015612fda5780601f10612faf57610100808354040283529160200191612fda565b820191906000526020600020905b815481529060010190602001808311612fbd57829003601f168201915b505050505092915050565b60006126fb61302984848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061331e92505050565b614076565b6005546000908152600160205260409020546130b25760405162461bcd60e51b815260206004820152602260248201527f4d6f6e757665727365457069736f64653a206d696e74206e6f7420616c6c6f7760448201527f65640000000000000000000000000000000000000000000000000000000000006064820152608401610d87565b6130ba613e09565b6000600f541161310c5760405162461bcd60e51b815260206004820152601c60248201527f417263684f6650656163653a206e6f20746f6b656e206d696e746564000000006044820152606401610d87565b6128e67f8ccfdddeb90e09a3007c57a84e2def5cf9678f6e0dd154a9c97b999bf558b83c61388a565b61313d613e09565b6001600160a01b0381166131b95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610d87565b611cbf81614197565b600061105f60055460026145c790919063ffffffff16565b60055460009081526001602052604090206004015460ff166132645760405162461bcd60e51b815260206004820152602a60248201527f4d6f6e757665727365457069736f64653a2077686974656c697374696e67206e60448201527f6f7420616c6c6f776564000000000000000000000000000000000000000000006064820152608401610d87565b61326c613e09565b611cbf816145e0565b61327d613e09565b6128e67fc12c07d5f32f232c1cbe6c78933af18d18a57642e84dbdb94ab11fc87ed49a5d61388a565b9055565b5490565b6000908152600190910160205260409020805460ff19169055565b6000908152600191820160205260409020805460ff19169091179055565b600881901c600090815260126020526040812054600160ff1b60ff84161c161561331357506000919050565b610c7682600f541190565b6000816040516020016133319190615a47565b604051602081830303815290604052805190602001209050919050565b600081815260106020526040902080546001600160a01b0319166001600160a01b0384169081179091558190613383826126d6565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000806008600f54901c60016133d291906156bf565b905060005b81811015613417576000818152601260205260409020546133f7816145ed565b61340190856156bf565b935050808061340f9061570f565b9150506133d7565b505090565b8047101561346c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610d87565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146134b9576040519150601f19603f3d011682016040523d82523d6000602084013e6134be565b606091505b50509050806110435760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610d87565b600554600090815260016020526040902060040154610100900460ff166135aa5760405162461bcd60e51b8152602060048201526024808201527f4d6f6e757665727365457069736f64653a2072657665616c206e6f7420616c6c6044820152631bddd95960e21b6064820152608401610d87565b6135b560008261460c565b61127e7fa2aaa960fdc20f59df623fb76879d3c3268fb84a982b4d42f202a62bfd019df561388a565b600054600160a01b900460ff16156128e65760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610d87565b60008161364584866156bf565b1115949350505050565b60055460009081526001602052604081205461366b84846156bf565b11159392505050565b600060055482148061369a575060055460009081526001602052604090206003015460ff165b80610c76575050600554600090815260016020908152604080832093835260029093019052205460ff1690565b6000826136d383614076565b6136459086615a63565b600f54816137535760405162461bcd60e51b815260206004820152602560248201527f4552433732315073693a207175616e74697479206d757374206265206772656160448201527f74657220300000000000000000000000000000000000000000000000000000006064820152608401610d87565b6001600160a01b0383166137cf5760405162461bcd60e51b815260206004820152602360248201527f4552433732315073693a206d696e7420746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610d87565b81600f60008282546137e191906156bf565b90915550506000818152600e6020908152604080832080546001600160a01b0319166001600160a01b038816179055600884901c8352600b90915290208054600160ff1b60ff84161c179055805b61383983836156bf565b8110156115be5760405181906001600160a01b038616906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4806138828161570f565b91505061382f565b6138926135de565b60008061389e8361463b565b915091507f3682fcea3c2ce4f677e5f9a0c04b5afa5ff6cd8d2d88596b34fd07a8536df56883036139085760408051838152602081018390527f3682fcea3c2ce4f677e5f9a0c04b5afa5ff6cd8d2d88596b34fd07a8536df56891015b60405180910390a1505050565b7fc12c07d5f32f232c1cbe6c78933af18d18a57642e84dbdb94ab11fc87ed49a5d83036139655760408051838152602081018390527fc12c07d5f32f232c1cbe6c78933af18d18a57642e84dbdb94ab11fc87ed49a5d91016138fb565b7f870329f3a558053d4992d3bde4e6426cebe0e337fb755a25e985486397c47dbd83036139c25760408051838152602081018390527f870329f3a558053d4992d3bde4e6426cebe0e337fb755a25e985486397c47dbd91016138fb565b7f8ccfdddeb90e09a3007c57a84e2def5cf9678f6e0dd154a9c97b999bf558b83c8303613a1f5760408051838152602081018390527f8ccfdddeb90e09a3007c57a84e2def5cf9678f6e0dd154a9c97b999bf558b83c91016138fb565b7fa2aaa960fdc20f59df623fb76879d3c3268fb84a982b4d42f202a62bfd019df58303613a7c5760408051838152602081018390527fa2aaa960fdc20f59df623fb76879d3c3268fb84a982b4d42f202a62bfd019df591016138fb565b60405162461bcd60e51b8152602060048201526024808201527f4d6f6e757665727365457069736f64653a206576656e74206e6f6e20657869736044820152631d195b9d60e21b6064820152608401610d87565b6000613adb826132e7565b613b4d5760405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a206f70657261746f7220717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610d87565b6000613b58836126d6565b9050806001600160a01b0316846001600160a01b03161480613b935750836001600160a01b0316613b8884610d0e565b6001600160a01b0316145b806127ee57506001600160a01b0380821660009081526011602090815260408083209388168352929052205460ff166127ee565b600080613bd3836140d9565b91509150846001600160a01b0316826001600160a01b031614613c5e5760405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a207472616e73666572206f6620746f6b656e2074686160448201527f74206973206e6f74206f776e00000000000000000000000000000000000000006064820152608401610d87565b6001600160a01b038416613cda5760405162461bcd60e51b815260206004820152602760248201527f4552433732315073693a207472616e7366657220746f20746865207a65726f2060448201527f61646472657373000000000000000000000000000000000000000000000000006064820152608401610d87565b613ce560008461334e565b6000613cf28460016156bf565b600881901c6000908152600b6020526040902054909150600160ff1b60ff83161c16158015613d225750600f5481105b15613d6f576000818152600e6020908152604080832080546001600160a01b0319166001600160a01b038b16179055600884901c8352600b90915290208054600160ff1b60ff84161c1790555b6000848152600e6020526040902080546001600160a01b0319166001600160a01b038716179055818414613dc057600884901c6000908152600b602052604090208054600160ff1b60ff87161c1790555b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b6000546001600160a01b031633146128e65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d87565b6000839003613eb45760405162461bcd60e51b815260206004820152601160248201527f4446413a2066726f6d20696e76616c69640000000000000000000000000000006044820152606401610d87565b6000829003613f055760405162461bcd60e51b815260206004820152600f60248201527f4446413a20746f20696e76616c696400000000000000000000000000000000006044820152606401610d87565b6000838152600285016020908152604080832084845290915290205415613f6e5760405162461bcd60e51b815260206004820152601860248201527f4446413a206578697374656e74207472616e736974696f6e00000000000000006044820152606401610d87565b600092835260029093016020908152604080842094845293905291902055565b6000613f99826126d6565b600883901c6000908152601260205260408082208054600160ff1b60ff88161c1790555191925083916001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052611043908490614685565b60055460009081526001602090815260408083208484526002019091528120548190610100900460ff166140c1575060055460009081526001602081905260409091200154806128cd565b50506000908152600160208190526040909120015490565b6000806140e5836132e7565b6141575760405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a206f776e657220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610d87565b6141608361476a565b6000818152600e60205260409020546001600160a01b031694909350915050565b60008261418e8584614777565b14949350505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000816141f385614076565b6136459085615a63565b6013546001600160a01b038416600090815260156020526040812054909183916142279086615a63565b6142319190615a90565b6126f891906156ac565b6006546007546040517f5d3b1d30000000000000000000000000000000000000000000000000000000008152600481019290925267ffffffffffffffff8116602483015268010000000000000000810461ffff1660448301526a0100000000000000000000900463ffffffff166064820152600160848201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690635d3b1d309060a4016020604051808303816000875af115801561430a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061432e9190615971565b6008805460ff191660011790556040519091507f9ac10fb18c93d33ad7b0a941897aef048d0f8d30756684e82b4552ba12764d45906143709083815260200190565b60405180910390a150565b614386848484613bc7565b6143948484846001856147bc565b6115be5760405162461bcd60e51b815260206004820152603560248201527f4552433732315073693a207472616e7366657220746f206e6f6e20455243373260448201527f31526563656976657220696d706c656d656e74657200000000000000000000006064820152608401610d87565b60008184106040518060400160405280601e81526020017f696e707574206973206e6f742077697468696e2074686520646f6d61696e00008152509061445f5760405162461bcd60e51b8152600401610d879190614eb7565b50600061446b83614949565b60010160ff1690505b61448185856003846149b3565b91508282106126e257819450614474565b6060816000036144d557505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156144ff57806144e98161570f565b91506144f89050600a83615a90565b91506144d9565b60008167ffffffffffffffff81111561451a5761451a614ff6565b6040519080825280601f01601f191660200182016040528015614544576020820181803683370190505b5090505b84156127ee576145596001836156ac565b9150614566600a86615aa4565b6145719060306156bf565b60f81b8183815181106145865761458661595b565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506145c0600a86615a90565b9450614548565b6000908152600191909101602052604090205460ff1690565b6145e8613e09565b600a55565b60005b8115614607576000198201909116906001016145f0565b919050565b8060008151811061461f5761461f61595b565b602090810291909101015160095550506008805460ff19169055565b6000806000614658600554856002614aac9092919063ffffffff16565b9050806005541415801561466b57508015155b1561467857600580549190555b6005549094909350915050565b60006146da826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614acc9092919063ffffffff16565b80519091501561104357808060200190518101906146f89190615ab8565b6110435760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610d87565b6000610c76600b83614adb565b600081815b84518110156126e2576147a88286838151811061479b5761479b61595b565b6020026020010151614bdc565b9150806147b48161570f565b91505061477c565b60006001600160a01b0385163b1561493c57506001835b6147dd84866156bf565b81101561493657604051630a85bd0160e11b81526001600160a01b0387169063150b7a02906148169033908b9086908990600401615ad5565b6020604051808303816000875af1925050508015614851575060408051601f3d908101601f1916820190925261484e91810190615b11565b60015b614904573d80801561487f576040519150601f19603f3d011682016040523d82523d6000602084013e614884565b606091505b5080516000036148fc5760405162461bcd60e51b815260206004820152603560248201527f4552433732315073693a207472616e7366657220746f206e6f6e20455243373260448201527f31526563656976657220696d706c656d656e74657200000000000000000000006064820152608401610d87565b805181602001fd5b82801561492157506001600160e01b03198116630a85bd0160e11b145b9250508061492e8161570f565b9150506147d3565b50614940565b5060015b95945050505050565b60006040518061012001604052806101008152602001615b2f610100913960f87e818283848586878898a8b8c8d8e8f929395969799a9b9d9e9faaeb6bedeeff61499285614c0b565b02901c815181106149a5576149a561595b565b016020015160f81c92915050565b600060028204808303600180821b60001990810191841b0188841c8216898216865b89811015614a80576040805160208082018e905281830184905282518083038401815260609092019092528051910120826000600184168103614a4457506040805160208082018790528183018590528251808303840181526060909201909252805191012087168518614a72565b5060408051602080820187905281830185905282518083038401815260609092019092528051910120861685185b9094509250506001016149d5565b5060028906600003614a9c57941b90931793506127ee92505050565b931b90921793506127ee92505050565b600091825260029290920160209081526040808320938352929052205490565b60606126f88484600085614c52565b600881901c60008181526020849052604081205490919060ff808516919082181c8015614b1d57614b0b81614d9a565b60ff168203600884901b179350614bd3565b60008311614b935760405162461bcd60e51b815260206004820152603460248201527f4269744d6170733a205468652073657420626974206265666f7265207468652060448201527f696e64657820646f65736e27742065786973742e0000000000000000000000006064820152608401610d87565b506000199091016000818152602086905260409020549091908015614bce57614bbb81614d9a565b60ff0360ff16600884901b179350614bd3565b614b1d565b50505092915050565b6000818310614bf85760008281526020849052604090206126fb565b60008381526020839052604090206126fb565b6000808211614c1957600080fd5b50608081901c17604081901c17602081901c17601081901c17600881901c17600481901c17600281901c17600181811c909117811c0190565b606082471015614cca5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610d87565b6001600160a01b0385163b614d215760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610d87565b600080866001600160a01b03168587604051614d3d9190615a47565b60006040518083038185875af1925050503d8060008114614d7a576040519150601f19603f3d011682016040523d82523d6000602084013e614d7f565b606091505b5091509150614d8f828286614de3565b979650505050505050565b60006040518061012001604052806101008152602001615b2f610100913960f87e818283848586878898a8b8c8d8e8f929395969799a9b9d9e9faaeb6bedeeff61499285614e1c565b60608315614df25750816126fb565b825115614e025782518084602001fd5b8160405162461bcd60e51b8152600401610d879190614eb7565b6000808211614e2a57600080fd5b5060008190031690565b6001600160e01b031981168114611cbf57600080fd5b600060208284031215614e5c57600080fd5b81356126fb81614e34565b60005b83811015614e82578181015183820152602001614e6a565b50506000910152565b60008151808452614ea3816020860160208601614e67565b601f01601f19169290920160200192915050565b6020815260006126fb6020830184614e8b565b600060208284031215614edc57600080fd5b5035919050565b60008083601f840112614ef557600080fd5b50813567ffffffffffffffff811115614f0d57600080fd5b602083019150836020828501011115614f2557600080fd5b9250929050565b60008060008060408587031215614f4257600080fd5b843567ffffffffffffffff80821115614f5a57600080fd5b614f6688838901614ee3565b90965094506020870135915080821115614f7f57600080fd5b50614f8c87828801614ee3565b95989497509550505050565b6001600160a01b0381168114611cbf57600080fd5b60008060408385031215614fc057600080fd5b8235614fcb81614f98565b946020939093013593505050565b600060208284031215614feb57600080fd5b81356126fb81614f98565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561503557615035614ff6565b604052919050565b600067ffffffffffffffff82111561505757615057614ff6565b5060051b60200190565b6000806040838503121561507457600080fd5b8235915060208084013567ffffffffffffffff81111561509357600080fd5b8401601f810186136150a457600080fd5b80356150b76150b28261503d565b61500c565b81815260059190911b820183019083810190888311156150d657600080fd5b928401925b828410156150f4578335825292840192908401906150db565b80955050505050509250929050565b600082601f83011261511457600080fd5b813560206151246150b28361503d565b82815260059290921b8401810191818101908684111561514357600080fd5b8286015b8481101561515e5780358352918301918301615147565b509695505050505050565b6000806000806080858703121561517f57600080fd5b843593506020850135925060408501359150606085013567ffffffffffffffff8111156151ab57600080fd5b6151b787828801615103565b91505092959194509250565b6000806000606084860312156151d857600080fd5b83356151e381614f98565b925060208401356151f381614f98565b929592945050506040919091013590565b6000806020838503121561521757600080fd5b823567ffffffffffffffff81111561522e57600080fd5b61523a85828601614ee3565b90969095509350505050565b6000806040838503121561525957600080fd5b823561526481614f98565b9150602083013561527481614f98565b809150509250929050565b6000806000806000806060878903121561529857600080fd5b863567ffffffffffffffff808211156152b057600080fd5b6152bc8a838b01614ee3565b909850965060208901359150808211156152d557600080fd5b6152e18a838b01614ee3565b909650945060408901359150808211156152fa57600080fd5b5061530789828a01614ee3565b979a9699509497509295939492505050565b6000806000806000858703608081121561533257600080fd5b863567ffffffffffffffff8082111561534a57600080fd5b6153568a838b01614ee3565b9098509650602089013591508082111561536f57600080fd5b5061537c89828a01614ee3565b9095509350506040603f198201121561539457600080fd5b506040860190509295509295909350565b600067ffffffffffffffff8311156153bf576153bf614ff6565b6153d2601f8401601f191660200161500c565b90508281528383830111156153e657600080fd5b828260208301376000602084830101529392505050565b8015158114611cbf57600080fd5b600080600080600080600060e0888a03121561542657600080fd5b873567ffffffffffffffff81111561543d57600080fd5b8801601f81018a1361544e57600080fd5b61545d8a8235602084016153a5565b975050602088013561546e816153fd565b95506040880135945060608801359350608088013561548c816153fd565b925060a088013561549c816153fd565b915060c08801356154ac816153fd565b8091505092959891949750929550565b6000806000606084860312156154d157600080fd5b8335925060208401359150604084013567ffffffffffffffff8111156154f657600080fd5b61550286828701615103565b9150509250925092565b6000806000806080858703121561552257600080fd5b843561552d81614f98565b93506020850135925060408501359150606085013567ffffffffffffffff8111156151ab57600080fd5b60006080828403121561556957600080fd5b50919050565b6000806000806060858703121561558557600080fd5b843567ffffffffffffffff81111561559c57600080fd5b6155a887828801614ee3565b90989097506020870135966040013595509350505050565b600080604083850312156155d357600080fd5b82356155de81614f98565b91506020830135615274816153fd565b6000806000806080858703121561560457600080fd5b843561560f81614f98565b9350602085013561561f81614f98565b925060408501359150606085013567ffffffffffffffff81111561564257600080fd5b8501601f8101871361565357600080fd5b6151b7878235602084016153a5565b600181811c9082168061567657607f821691505b60208210810361556957634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115610c7657610c76615696565b80820180821115610c7657610c76615696565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6020815260006126f86020830184866156d2565b60006001820161572157615721615696565b5060010190565b818382377f28627974657333322c62797465733332290000000000000000000000000000009101908152601101919050565b60608152600061576e60608301888a6156d2565b82810360208401526157818187896156d2565b905082810360408401526157968185876156d2565b9998505050505050505050565b81356157ae816153fd565b815460ff19811691151560ff16918217835560208401356157ce816153fd565b61ffff199190911690911790151560081b61ff001617905550565b6000602082840312156157fb57600080fd5b81356126fb816153fd565b60608152600061581a6060830187896156d2565b828103602084015261582d8186886156d2565b91505082151560408301529695505050505050565b6040815260006158566040830186886156d2565b8281036020840152614d8f8185876156d2565b60e08152600061587c60e083018a614e8b565b971515602083015250604081019590955260608501939093529015156080840152151560a0830152151560c090910152919050565b8135815560018101602083013567ffffffffffffffff81168082146158d557600080fd5b82549150604085013561ffff811681146158ee57600080fd5b606086013563ffffffff8116811461590557600080fd5b6dffffffff000000000000000000008160501b166dffffffff000000000000000000001984166dffffffffffffffffffffffffffff1986161769ffff00000000000000008460401b161717855550505050505050565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561598357600080fd5b5051919050565b6000815161599c818560208601614e67565b9290920192915050565b600080845481600182811c9150808316806159c257607f831692505b602080841082036159e157634e487b7160e01b86526022600452602486fd5b8180156159f55760018114615a0a57615a37565b60ff1986168952841515850289019650615a37565b60008b81526020902060005b86811015615a2f5781548b820152908501908301615a16565b505084890196505b505050505050614940818561598a565b60008251615a59818460208701614e67565b9190910192915050565b8082028115828204841417610c7657610c76615696565b634e487b7160e01b600052601260045260246000fd5b600082615a9f57615a9f615a7a565b500490565b600082615ab357615ab3615a7a565b500690565b600060208284031215615aca57600080fd5b81516126fb816153fd565b60006001600160a01b03808716835280861660208401525083604083015260806060830152615b076080830184614e8b565b9695505050505050565b600060208284031215615b2357600080fd5b81516126fb81614e3456fe0001020903110a19042112290b311a3905412245134d2a550c5d32651b6d3a7506264262237d468514804e8d2b95569d0d495ea533a966b11c886eb93bc176c9071727374353637324837e9b47af86c7155181ad4fd18ed32c9096db57d59ee30e2e4a6a5f92a6be3498aae067ddb2eb1d5989b56fd7baf33ca0c2ee77e5caf7ff0810182028303840444c545c646c7425617c847f8c949c48a4a8b087b8c0c816365272829aaec650acd0d28fdad4e22d6991bd97dfdcea58b4d6f29fede4f6fe0f1f2f3f4b5b6b607b8b93a3a7b7bf357199c5abcfd9e168bcdee9b3f1ecf5fd1e3e5a7a8aa2b670c4ced8bbe8f0f4fc3d79a1c3cde7effb78cce6facbf9f8a264697066735822122021d5bedec77ad5fba5f69d4e04932596e1aef99f19c577f158f13a23eb85fc2f64736f6c634300081100330000000000000000000000000000000000000000000000000000000000001e61000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002800000000000000000000000000000000000000000000000000000000000000300000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e699099fe0eebf5e446e3c998ec9bb19951541aee00bb90ea201ae456421a2ded8680500000000000000000000000000000000000000000000000000000000000001fd000000000000000000000000000000000000000000000000000000000000034000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000000244d6f6e757665727365202d20457069736f646520493a2041726368206f66205065616365000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003414f5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000042697066733a2f2f6261666b726569666e3634356d65356434706c346d75666e6d7461696f6171346f6867786633797070677464767a6d366d756c61706170797771340000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000043697066733a2f2f62616679626569667132347a3766796a616d337a6f75326d6d7571796b7467336461723778636c78776175783367737677756c35693763686279692f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001a496e74726f64756374696f6e3a20546865204269672042616e670000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000379fe33635532c4f8d1ae50391f7ddf5b32b4c360000000000000000000000001bb807b0ad0d43893f6902efdd4b568a15368122000000000000000000000000a314eb02ba53a415d09a2098d9a0d1d0c455a81a00000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000ae20000000000000000000000000000000000000000000000000000000000000e170000000000000000000000000000000000000000000000000000000000000e17
Deployed Bytecode
0x60806040526004361061039b5760003560e01c806367f11ef0116101dc578063a475b5dd11610102578063d79779b2116100a0578063f2fde38b1161006f578063f2fde38b14610b41578063f341878114610b61578063f5aa406d14610b76578063fbef35d814610b9657600080fd5b8063d79779b214610a98578063e33b7de314610ace578063e985e9c514610ae3578063f15de7aa14610b2c57600080fd5b8063c45ac050116100dc578063c45ac05014610a02578063c87b56dd14610a22578063ce7c2ac214610a42578063d37b2ba914610a7857600080fd5b8063a475b5dd14610997578063a94df4f4146109ac578063b88d4fde146109e257600080fd5b80638b83209b1161017a5780639b70ccf9116101495780639b70ccf914610924578063a0712d6814610944578063a22cb46514610957578063a3f8eace1461097757600080fd5b80638b83209b1461089b5780638da5cb5b146108bb57806395d89b41146108d95780639852595c146108ee57600080fd5b8063715018a6116101b6578063715018a61461083157806376f0a0e8146108465780637a4410c71461085b5780637dac7fd41461087b57600080fd5b806367f11ef0146107d957806369d30a49146107f957806370a082311461081157600080fd5b8063406072a9116102c15780634a1703ad1161025f5780635e821ed41161022e5780635e821ed41461076457806362f93a32146107845780636352211e14610799578063661be8f0146107b957600080fd5b80634a1703ad146106f05780634f6ccce7146107055780635745fcad146107255780635c975abb1461074557600080fd5b806342966c681161029b57806342966c681461067b5780634654b08a1461069b57806347ce07cc146106bb57806348b75044146106d057600080fd5b8063406072a9146105f557806340ce964d1461063b57806342842e0e1461065b57600080fd5b80631fe543e31161033957806329f4ba131161030857806329f4ba131461058b5780632f745c59146105ab578063386bfc98146105cb5780633a98ef39146105e057600080fd5b80631fe543e314610514578063232471051461053457806323b872dd14610547578063264258121461056757600080fd5b80630850ba5d116103755780630850ba5d14610478578063095ea7b3146104af57806318160ddd146104d157806319165587146104f457600080fd5b806301ffc9a7146103e957806306fdde031461041e578063081812fc1461044057600080fd5b366103e4577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033604080516001600160a01b0390921682523460208301520160405180910390a1005b600080fd5b3480156103f557600080fd5b50610409610404366004614e4a565b610bab565b60405190151581526020015b60405180910390f35b34801561042a57600080fd5b50610433610c7c565b6040516104159190614eb7565b34801561044c57600080fd5b5061046061045b366004614eca565b610d0e565b6040516001600160a01b039091168152602001610415565b34801561048457600080fd5b50610498610493366004614f2c565b610dac565b604080519215158352901515602083015201610415565b3480156104bb57600080fd5b506104cf6104ca366004614fad565b610f18565b005b3480156104dd57600080fd5b506104e6611048565b604051908152602001610415565b34801561050057600080fd5b506104cf61050f366004614fd9565b611064565b34801561052057600080fd5b506104cf61052f366004615061565b6111e1565b6104cf610542366004615169565b611282565b34801561055357600080fd5b506104cf6105623660046151c3565b6115c4565b34801561057357600080fd5b506005546000908152600160205260409020546104e6565b34801561059757600080fd5b506104cf6105a6366004615204565b61164b565b3480156105b757600080fd5b506104e66105c6366004614fad565b611812565b3480156105d757600080fd5b50600a546104e6565b3480156105ec57600080fd5b506013546104e6565b34801561060157600080fd5b506104e6610610366004615246565b6001600160a01b03918216600090815260196020908152604080832093909416825291909152205490565b34801561064757600080fd5b506104cf61065636600461527f565b6118f3565b34801561066757600080fd5b506104cf6106763660046151c3565b611bb7565b34801561068757600080fd5b506104cf610696366004614eca565b611bd2565b3480156106a757600080fd5b506104cf6106b6366004615319565b611cc2565b3480156106c757600080fd5b506009546104e6565b3480156106dc57600080fd5b506104cf6106eb366004615246565b611fb5565b3480156106fc57600080fd5b506104e661215b565b34801561071157600080fd5b506104e6610720366004614eca565b612168565b34801561073157600080fd5b506104cf610740366004614f2c565b612237565b34801561075157600080fd5b50600054600160a01b900460ff16610409565b34801561077057600080fd5b506104e661077f36600461540b565b61237e565b34801561079057600080fd5b506104e66126cb565b3480156107a557600080fd5b506104606107b4366004614eca565b6126d6565b3480156107c557600080fd5b506104096107d43660046154bc565b6126ea565b3480156107e557600080fd5b506104096107f436600461550c565b612702565b34801561080557600080fd5b5060085460ff16610409565b34801561081d57600080fd5b506104e661082c366004614fd9565b6127f6565b34801561083d57600080fd5b506104cf6128d4565b34801561085257600080fd5b506005546104e6565b34801561086757600080fd5b506104cf610876366004614f2c565b6128e8565b34801561088757600080fd5b506104cf610896366004615557565b612a36565b3480156108a757600080fd5b506104606108b6366004614eca565b612a4b565b3480156108c757600080fd5b506000546001600160a01b0316610460565b3480156108e557600080fd5b50610433612a7b565b3480156108fa57600080fd5b506104e6610909366004614fd9565b6001600160a01b031660009081526016602052604090205490565b34801561093057600080fd5b5061040961093f36600461556f565b612a8a565b6104cf610952366004614eca565b612ad5565b34801561096357600080fd5b506104cf6109723660046155c0565b612af8565b34801561098357600080fd5b506104e6610992366004614fd9565b612bbc565b3480156109a357600080fd5b506104cf612bfd565b3480156109b857600080fd5b506104e66109c7366004614fd9565b6001600160a01b03166000908152601d602052604090205490565b3480156109ee57600080fd5b506104cf6109fd3660046155ee565b612d4b565b348015610a0e57600080fd5b506104e6610a1d366004615246565b612dd3565b348015610a2e57600080fd5b50610433610a3d366004614eca565b612eaf565b348015610a4e57600080fd5b506104e6610a5d366004614fd9565b6001600160a01b031660009081526015602052604090205490565b348015610a8457600080fd5b506104e6610a93366004615204565b612fe5565b348015610aa457600080fd5b506104e6610ab3366004614fd9565b6001600160a01b031660009081526018602052604090205490565b348015610ada57600080fd5b506014546104e6565b348015610aef57600080fd5b50610409610afe366004615246565b6001600160a01b03918216600090815260116020908152604080832093909416825291909152205460ff1690565b348015610b3857600080fd5b506104cf61302e565b348015610b4d57600080fd5b506104cf610b5c366004614fd9565b613135565b348015610b6d57600080fd5b506104096131c2565b348015610b8257600080fd5b506104cf610b91366004614eca565b6131da565b348015610ba257600080fd5b506104cf613275565b60006001600160e01b031982167f80ac58cd000000000000000000000000000000000000000000000000000000001480610c0e57506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610c4257506001600160e01b031982167f780e9d6300000000000000000000000000000000000000000000000000000000145b80610c7657507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b6060600c8054610c8b90615662565b80601f0160208091040260200160405190810160405280929190818152602001828054610cb790615662565b8015610d045780601f10610cd957610100808354040283529160200191610d04565b820191906000526020600020905b815481529060010190602001808311610ce757829003601f168201915b5050505050905090565b6000610d19826132e7565b610d905760405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a20617070726f76656420717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e000000000000000000000000000000000060648201526084015b60405180910390fd5b506000908152601060205260409020546001600160a01b031690565b60008060016000610df288888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061331e92505050565b81526020019081526020016000206000016002016000610e4786868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061331e92505050565b815260208082019290925260409081016000908120548251601f8a0185900485028101850190935288835260ff1692600192610e9d918b908b908190840183828082843760009201919091525061331e92505050565b81526020019081526020016000206000016002016000610ef287878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061331e92505050565b8152602081019190915260400160002054909761010090910460ff169650945050505050565b6000610f23826126d6565b9050806001600160a01b0316836001600160a01b031603610fab5760405162461bcd60e51b8152602060048201526024808201527f4552433732315073693a20617070726f76616c20746f2063757272656e74206f60448201527f776e6572000000000000000000000000000000000000000000000000000000006064820152608401610d87565b336001600160a01b0382161480610fc75750610fc78133610afe565b6110395760405162461bcd60e51b815260206004820152603b60248201527f4552433732315073693a20617070726f76652063616c6c6572206973206e6f7460448201527f206f776e6572206e6f7220617070726f76656420666f7220616c6c00000000006064820152608401610d87565b611043838361334e565b505050565b60006110526133bc565b600f5461105f91906156ac565b905090565b6001600160a01b0381166000908152601560205260409020546110d85760405162461bcd60e51b815260206004820152602660248201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060448201526573686172657360d01b6064820152608401610d87565b60006110e382612bbc565b9050806000036111495760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060448201526a191d59481c185e5b595b9d60aa1b6064820152608401610d87565b6001600160a01b038216600090815260166020526040812080548392906111719084906156bf565b92505081905550806014600082825461118a91906156bf565b9091555061119a9050828261341c565b604080516001600160a01b0384168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b05691015b60405180910390a15050565b336001600160a01b037f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e699091614611274576040517f1cf993f40000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b037f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e69909166024820152604401610d87565b61127e8282613535565b5050565b61128a6135de565b60055460009081526001602052604090206003015460ff16611323576112b18383836126ea565b6113235760405162461bcd60e51b815260206004820152602360248201527f417263684f6650656163653a2073656e646572206e6f742077686974656c697360448201527f74656400000000000000000000000000000000000000000000000000000000006064820152608401610d87565b600954156113735760405162461bcd60e51b815260206004820152601d60248201527f417263684f6650656163653a20616c72656164792072657665616c65640000006044820152606401610d87565b336000908152601d602052604090205461138e908585613638565b6114005760405162461bcd60e51b815260206004820152602160248201527f417263684f6650656163653a207175616e74697479206e6f7420616c6c6f776560448201527f64000000000000000000000000000000000000000000000000000000000000006064820152608401610d87565b61140c84600f5461364f565b6114585760405162461bcd60e51b815260206004820152601c60248201527f417263684f6650656163653a206e6f206d696e742063686170746572000000006044820152606401610d87565b61146182613674565b6114ad5760405162461bcd60e51b815260206004820152601e60248201527f417263684f6650656163653a2067726f7570206e6f7420616c6c6f77656400006044820152606401610d87565b6114b88434846136c7565b6115045760405162461bcd60e51b815260206004820152601c60248201527f417263684f6650656163653a206f6666657220756e6d617463686564000000006044820152606401610d87565b336000908152601d6020526040812080548692906115239084906156bf565b90915550611533905033856136dd565b600554600090815260016020526040902054600f54036115be57600554600090815260016020526040902054601a5414611595576115907f3682fcea3c2ce4f677e5f9a0c04b5afa5ff6cd8d2d88596b34fd07a8536df56861388a565b6115be565b6115be7f870329f3a558053d4992d3bde4e6426cebe0e337fb755a25e985486397c47dbd61388a565b50505050565b6115ce3382613ad0565b6116405760405162461bcd60e51b815260206004820152603460248201527f4552433732315073693a207472616e736665722063616c6c6572206973206e6f60448201527f74206f776e6572206e6f7220617070726f7665640000000000000000000000006064820152608401610d87565b611043838383613bc7565b611653613e09565b600254600554146116b25760405162461bcd60e51b815260206004820152602360248201527f4d6f6e757665727365457069736f64653a207570646174657320666f726269646044820152623232b760e91b6064820152608401610d87565b6116f182828080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061331e92505050565b600254036117675760405162461bcd60e51b815260206004820152602760248201527f4d6f6e757665727365457069736f64653a20696e697469616c206e6f6e20646560448201527f6c657461626c65000000000000000000000000000000000000000000000000006064820152608401610d87565b600160006117aa84848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061331e92505050565b8152602081019190915260409081016000908120818155600181019190915560038101805460ff19169055600401805462ffffff19169055517fc759122f1bb65845cb6e526e95bd428763f49b30efe59497ec7d8fc54191e30f906111d590849084906156fb565b60008060005b600f548110156118855761182b816132e7565b8015611850575061183b816126d6565b6001600160a01b0316856001600160a01b0316145b1561187357838203611865579150610c769050565b8161186f8161570f565b9250505b8061187d8161570f565b915050611818565b5060405162461bcd60e51b8152602060048201526024808201527f4552433732315073693a206f776e657220696e646578206f7574206f6620626f60448201527f756e6473000000000000000000000000000000000000000000000000000000006064820152608401610d87565b6118fb613e09565b6002546005541461195a5760405162461bcd60e51b815260206004820152602360248201527f4d6f6e757665727365457069736f64653a207570646174657320666f726269646044820152623232b760e91b6064820152608401610d87565b6001600061199d88888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061331e92505050565b815260208101919091526040016000206004015462010000900460ff16611a065760405162461bcd60e51b815260206004820152601e60248201527f4d6f6e757665727365457069736f64653a2066726f6d206e6f742073657400006044820152606401610d87565b60016000611a4986868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061331e92505050565b815260208101919091526040016000206004015462010000900460ff16611ab25760405162461bcd60e51b815260206004820152601c60248201527f4d6f6e757665727365457069736f64653a20746f206e6f7420736574000000006044820152606401610d87565b611b6e611af487878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061331e92505050565b611b3386868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061331e92505050565b8484604051602001611b46929190615728565b604051602081830303815290604052805190602001206002613e63909392919063ffffffff16565b7fa5fa045302df1190e7522c88350b2c1d256d5070b46265fd61cab34114f56785868686868686604051611ba79695949392919061575a565b60405180910390a1505050505050565b61104383838360405180602001604052806000815250612d4b565b611bdb816132e7565b611c275760405162461bcd60e51b815260206004820152601f60248201527f417263684f6650656163653a206e6f6e206578697374656e7420746f6b656e006044820152606401610d87565b611c30816126d6565b6001600160a01b0316336001600160a01b031614611cb65760405162461bcd60e51b815260206004820152602360248201527f417263684f6650656163653a2073656e646572206e6f7420746f6b656e206f7760448201527f6e657200000000000000000000000000000000000000000000000000000000006064820152608401610d87565b611cbf81613f8e565b50565b611cca613e09565b60025460055414611d295760405162461bcd60e51b815260206004820152602360248201527f4d6f6e757665727365457069736f64653a207570646174657320666f726269646044820152623232b760e91b6064820152608401610d87565b60016000611d6c85858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061331e92505050565b815260208101919091526040016000206004015462010000900460ff16611de15760405162461bcd60e51b8152602060048201526024808201527f4d6f6e757665727365457069736f64653a2067726f7570206e6f6e20657869736044820152631d195b9d60e21b6064820152608401610d87565b600060016000611e2688888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061331e92505050565b815260208101919091526040016000205411611eaa5760405162461bcd60e51b815260206004820152602760248201527f4d6f6e757665727365457069736f64653a2063686170746572206d696e74206460448201527f697361626c6564000000000000000000000000000000000000000000000000006064820152608401610d87565b8060016000611eee88888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061331e92505050565b81526020019081526020016000206000016002016000611f4386868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061331e92505050565b81526020019081526020016000208181611f5d91906157a3565b507f2c078826f3e7e4547743ae7b52e4ca5544f8ffb7b349fbe6d6b12ef37141fde7905085858585611f9560408701602088016157e9565b604051611fa6959493929190615806565b60405180910390a15050505050565b6001600160a01b0381166000908152601560205260409020546120295760405162461bcd60e51b815260206004820152602660248201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060448201526573686172657360d01b6064820152608401610d87565b60006120358383612dd3565b90508060000361209b5760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060448201526a191d59481c185e5b595b9d60aa1b6064820152608401610d87565b6001600160a01b038084166000908152601960209081526040808320938616835292905290812080548392906120d29084906156bf565b90915550506001600160a01b038316600090815260186020526040812080548392906120ff9084906156bf565b909155506121109050838383613ff6565b604080516001600160a01b038481168252602082018490528516917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a2505050565b600061105f600554614076565b6000612172611048565b82106121e65760405162461bcd60e51b815260206004820152602560248201527f4552433732315073693a20676c6f62616c20696e646578206f7574206f66206260448201527f6f756e64730000000000000000000000000000000000000000000000000000006064820152608401610d87565b6000805b600f54811015612230576121fd816132e7565b1561221e57838203612210579392505050565b8161221a8161570f565b9250505b806122288161570f565b9150506121ea565b5050919050565b61223f613e09565b6002546005541461229e5760405162461bcd60e51b815260206004820152602360248201527f4d6f6e757665727365457069736f64653a207570646174657320666f726269646044820152623232b760e91b6064820152608401610d87565b61233b6122e085858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061331e92505050565b61231f84848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061331e92505050565b6000918252600460209081526040808420928452919052812055565b7f8633d2a2bc8cc30093b92a6fda073c3d18891b24913d83ff6b9103154ed09e48848484846040516123709493929190615842565b60405180910390a150505050565b6000612388613e09565b600254600554146123e75760405162461bcd60e51b815260206004820152602360248201527f4d6f6e757665727365457069736f64653a207570646174657320666f726269646044820152623232b760e91b6064820152608401610d87565b8115806124055750861580156123fb575085155b8015612405575082155b6124775760405162461bcd60e51b815260206004820152603560248201527f4d6f6e757665727365457069736f64653a20666561747572657320646973616260448201527f6c656420647572696e6720636f6e636c7573696f6e00000000000000000000006064820152608401610d87565b8280156124845750600086115b156124f75760405162461bcd60e51b815260206004820152602c60248201527f4d6f6e757665727365457069736f64653a2072657665616c2077697468206d6960448201527f6e7420666f7262696464656e00000000000000000000000000000000000000006064820152608401610d87565b86600160006125058b61331e565b815260200190815260200160002060040160006101000a81548160ff021916908315150217905550856001600061253b8b61331e565b81526020019081526020016000206000016000018190555084600160006125618b61331e565b81526020019081526020016000206000016001018190555083600160006125878b61331e565b815260200190815260200160002060000160030160006101000a81548160ff02191690831515021790555082600160006125c08b61331e565b815260200190815260200160002060040160016101000a81548160ff02191690831515021790555060018060006125f68b61331e565b815260200190815260200160002060040160026101000a81548160ff0219169083151502179055508161264c5761264761262f8961331e565b6000908152600360205260409020805460ff19169055565b612673565b6126736126588961331e565b6000908152600360205260409020805460ff19166001179055565b7f9095707c269f32c8e4fabd7b3d61241d12a5e619d43f4cbdabfafc19b6697b39888888888888886040516126ae9796959493929190615869565b60405180910390a16126bf8861331e565b98975050505050505050565b600061105f60025490565b6000806126e2836140d9565b509392505050565b60006126f833858585612702565b90505b9392505050565b600080546001600160a01b031633148061272457506001600160a01b03851633145b6127965760405162461bcd60e51b815260206004820152602d60248201527f417263684f66506561636557686974656c6973743a206163636f756e7420636860448201527f65636b20666f7262696464656e000000000000000000000000000000000000006064820152608401610d87565b600a5460408051606088901b6bffffffffffffffffffffffff191660208083019190915260348201889052605480830188905283518084039091018152607490920190925280519101206127eb918491614181565b90505b949350505050565b60006001600160a01b0382166128745760405162461bcd60e51b815260206004820152602d60248201527f4552433732315073693a2062616c616e636520717565727920666f722074686560448201527f207a65726f2061646472657373000000000000000000000000000000000000006064820152608401610d87565b6000805b600f548110156128cd5761288b816132e7565b156128bd57612899816126d6565b6001600160a01b0316846001600160a01b0316036128bd576128ba8261570f565b91505b6128c68161570f565b9050612878565b5092915050565b6128dc613e09565b6128e66000614197565b565b6128f0613e09565b6002546005541461294f5760405162461bcd60e51b815260206004820152602360248201527f4d6f6e757665727365457069736f64653a207570646174657320666f726269646044820152623232b760e91b6064820152608401610d87565b6001600061299286868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061331e92505050565b815260200190815260200160002060000160020160006129e784848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061331e92505050565b815260208101919091526040908101600020805461ffff19169055517f7d460d27013b22d35c12328508431d9757ee76f51b10e5e0008a81a1841d384290612370908690869086908690615842565b612a3e613e09565b80600661104382826158b1565b600060178281548110612a6057612a6061595b565b6000918252602090912001546001600160a01b031692915050565b6060600d8054610c8b90615662565b60006127eb612ace86868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061331e92505050565b84846141e7565b611cbf816003612ae460055490565b604080516000815260208101909152611282565b336001600160a01b03831603612b505760405162461bcd60e51b815260206004820152601c60248201527f4552433732315073693a20617070726f766520746f2063616c6c6572000000006044820152606401610d87565b3360008181526011602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600080612bc860145490565b612bd290476156bf565b90506126fb8382612bf8866001600160a01b031660009081526016602052604090205490565b6141fd565b600554600090815260016020526040902060040154610100900460ff16612c725760405162461bcd60e51b8152602060048201526024808201527f4d6f6e757665727365457069736f64653a2072657665616c206e6f7420616c6c6044820152631bddd95960e21b6064820152608401610d87565b612c7a6135de565b60095415612cca5760405162461bcd60e51b815260206004820152601d60248201527f417263684f6650656163653a20616c72656164792072657665616c65640000006044820152606401610d87565b60085460ff1615612d435760405162461bcd60e51b815260206004820152602160248201527f417263684f6650656163653a2063757272656e746c792066756c66696c6c696e60448201527f67000000000000000000000000000000000000000000000000000000000000006064820152608401610d87565b6128e661423b565b612d553383613ad0565b612dc75760405162461bcd60e51b815260206004820152603460248201527f4552433732315073693a207472616e736665722063616c6c6572206973206e6f60448201527f74206f776e6572206e6f7220617070726f7665640000000000000000000000006064820152608401610d87565b6115be8484848461437b565b6001600160a01b03821660009081526018602052604081205481906040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038616906370a0823190602401602060405180830381865afa158015612e4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e6f9190615971565b612e7991906156bf565b6001600160a01b038086166000908152601960209081526040808320938816835292905220549091506127ee90849083906141fd565b6060612eba826132e7565b612f065760405162461bcd60e51b815260206004820152601f60248201527f417263684f6650656163653a206e6f6e206578697374656e7420746f6b656e006044820152606401610d87565b60095415612f5457601c612f2f612f2a612f1f60095490565b601a54869190614406565b614492565b604051602001612f409291906159a6565b604051602081830303815290604052610c76565b601b8054612f6190615662565b80601f0160208091040260200160405190810160405280929190818152602001828054612f8d90615662565b8015612fda5780601f10612faf57610100808354040283529160200191612fda565b820191906000526020600020905b815481529060010190602001808311612fbd57829003601f168201915b505050505092915050565b60006126fb61302984848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061331e92505050565b614076565b6005546000908152600160205260409020546130b25760405162461bcd60e51b815260206004820152602260248201527f4d6f6e757665727365457069736f64653a206d696e74206e6f7420616c6c6f7760448201527f65640000000000000000000000000000000000000000000000000000000000006064820152608401610d87565b6130ba613e09565b6000600f541161310c5760405162461bcd60e51b815260206004820152601c60248201527f417263684f6650656163653a206e6f20746f6b656e206d696e746564000000006044820152606401610d87565b6128e67f8ccfdddeb90e09a3007c57a84e2def5cf9678f6e0dd154a9c97b999bf558b83c61388a565b61313d613e09565b6001600160a01b0381166131b95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610d87565b611cbf81614197565b600061105f60055460026145c790919063ffffffff16565b60055460009081526001602052604090206004015460ff166132645760405162461bcd60e51b815260206004820152602a60248201527f4d6f6e757665727365457069736f64653a2077686974656c697374696e67206e60448201527f6f7420616c6c6f776564000000000000000000000000000000000000000000006064820152608401610d87565b61326c613e09565b611cbf816145e0565b61327d613e09565b6128e67fc12c07d5f32f232c1cbe6c78933af18d18a57642e84dbdb94ab11fc87ed49a5d61388a565b9055565b5490565b6000908152600190910160205260409020805460ff19169055565b6000908152600191820160205260409020805460ff19169091179055565b600881901c600090815260126020526040812054600160ff1b60ff84161c161561331357506000919050565b610c7682600f541190565b6000816040516020016133319190615a47565b604051602081830303815290604052805190602001209050919050565b600081815260106020526040902080546001600160a01b0319166001600160a01b0384169081179091558190613383826126d6565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000806008600f54901c60016133d291906156bf565b905060005b81811015613417576000818152601260205260409020546133f7816145ed565b61340190856156bf565b935050808061340f9061570f565b9150506133d7565b505090565b8047101561346c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610d87565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146134b9576040519150601f19603f3d011682016040523d82523d6000602084013e6134be565b606091505b50509050806110435760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610d87565b600554600090815260016020526040902060040154610100900460ff166135aa5760405162461bcd60e51b8152602060048201526024808201527f4d6f6e757665727365457069736f64653a2072657665616c206e6f7420616c6c6044820152631bddd95960e21b6064820152608401610d87565b6135b560008261460c565b61127e7fa2aaa960fdc20f59df623fb76879d3c3268fb84a982b4d42f202a62bfd019df561388a565b600054600160a01b900460ff16156128e65760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610d87565b60008161364584866156bf565b1115949350505050565b60055460009081526001602052604081205461366b84846156bf565b11159392505050565b600060055482148061369a575060055460009081526001602052604090206003015460ff165b80610c76575050600554600090815260016020908152604080832093835260029093019052205460ff1690565b6000826136d383614076565b6136459086615a63565b600f54816137535760405162461bcd60e51b815260206004820152602560248201527f4552433732315073693a207175616e74697479206d757374206265206772656160448201527f74657220300000000000000000000000000000000000000000000000000000006064820152608401610d87565b6001600160a01b0383166137cf5760405162461bcd60e51b815260206004820152602360248201527f4552433732315073693a206d696e7420746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610d87565b81600f60008282546137e191906156bf565b90915550506000818152600e6020908152604080832080546001600160a01b0319166001600160a01b038816179055600884901c8352600b90915290208054600160ff1b60ff84161c179055805b61383983836156bf565b8110156115be5760405181906001600160a01b038616906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4806138828161570f565b91505061382f565b6138926135de565b60008061389e8361463b565b915091507f3682fcea3c2ce4f677e5f9a0c04b5afa5ff6cd8d2d88596b34fd07a8536df56883036139085760408051838152602081018390527f3682fcea3c2ce4f677e5f9a0c04b5afa5ff6cd8d2d88596b34fd07a8536df56891015b60405180910390a1505050565b7fc12c07d5f32f232c1cbe6c78933af18d18a57642e84dbdb94ab11fc87ed49a5d83036139655760408051838152602081018390527fc12c07d5f32f232c1cbe6c78933af18d18a57642e84dbdb94ab11fc87ed49a5d91016138fb565b7f870329f3a558053d4992d3bde4e6426cebe0e337fb755a25e985486397c47dbd83036139c25760408051838152602081018390527f870329f3a558053d4992d3bde4e6426cebe0e337fb755a25e985486397c47dbd91016138fb565b7f8ccfdddeb90e09a3007c57a84e2def5cf9678f6e0dd154a9c97b999bf558b83c8303613a1f5760408051838152602081018390527f8ccfdddeb90e09a3007c57a84e2def5cf9678f6e0dd154a9c97b999bf558b83c91016138fb565b7fa2aaa960fdc20f59df623fb76879d3c3268fb84a982b4d42f202a62bfd019df58303613a7c5760408051838152602081018390527fa2aaa960fdc20f59df623fb76879d3c3268fb84a982b4d42f202a62bfd019df591016138fb565b60405162461bcd60e51b8152602060048201526024808201527f4d6f6e757665727365457069736f64653a206576656e74206e6f6e20657869736044820152631d195b9d60e21b6064820152608401610d87565b6000613adb826132e7565b613b4d5760405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a206f70657261746f7220717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610d87565b6000613b58836126d6565b9050806001600160a01b0316846001600160a01b03161480613b935750836001600160a01b0316613b8884610d0e565b6001600160a01b0316145b806127ee57506001600160a01b0380821660009081526011602090815260408083209388168352929052205460ff166127ee565b600080613bd3836140d9565b91509150846001600160a01b0316826001600160a01b031614613c5e5760405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a207472616e73666572206f6620746f6b656e2074686160448201527f74206973206e6f74206f776e00000000000000000000000000000000000000006064820152608401610d87565b6001600160a01b038416613cda5760405162461bcd60e51b815260206004820152602760248201527f4552433732315073693a207472616e7366657220746f20746865207a65726f2060448201527f61646472657373000000000000000000000000000000000000000000000000006064820152608401610d87565b613ce560008461334e565b6000613cf28460016156bf565b600881901c6000908152600b6020526040902054909150600160ff1b60ff83161c16158015613d225750600f5481105b15613d6f576000818152600e6020908152604080832080546001600160a01b0319166001600160a01b038b16179055600884901c8352600b90915290208054600160ff1b60ff84161c1790555b6000848152600e6020526040902080546001600160a01b0319166001600160a01b038716179055818414613dc057600884901c6000908152600b602052604090208054600160ff1b60ff87161c1790555b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b6000546001600160a01b031633146128e65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d87565b6000839003613eb45760405162461bcd60e51b815260206004820152601160248201527f4446413a2066726f6d20696e76616c69640000000000000000000000000000006044820152606401610d87565b6000829003613f055760405162461bcd60e51b815260206004820152600f60248201527f4446413a20746f20696e76616c696400000000000000000000000000000000006044820152606401610d87565b6000838152600285016020908152604080832084845290915290205415613f6e5760405162461bcd60e51b815260206004820152601860248201527f4446413a206578697374656e74207472616e736974696f6e00000000000000006044820152606401610d87565b600092835260029093016020908152604080842094845293905291902055565b6000613f99826126d6565b600883901c6000908152601260205260408082208054600160ff1b60ff88161c1790555191925083916001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052611043908490614685565b60055460009081526001602090815260408083208484526002019091528120548190610100900460ff166140c1575060055460009081526001602081905260409091200154806128cd565b50506000908152600160208190526040909120015490565b6000806140e5836132e7565b6141575760405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a206f776e657220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610d87565b6141608361476a565b6000818152600e60205260409020546001600160a01b031694909350915050565b60008261418e8584614777565b14949350505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000816141f385614076565b6136459085615a63565b6013546001600160a01b038416600090815260156020526040812054909183916142279086615a63565b6142319190615a90565b6126f891906156ac565b6006546007546040517f5d3b1d30000000000000000000000000000000000000000000000000000000008152600481019290925267ffffffffffffffff8116602483015268010000000000000000810461ffff1660448301526a0100000000000000000000900463ffffffff166064820152600160848201526000907f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e699096001600160a01b031690635d3b1d309060a4016020604051808303816000875af115801561430a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061432e9190615971565b6008805460ff191660011790556040519091507f9ac10fb18c93d33ad7b0a941897aef048d0f8d30756684e82b4552ba12764d45906143709083815260200190565b60405180910390a150565b614386848484613bc7565b6143948484846001856147bc565b6115be5760405162461bcd60e51b815260206004820152603560248201527f4552433732315073693a207472616e7366657220746f206e6f6e20455243373260448201527f31526563656976657220696d706c656d656e74657200000000000000000000006064820152608401610d87565b60008184106040518060400160405280601e81526020017f696e707574206973206e6f742077697468696e2074686520646f6d61696e00008152509061445f5760405162461bcd60e51b8152600401610d879190614eb7565b50600061446b83614949565b60010160ff1690505b61448185856003846149b3565b91508282106126e257819450614474565b6060816000036144d557505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156144ff57806144e98161570f565b91506144f89050600a83615a90565b91506144d9565b60008167ffffffffffffffff81111561451a5761451a614ff6565b6040519080825280601f01601f191660200182016040528015614544576020820181803683370190505b5090505b84156127ee576145596001836156ac565b9150614566600a86615aa4565b6145719060306156bf565b60f81b8183815181106145865761458661595b565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506145c0600a86615a90565b9450614548565b6000908152600191909101602052604090205460ff1690565b6145e8613e09565b600a55565b60005b8115614607576000198201909116906001016145f0565b919050565b8060008151811061461f5761461f61595b565b602090810291909101015160095550506008805460ff19169055565b6000806000614658600554856002614aac9092919063ffffffff16565b9050806005541415801561466b57508015155b1561467857600580549190555b6005549094909350915050565b60006146da826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614acc9092919063ffffffff16565b80519091501561104357808060200190518101906146f89190615ab8565b6110435760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610d87565b6000610c76600b83614adb565b600081815b84518110156126e2576147a88286838151811061479b5761479b61595b565b6020026020010151614bdc565b9150806147b48161570f565b91505061477c565b60006001600160a01b0385163b1561493c57506001835b6147dd84866156bf565b81101561493657604051630a85bd0160e11b81526001600160a01b0387169063150b7a02906148169033908b9086908990600401615ad5565b6020604051808303816000875af1925050508015614851575060408051601f3d908101601f1916820190925261484e91810190615b11565b60015b614904573d80801561487f576040519150601f19603f3d011682016040523d82523d6000602084013e614884565b606091505b5080516000036148fc5760405162461bcd60e51b815260206004820152603560248201527f4552433732315073693a207472616e7366657220746f206e6f6e20455243373260448201527f31526563656976657220696d706c656d656e74657200000000000000000000006064820152608401610d87565b805181602001fd5b82801561492157506001600160e01b03198116630a85bd0160e11b145b9250508061492e8161570f565b9150506147d3565b50614940565b5060015b95945050505050565b60006040518061012001604052806101008152602001615b2f610100913960f87e818283848586878898a8b8c8d8e8f929395969799a9b9d9e9faaeb6bedeeff61499285614c0b565b02901c815181106149a5576149a561595b565b016020015160f81c92915050565b600060028204808303600180821b60001990810191841b0188841c8216898216865b89811015614a80576040805160208082018e905281830184905282518083038401815260609092019092528051910120826000600184168103614a4457506040805160208082018790528183018590528251808303840181526060909201909252805191012087168518614a72565b5060408051602080820187905281830185905282518083038401815260609092019092528051910120861685185b9094509250506001016149d5565b5060028906600003614a9c57941b90931793506127ee92505050565b931b90921793506127ee92505050565b600091825260029290920160209081526040808320938352929052205490565b60606126f88484600085614c52565b600881901c60008181526020849052604081205490919060ff808516919082181c8015614b1d57614b0b81614d9a565b60ff168203600884901b179350614bd3565b60008311614b935760405162461bcd60e51b815260206004820152603460248201527f4269744d6170733a205468652073657420626974206265666f7265207468652060448201527f696e64657820646f65736e27742065786973742e0000000000000000000000006064820152608401610d87565b506000199091016000818152602086905260409020549091908015614bce57614bbb81614d9a565b60ff0360ff16600884901b179350614bd3565b614b1d565b50505092915050565b6000818310614bf85760008281526020849052604090206126fb565b60008381526020839052604090206126fb565b6000808211614c1957600080fd5b50608081901c17604081901c17602081901c17601081901c17600881901c17600481901c17600281901c17600181811c909117811c0190565b606082471015614cca5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610d87565b6001600160a01b0385163b614d215760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610d87565b600080866001600160a01b03168587604051614d3d9190615a47565b60006040518083038185875af1925050503d8060008114614d7a576040519150601f19603f3d011682016040523d82523d6000602084013e614d7f565b606091505b5091509150614d8f828286614de3565b979650505050505050565b60006040518061012001604052806101008152602001615b2f610100913960f87e818283848586878898a8b8c8d8e8f929395969799a9b9d9e9faaeb6bedeeff61499285614e1c565b60608315614df25750816126fb565b825115614e025782518084602001fd5b8160405162461bcd60e51b8152600401610d879190614eb7565b6000808211614e2a57600080fd5b5060008190031690565b6001600160e01b031981168114611cbf57600080fd5b600060208284031215614e5c57600080fd5b81356126fb81614e34565b60005b83811015614e82578181015183820152602001614e6a565b50506000910152565b60008151808452614ea3816020860160208601614e67565b601f01601f19169290920160200192915050565b6020815260006126fb6020830184614e8b565b600060208284031215614edc57600080fd5b5035919050565b60008083601f840112614ef557600080fd5b50813567ffffffffffffffff811115614f0d57600080fd5b602083019150836020828501011115614f2557600080fd5b9250929050565b60008060008060408587031215614f4257600080fd5b843567ffffffffffffffff80821115614f5a57600080fd5b614f6688838901614ee3565b90965094506020870135915080821115614f7f57600080fd5b50614f8c87828801614ee3565b95989497509550505050565b6001600160a01b0381168114611cbf57600080fd5b60008060408385031215614fc057600080fd5b8235614fcb81614f98565b946020939093013593505050565b600060208284031215614feb57600080fd5b81356126fb81614f98565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561503557615035614ff6565b604052919050565b600067ffffffffffffffff82111561505757615057614ff6565b5060051b60200190565b6000806040838503121561507457600080fd5b8235915060208084013567ffffffffffffffff81111561509357600080fd5b8401601f810186136150a457600080fd5b80356150b76150b28261503d565b61500c565b81815260059190911b820183019083810190888311156150d657600080fd5b928401925b828410156150f4578335825292840192908401906150db565b80955050505050509250929050565b600082601f83011261511457600080fd5b813560206151246150b28361503d565b82815260059290921b8401810191818101908684111561514357600080fd5b8286015b8481101561515e5780358352918301918301615147565b509695505050505050565b6000806000806080858703121561517f57600080fd5b843593506020850135925060408501359150606085013567ffffffffffffffff8111156151ab57600080fd5b6151b787828801615103565b91505092959194509250565b6000806000606084860312156151d857600080fd5b83356151e381614f98565b925060208401356151f381614f98565b929592945050506040919091013590565b6000806020838503121561521757600080fd5b823567ffffffffffffffff81111561522e57600080fd5b61523a85828601614ee3565b90969095509350505050565b6000806040838503121561525957600080fd5b823561526481614f98565b9150602083013561527481614f98565b809150509250929050565b6000806000806000806060878903121561529857600080fd5b863567ffffffffffffffff808211156152b057600080fd5b6152bc8a838b01614ee3565b909850965060208901359150808211156152d557600080fd5b6152e18a838b01614ee3565b909650945060408901359150808211156152fa57600080fd5b5061530789828a01614ee3565b979a9699509497509295939492505050565b6000806000806000858703608081121561533257600080fd5b863567ffffffffffffffff8082111561534a57600080fd5b6153568a838b01614ee3565b9098509650602089013591508082111561536f57600080fd5b5061537c89828a01614ee3565b9095509350506040603f198201121561539457600080fd5b506040860190509295509295909350565b600067ffffffffffffffff8311156153bf576153bf614ff6565b6153d2601f8401601f191660200161500c565b90508281528383830111156153e657600080fd5b828260208301376000602084830101529392505050565b8015158114611cbf57600080fd5b600080600080600080600060e0888a03121561542657600080fd5b873567ffffffffffffffff81111561543d57600080fd5b8801601f81018a1361544e57600080fd5b61545d8a8235602084016153a5565b975050602088013561546e816153fd565b95506040880135945060608801359350608088013561548c816153fd565b925060a088013561549c816153fd565b915060c08801356154ac816153fd565b8091505092959891949750929550565b6000806000606084860312156154d157600080fd5b8335925060208401359150604084013567ffffffffffffffff8111156154f657600080fd5b61550286828701615103565b9150509250925092565b6000806000806080858703121561552257600080fd5b843561552d81614f98565b93506020850135925060408501359150606085013567ffffffffffffffff8111156151ab57600080fd5b60006080828403121561556957600080fd5b50919050565b6000806000806060858703121561558557600080fd5b843567ffffffffffffffff81111561559c57600080fd5b6155a887828801614ee3565b90989097506020870135966040013595509350505050565b600080604083850312156155d357600080fd5b82356155de81614f98565b91506020830135615274816153fd565b6000806000806080858703121561560457600080fd5b843561560f81614f98565b9350602085013561561f81614f98565b925060408501359150606085013567ffffffffffffffff81111561564257600080fd5b8501601f8101871361565357600080fd5b6151b7878235602084016153a5565b600181811c9082168061567657607f821691505b60208210810361556957634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115610c7657610c76615696565b80820180821115610c7657610c76615696565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6020815260006126f86020830184866156d2565b60006001820161572157615721615696565b5060010190565b818382377f28627974657333322c62797465733332290000000000000000000000000000009101908152601101919050565b60608152600061576e60608301888a6156d2565b82810360208401526157818187896156d2565b905082810360408401526157968185876156d2565b9998505050505050505050565b81356157ae816153fd565b815460ff19811691151560ff16918217835560208401356157ce816153fd565b61ffff199190911690911790151560081b61ff001617905550565b6000602082840312156157fb57600080fd5b81356126fb816153fd565b60608152600061581a6060830187896156d2565b828103602084015261582d8186886156d2565b91505082151560408301529695505050505050565b6040815260006158566040830186886156d2565b8281036020840152614d8f8185876156d2565b60e08152600061587c60e083018a614e8b565b971515602083015250604081019590955260608501939093529015156080840152151560a0830152151560c090910152919050565b8135815560018101602083013567ffffffffffffffff81168082146158d557600080fd5b82549150604085013561ffff811681146158ee57600080fd5b606086013563ffffffff8116811461590557600080fd5b6dffffffff000000000000000000008160501b166dffffffff000000000000000000001984166dffffffffffffffffffffffffffff1986161769ffff00000000000000008460401b161717855550505050505050565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561598357600080fd5b5051919050565b6000815161599c818560208601614e67565b9290920192915050565b600080845481600182811c9150808316806159c257607f831692505b602080841082036159e157634e487b7160e01b86526022600452602486fd5b8180156159f55760018114615a0a57615a37565b60ff1986168952841515850289019650615a37565b60008b81526020902060005b86811015615a2f5781548b820152908501908301615a16565b505084890196505b505050505050614940818561598a565b60008251615a59818460208701614e67565b9190910192915050565b8082028115828204841417610c7657610c76615696565b634e487b7160e01b600052601260045260246000fd5b600082615a9f57615a9f615a7a565b500490565b600082615ab357615ab3615a7a565b500690565b600060208284031215615aca57600080fd5b81516126fb816153fd565b60006001600160a01b03808716835280861660208401525083604083015260806060830152615b076080830184614e8b565b9695505050505050565b600060208284031215615b2357600080fd5b81516126fb81614e3456fe0001020903110a19042112290b311a3905412245134d2a550c5d32651b6d3a7506264262237d468514804e8d2b95569d0d495ea533a966b11c886eb93bc176c9071727374353637324837e9b47af86c7155181ad4fd18ed32c9096db57d59ee30e2e4a6a5f92a6be3498aae067ddb2eb1d5989b56fd7baf33ca0c2ee77e5caf7ff0810182028303840444c545c646c7425617c847f8c949c48a4a8b087b8c0c816365272829aaec650acd0d28fdad4e22d6991bd97dfdcea58b4d6f29fede4f6fe0f1f2f3f4b5b6b607b8b93a3a7b7bf357199c5abcfd9e168bcdee9b3f1ecf5fd1e3e5a7a8aa2b670c4ced8bbe8f0f4fc3d79a1c3cde7effb78cce6facbf9f8a264697066735822122021d5bedec77ad5fba5f69d4e04932596e1aef99f19c577f158f13a23eb85fc2f64736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000000000000000000001e61000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002800000000000000000000000000000000000000000000000000000000000000300000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e699099fe0eebf5e446e3c998ec9bb19951541aee00bb90ea201ae456421a2ded8680500000000000000000000000000000000000000000000000000000000000001fd000000000000000000000000000000000000000000000000000000000000034000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000000244d6f6e757665727365202d20457069736f646520493a2041726368206f66205065616365000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003414f5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000042697066733a2f2f6261666b726569666e3634356d65356434706c346d75666e6d7461696f6171346f6867786633797070677464767a6d366d756c61706170797771340000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000043697066733a2f2f62616679626569667132347a3766796a616d337a6f75326d6d7571796b7467336461723778636c78776175783367737677756c35693763686279692f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001a496e74726f64756374696f6e3a20546865204269672042616e670000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000379fe33635532c4f8d1ae50391f7ddf5b32b4c360000000000000000000000001bb807b0ad0d43893f6902efdd4b568a15368122000000000000000000000000a314eb02ba53a415d09a2098d9a0d1d0c455a81a00000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000ae20000000000000000000000000000000000000000000000000000000000000e170000000000000000000000000000000000000000000000000000000000000e17
-----Decoded View---------------
Arg [0] : maxSupply_ (uint256): 7777
Arg [1] : name_ (string): Monuverse - Episode I: Arch of Peace
Arg [2] : symbol_ (string): AOP
Arg [3] : archVeilURI_ (string): ipfs://bafkreifn645me5d4pl4mufnmtaioaq4ohgxf3yppgtdvzm6mulapapywq4
Arg [4] : archBaseURI_ (string): ipfs://bafybeifq24z7fyjam3zou2mmuqyktg3dar7xclxwaux3gsvwul5i7chbyi/
Arg [5] : initialChapter_ (string): Introduction: The Big Bang
Arg [6] : vrfCoordinator_ (address): 0x271682DEB8C4E0901D1a1550aD2e64D568E69909
Arg [7] : vrfGasLane_ (bytes32): 0x9fe0eebf5e446e3c998ec9bb19951541aee00bb90ea201ae456421a2ded86805
Arg [8] : vrfSubscriptionId_ (uint64): 509
Arg [9] : payee_ (address[]): 0x379FE33635532c4f8D1AE50391f7dDF5b32B4C36,0x1Bb807B0AD0d43893f6902Efdd4b568A15368122,0xa314Eb02bA53A415D09a2098D9A0D1D0C455a81a
Arg [10] : shares_ (uint256[]): 2786,3607,3607
-----Encoded View---------------
34 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000001e61
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000160
Arg [2] : 00000000000000000000000000000000000000000000000000000000000001c0
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000200
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000280
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000300
Arg [6] : 000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e69909
Arg [7] : 9fe0eebf5e446e3c998ec9bb19951541aee00bb90ea201ae456421a2ded86805
Arg [8] : 00000000000000000000000000000000000000000000000000000000000001fd
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000340
Arg [10] : 00000000000000000000000000000000000000000000000000000000000003c0
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000024
Arg [12] : 4d6f6e757665727365202d20457069736f646520493a2041726368206f662050
Arg [13] : 6561636500000000000000000000000000000000000000000000000000000000
Arg [14] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [15] : 414f500000000000000000000000000000000000000000000000000000000000
Arg [16] : 0000000000000000000000000000000000000000000000000000000000000042
Arg [17] : 697066733a2f2f6261666b726569666e3634356d65356434706c346d75666e6d
Arg [18] : 7461696f6171346f6867786633797070677464767a6d366d756c617061707977
Arg [19] : 7134000000000000000000000000000000000000000000000000000000000000
Arg [20] : 0000000000000000000000000000000000000000000000000000000000000043
Arg [21] : 697066733a2f2f62616679626569667132347a3766796a616d337a6f75326d6d
Arg [22] : 7571796b7467336461723778636c78776175783367737677756c356937636862
Arg [23] : 79692f0000000000000000000000000000000000000000000000000000000000
Arg [24] : 000000000000000000000000000000000000000000000000000000000000001a
Arg [25] : 496e74726f64756374696f6e3a20546865204269672042616e67000000000000
Arg [26] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [27] : 000000000000000000000000379fe33635532c4f8d1ae50391f7ddf5b32b4c36
Arg [28] : 0000000000000000000000001bb807b0ad0d43893f6902efdd4b568a15368122
Arg [29] : 000000000000000000000000a314eb02ba53a415d09a2098d9a0d1d0c455a81a
Arg [30] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [31] : 0000000000000000000000000000000000000000000000000000000000000ae2
Arg [32] : 0000000000000000000000000000000000000000000000000000000000000e17
Arg [33] : 0000000000000000000000000000000000000000000000000000000000000e17
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.