Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
BlueprintV9
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: Unlicense pragma solidity 0.8.4; import "./abstract/HasSecondarySaleFees.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract BlueprintV9 is ERC721Upgradeable, HasSecondarySaleFees, AccessControlEnumerableUpgradeable { using StringsUpgradeable for uint256; uint32 public defaultPlatformPrimaryFeePercentage; uint32 public defaultBlueprintSecondarySalePercentage; uint32 public defaultPlatformSecondarySalePercentage; uint64 public latestErc721TokenIndex; uint256 public blueprintIndex; address public asyncSaleFeesRecipient; address public platform; address public minterAddress; mapping(uint256 => uint256) tokenToBlueprintID; mapping(address => uint256) failedTransferCredits; mapping(uint256 => Blueprints) public blueprints; bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); enum SaleState { not_prepared, not_started, started, paused } struct Blueprints { bool tokenUriLocked; uint32 mintAmountArtist; uint32 mintAmountPlatform; uint64 capacity; uint64 erc721TokenIndex; uint64 maxPurchaseAmount; uint128 price; address artist; address ERC20Token; string baseTokenUri; bytes32 merkleroot; SaleState saleState; uint32[] primaryFeeBPS; uint32[] secondaryFeeBPS; address[] primaryFeeRecipients; address[] secondaryFeeRecipients; mapping(address => bool) claimedWhitelistedPieces; } event BlueprintSeed(uint256 blueprintID, string randomSeed); event BlueprintMinted( uint256 blueprintID, address artist, address purchaser, uint128 tokenId, uint64 newCapacity, bytes32 seedPrefix ); event BlueprintPrepared( uint256 blueprintID, address artist, uint64 capacity, string blueprintMetaData, string baseTokenUri ); event BlueprintSettingsUpdated( uint256 blueprintID, uint128 price, uint32 newMintAmountArtist, uint32 newMintAmountPlatform, uint32 newSaleState, uint64 newMaxPurchaseAmount, bytes32 newMerkleRoot ); event SaleStarted(uint256 blueprintID); event SalePaused(uint256 blueprintID); event SaleUnpaused(uint256 blueprintID); event BlueprintTokenUriUpdated(uint256 blueprintID, string newBaseTokenUri); modifier isBlueprintPrepared(uint256 _blueprintID) { require( blueprints[_blueprintID].saleState != SaleState.not_prepared, "blueprint not prepared" ); _; } modifier hasSaleStarted(uint256 _blueprintID) { require(_hasSaleStarted(_blueprintID), "Sale not started"); _; } modifier BuyerWhitelistedOrSaleStarted( uint256 _blueprintID, uint32 _quantity, bytes32[] calldata proof ) { require( _hasSaleStarted(_blueprintID) || (_isBlueprintPreparedAndNotStarted(_blueprintID) && userWhitelisted(_blueprintID, uint256(_quantity), proof)), "not available to purchase" ); _; } modifier isQuantityAvailableForPurchase( uint256 _blueprintID, uint32 _quantity ) { require( blueprints[_blueprintID].capacity >= _quantity, "quantity exceeds capacity" ); _; } /// ///Initialize the implementation /// function initialize( string memory name_, string memory symbol_, address minter ) public initializer { // Intialize parent contracts ERC721Upgradeable.__ERC721_init(name_, symbol_); HasSecondarySaleFees._initialize(); AccessControlUpgradeable.__AccessControl_init(); _setupRole(DEFAULT_ADMIN_ROLE, msg.sender); _setupRole(MINTER_ROLE, minter); platform = msg.sender; minterAddress = minter; defaultPlatformPrimaryFeePercentage = 2000; // 20% defaultBlueprintSecondarySalePercentage = 750; // 7.5% defaultPlatformSecondarySalePercentage = 250; // 2.5% asyncSaleFeesRecipient = msg.sender; } function _hasSaleStarted(uint256 _blueprintID) internal view returns (bool) { return blueprints[_blueprintID].saleState == SaleState.started; } function _isBlueprintPreparedAndNotStarted(uint256 _blueprintID) internal view returns (bool) { return blueprints[_blueprintID].saleState == SaleState.not_started; } function _getFeePortion(uint256 _totalSaleAmount, uint256 _percentage) internal pure returns (uint256) { return (_totalSaleAmount * (_percentage)) / 10000; } function userWhitelisted( uint256 _blueprintID, uint256 _quantity, bytes32[] calldata proof ) internal view returns (bool) { require(proof.length != 0, "no proof provided"); require( !blueprints[_blueprintID].claimedWhitelistedPieces[msg.sender], "already claimed" ); bytes32 _merkleroot = blueprints[_blueprintID].merkleroot; return _verify(_leaf(msg.sender, _quantity), _merkleroot, proof); } function feesApplicable( address[] memory _feeRecipients, uint32[] memory _feeBPS ) internal pure returns (bool) { if (_feeRecipients.length != 0 || _feeBPS.length != 0) { require( _feeRecipients.length == _feeBPS.length, "mismatched recipients & Bps" ); uint32 totalPercent; for (uint256 i = 0; i < _feeBPS.length; i++) { totalPercent = totalPercent + _feeBPS[i]; } require(totalPercent <= 10000, "Fee Bps exceed maximum"); return true; } return false; } function setBlueprintPrepared( uint256 _blueprintID, string memory _blueprintMetaData ) internal { blueprints[_blueprintID].saleState = SaleState.not_started; //assign the erc721 token index to the blueprint blueprints[_blueprintID].erc721TokenIndex = latestErc721TokenIndex; uint64 _capacity = blueprints[_blueprintID].capacity; latestErc721TokenIndex += _capacity; blueprintIndex++; emit BlueprintPrepared( _blueprintID, blueprints[_blueprintID].artist, _capacity, _blueprintMetaData, blueprints[_blueprintID].baseTokenUri ); } function setErc20Token(uint256 _blueprintID, address _erc20Token) internal { if (_erc20Token != address(0)) { blueprints[_blueprintID].ERC20Token = _erc20Token; } } function _setupBlueprint( uint256 _blueprintID, address _erc20Token, string memory _baseTokenUri, bytes32 _merkleroot, uint32 _mintAmountArtist, uint32 _mintAmountPlatform, uint32 _maxPurchaseAmount ) internal { setErc20Token(_blueprintID, _erc20Token); blueprints[_blueprintID].baseTokenUri = _baseTokenUri; if (_merkleroot != 0) { blueprints[_blueprintID].merkleroot = _merkleroot; } blueprints[_blueprintID].mintAmountArtist = _mintAmountArtist; blueprints[_blueprintID].mintAmountPlatform = _mintAmountPlatform; if (_maxPurchaseAmount != 0) { blueprints[_blueprintID].maxPurchaseAmount = _maxPurchaseAmount; } } function prepareBlueprint( address _artist, uint64 _capacity, uint128 _price, address _erc20Token, string memory _blueprintMetaData, string memory _baseTokenUri, bytes32 _merkleroot, uint32 _mintAmountArtist, uint32 _mintAmountPlatform, uint32 _maxPurchaseAmount ) external onlyRole(MINTER_ROLE) { uint256 _blueprintID = blueprintIndex; blueprints[_blueprintID].artist = _artist; blueprints[_blueprintID].capacity = _capacity; blueprints[_blueprintID].price = _price; _setupBlueprint( _blueprintID, _erc20Token, _baseTokenUri, _merkleroot, _mintAmountArtist, _mintAmountPlatform, _maxPurchaseAmount ); setBlueprintPrepared(_blueprintID, _blueprintMetaData); } function resetClaimedStatus ( uint256 _blueprintID, address _minter ) external onlyRole(MINTER_ROLE) { blueprints[_blueprintID].claimedWhitelistedPieces[_minter] = false; } function updateBlueprintCapacity ( uint256 _blueprintID, uint64 _newCapacity, uint64 _newLatestErc721TokenIndex ) external onlyRole(MINTER_ROLE) { require(blueprints[_blueprintID].capacity > _newCapacity, "Not enough capacity to reduce"); blueprints[_blueprintID].capacity = _newCapacity; latestErc721TokenIndex = _newLatestErc721TokenIndex; } function updateBlueprintSettings ( uint256 _blueprintID, uint128 _price, uint32 _mintAmountArtist, uint32 _mintAmountPlatform, uint32 _newSaleState, uint64 _newMaxPurchaseAmount, bytes32 _merkleroot ) external onlyRole(MINTER_ROLE) { blueprints[_blueprintID].price = _price; blueprints[_blueprintID].mintAmountArtist = _mintAmountArtist; blueprints[_blueprintID].mintAmountPlatform = _mintAmountPlatform; blueprints[_blueprintID].saleState = SaleState (_newSaleState); blueprints[_blueprintID].merkleroot = _merkleroot; blueprints[_blueprintID].maxPurchaseAmount = _newMaxPurchaseAmount; emit BlueprintSettingsUpdated(_blueprintID, _price, _mintAmountArtist, _mintAmountPlatform, _newSaleState, _newMaxPurchaseAmount, _merkleroot); } function setFeeRecipients( uint256 _blueprintID, address[] memory _primaryFeeRecipients, uint32[] memory _primaryFeeBPS, address[] memory _secondaryFeeRecipients, uint32[] memory _secondaryFeeBPS ) external onlyRole(MINTER_ROLE) { require( blueprints[_blueprintID].saleState == SaleState.not_started, "sale started or not prepared" ); if (feesApplicable(_primaryFeeRecipients, _primaryFeeBPS)) { blueprints[_blueprintID] .primaryFeeRecipients = _primaryFeeRecipients; blueprints[_blueprintID].primaryFeeBPS = _primaryFeeBPS; } if (feesApplicable(_secondaryFeeRecipients, _secondaryFeeBPS)) { blueprints[_blueprintID] .secondaryFeeRecipients = _secondaryFeeRecipients; blueprints[_blueprintID].secondaryFeeBPS = _secondaryFeeBPS; } } function beginSale(uint256 blueprintID) external onlyRole(MINTER_ROLE) { require( blueprints[blueprintID].saleState == SaleState.not_started, "sale started or not prepared" ); blueprints[blueprintID].saleState = SaleState.started; emit SaleStarted(blueprintID); } function pauseSale(uint256 blueprintID) external onlyRole(MINTER_ROLE) hasSaleStarted(blueprintID) { blueprints[blueprintID].saleState = SaleState.paused; emit SalePaused(blueprintID); } function unpauseSale(uint256 blueprintID) external onlyRole(MINTER_ROLE) { require( blueprints[blueprintID].saleState == SaleState.paused, "Sale not paused" ); blueprints[blueprintID].saleState = SaleState.started; emit SaleUnpaused(blueprintID); } function purchaseBlueprintsTo( uint256 blueprintID, uint32 quantity, uint256 tokenAmount, bytes32[] calldata proof, address nftRecipient ) external payable BuyerWhitelistedOrSaleStarted(blueprintID, quantity, proof) isQuantityAvailableForPurchase(blueprintID, quantity) { require( blueprints[blueprintID].maxPurchaseAmount == 0 || quantity <= blueprints[blueprintID].maxPurchaseAmount, "user cannot buy more than maxPurchaseAmount in single tx" ); require (tx.origin == msg.sender, "purchase cannot be called from another contract"); address _artist = blueprints[blueprintID].artist; _confirmPaymentAmountAndSettleSale( blueprintID, quantity, tokenAmount, _artist ); if (blueprints[blueprintID].saleState == SaleState.not_started) { blueprints[blueprintID].claimedWhitelistedPieces[msg.sender] = true; } _mintQuantity(blueprintID, quantity, nftRecipient); } function purchaseBlueprints( uint256 blueprintID, uint32 quantity, uint256 tokenAmount, bytes32[] calldata proof ) external payable BuyerWhitelistedOrSaleStarted(blueprintID, quantity, proof) isQuantityAvailableForPurchase(blueprintID, quantity) { require( blueprints[blueprintID].maxPurchaseAmount == 0 || quantity <= blueprints[blueprintID].maxPurchaseAmount, "user cannot buy more than maxPurchaseAmount in single tx" ); require (tx.origin == msg.sender, "purchase cannot be called from another contract"); address _artist = blueprints[blueprintID].artist; _confirmPaymentAmountAndSettleSale( blueprintID, quantity, tokenAmount, _artist ); if (blueprints[blueprintID].saleState == SaleState.not_started) { blueprints[blueprintID].claimedWhitelistedPieces[msg.sender] = true; } _mintQuantity(blueprintID, quantity, msg.sender); } function preSaleMint(uint256 blueprintID, uint32 quantity) external { require( _isBlueprintPreparedAndNotStarted(blueprintID), "Must be prepared and not started" ); require( minterAddress == msg.sender || blueprints[blueprintID].artist == msg.sender, "user cannot mint presale" ); if (minterAddress == msg.sender) { require( quantity <= blueprints[blueprintID].mintAmountPlatform, "cannot mint quantity" ); blueprints[blueprintID].mintAmountPlatform -= quantity; } else if (blueprints[blueprintID].artist == msg.sender) { require( quantity <= blueprints[blueprintID].mintAmountArtist, "cannot mint quantity" ); blueprints[blueprintID].mintAmountArtist -= quantity; } _mintQuantity(blueprintID, quantity, msg.sender); } /* * Iterate and mint each blueprint for user */ function _mintQuantity(uint256 _blueprintID, uint32 _quantity, address _nftRecipient) private { uint128 newTokenId = blueprints[_blueprintID].erc721TokenIndex; uint64 newCap = blueprints[_blueprintID].capacity; for (uint16 i = 0; i < _quantity; i++) { require(newCap > 0, "blueprint out of capacity"); _mint(_nftRecipient, newTokenId + i); tokenToBlueprintID[newTokenId + i] = _blueprintID; bytes32 prefixHash = keccak256( abi.encodePacked( block.number, block.timestamp, block.coinbase, newCap ) ); emit BlueprintMinted( _blueprintID, blueprints[_blueprintID].artist, _nftRecipient, newTokenId + i, newCap, prefixHash ); --newCap; } blueprints[_blueprintID].erc721TokenIndex += _quantity; blueprints[_blueprintID].capacity = newCap; } function _confirmPaymentAmountAndSettleSale( uint256 _blueprintID, uint32 _quantity, uint256 _tokenAmount, address _artist ) internal { address _erc20Token = blueprints[_blueprintID].ERC20Token; uint128 _price = blueprints[_blueprintID].price; if (_erc20Token == address(0)) { require(_tokenAmount == 0, "cannot specify token amount"); require( msg.value == _quantity * _price, "Purchase amount must match price" ); _payFeesAndArtist(_blueprintID, _erc20Token, msg.value, _artist); } else { require(msg.value == 0, "cannot specify eth amount"); require( _tokenAmount == _quantity * _price, "Purchase amount must match price" ); IERC20(_erc20Token).transferFrom( msg.sender, address(this), _tokenAmount ); _payFeesAndArtist(_blueprintID, _erc20Token, _tokenAmount, _artist); } } //////////////////////////////////// ////// MERKLEROOT FUNCTIONS //////// //////////////////////////////////// /** * Create a merkle tree with address: quantity pairs as the leaves. * The msg.sender will be verified if it has a corresponding quantity value in the merkletree */ function _leaf(address account, uint256 quantity) internal pure returns (bytes32) { return keccak256(abi.encodePacked(account, quantity)); } function _verify( bytes32 leaf, bytes32 merkleroot, bytes32[] memory proof ) internal pure returns (bool) { return MerkleProof.verify(proof, merkleroot, leaf); } //////////////////////////// /// ONLY ADMIN functions /// //////////////////////////// function updateBlueprintTokenUri( uint256 blueprintID, string memory newBaseTokenUri ) external onlyRole(MINTER_ROLE) isBlueprintPrepared(blueprintID) { require( !blueprints[blueprintID].tokenUriLocked, "blueprint URI locked" ); blueprints[blueprintID].baseTokenUri = newBaseTokenUri; emit BlueprintTokenUriUpdated(blueprintID, newBaseTokenUri); } function lockBlueprintTokenUri(uint256 blueprintID) external onlyRole(DEFAULT_ADMIN_ROLE) isBlueprintPrepared(blueprintID) { require( !blueprints[blueprintID].tokenUriLocked, "blueprint URI locked" ); blueprints[blueprintID].tokenUriLocked = true; } function _baseURIForBlueprint(uint256 tokenId) internal view returns (string memory) { return blueprints[tokenToBlueprintID[tokenId]].baseTokenUri; } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require( _exists(tokenId), "ERC721Metadata: URI query for nonexistent token" ); string memory baseURI = _baseURIForBlueprint(tokenId); return bytes(baseURI).length > 0 ? string( abi.encodePacked( baseURI, "/", tokenId.toString(), "/", "token.json" ) ) : ""; } function revealBlueprintSeed(uint256 blueprintID, string memory randomSeed) external onlyRole(MINTER_ROLE) isBlueprintPrepared(blueprintID) { emit BlueprintSeed(blueprintID, randomSeed); } function setAsyncFeeRecipient(address _asyncSaleFeesRecipient) external onlyRole(DEFAULT_ADMIN_ROLE) { asyncSaleFeesRecipient = _asyncSaleFeesRecipient; } function changeDefaultPlatformPrimaryFeePercentage(uint32 _basisPoints) external onlyRole(DEFAULT_ADMIN_ROLE) { require(_basisPoints <= 10000); defaultPlatformPrimaryFeePercentage = _basisPoints; } function changeDefaultBlueprintSecondarySalePercentage(uint32 _basisPoints) external onlyRole(DEFAULT_ADMIN_ROLE) { require(_basisPoints + defaultPlatformSecondarySalePercentage <= 10000); defaultBlueprintSecondarySalePercentage = _basisPoints; } function changeDefaultPlatformSecondarySalePercentage(uint32 _basisPoints) external onlyRole(DEFAULT_ADMIN_ROLE) { require( _basisPoints + defaultBlueprintSecondarySalePercentage <= 10000 ); defaultPlatformSecondarySalePercentage = _basisPoints; } function updatePlatformAddress(address _platform) external onlyRole(DEFAULT_ADMIN_ROLE) { grantRole(DEFAULT_ADMIN_ROLE, _platform); revokeRole(DEFAULT_ADMIN_ROLE, platform); platform = _platform; } // Allows the platform to change the minter address function updateMinterAddress(address newMinterAddress) external onlyRole(DEFAULT_ADMIN_ROLE) { grantRole(MINTER_ROLE, newMinterAddress); revokeRole(MINTER_ROLE, minterAddress); minterAddress = newMinterAddress; } //////////////////////////////////// /// Secondary Fees implementation // //////////////////////////////////// function _payFeesAndArtist( uint256 _blueprintID, address _erc20Token, uint256 _amount, address _artist ) internal { address[] memory _primaryFeeRecipients = getPrimaryFeeRecipients( _blueprintID ); uint32[] memory _primaryFeeBPS = getPrimaryFeeBps(_blueprintID); uint256 feesPaid; for (uint256 i = 0; i < _primaryFeeRecipients.length; i++) { uint256 fee = _getFeePortion(_amount, _primaryFeeBPS[i]); feesPaid = feesPaid + fee; _payout(_primaryFeeRecipients[i], _erc20Token, fee); } if (_amount - feesPaid > 0) { _payout(_artist, _erc20Token, (_amount - feesPaid)); } } function _payout( address _recipient, address _erc20Token, uint256 _amount ) internal { if (_erc20Token != address(0)) { IERC20(_erc20Token).transfer(_recipient, _amount); } else { // attempt to send the funds to the recipient (bool success, ) = payable(_recipient).call{ value: _amount, gas: 20000 }(""); // if it failed, update their credit balance so they can pull it later if (!success) { failedTransferCredits[_recipient] = failedTransferCredits[_recipient] + _amount; } } } function withdrawAllFailedCredits(address payable recipient) external { uint256 amount = failedTransferCredits[msg.sender]; require(amount != 0, "no credits to withdraw"); failedTransferCredits[msg.sender] = 0; (bool successfulWithdraw, ) = recipient.call{value: amount, gas: 20000}( "" ); require(successfulWithdraw, "withdraw failed"); } function getPrimaryFeeRecipients(uint256 id) public view returns (address[] memory) { if (blueprints[id].primaryFeeRecipients.length == 0) { address[] memory primaryFeeRecipients = new address[](1); primaryFeeRecipients[0] = (asyncSaleFeesRecipient); return primaryFeeRecipients; } else { return blueprints[id].primaryFeeRecipients; } } function getPrimaryFeeBps(uint256 id) public view returns (uint32[] memory) { if (blueprints[id].primaryFeeBPS.length == 0) { uint32[] memory primaryFeeBPS = new uint32[](1); primaryFeeBPS[0] = defaultPlatformPrimaryFeePercentage; return primaryFeeBPS; } else { return blueprints[id].primaryFeeBPS; } } function getFeeRecipients(uint256 id) public view override returns (address[] memory) { if (blueprints[id].secondaryFeeRecipients.length == 0) { address[] memory feeRecipients = new address[](2); feeRecipients[0] = (asyncSaleFeesRecipient); feeRecipients[1] = (blueprints[id].artist); return feeRecipients; } else { return blueprints[id].secondaryFeeRecipients; } } function getFeeBps(uint256 id) public view override returns (uint32[] memory) { if (blueprints[id].secondaryFeeBPS.length == 0) { uint32[] memory feeBPS = new uint32[](2); feeBPS[0] = defaultPlatformSecondarySalePercentage; feeBPS[1] = defaultBlueprintSecondarySalePercentage; return feeBPS; } else { return blueprints[id].secondaryFeeBPS; } } //////////////////////////////////// /// Required function overide ////// //////////////////////////////////// function isApprovedForAll(address account, address operator) public view override returns (bool) { return super.isApprovedForAll(account, operator) || hasRole(DEFAULT_ADMIN_ROLE, operator); } function supportsInterface(bytes4 interfaceId) public view virtual override( ERC721Upgradeable, ERC165StorageUpgradeable, AccessControlEnumerableUpgradeable ) returns (bool) { return ERC721Upgradeable.supportsInterface(interfaceId) || ERC165StorageUpgradeable.supportsInterface(interfaceId) || AccessControlEnumerableUpgradeable.supportsInterface(interfaceId); } }
//SPDX-License-Identifier: MIT pragma solidity 0.8.4; import "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165StorageUpgradeable.sol"; abstract contract HasSecondarySaleFees is ERC165StorageUpgradeable { event SecondarySaleFees( uint256 tokenId, address[] recipients, uint256[] bps ); /* * bytes4(keccak256('getFeeBps(uint256)')) == 0x0ebd4c7f * bytes4(keccak256('getFeeRecipients(uint256)')) == 0xb9c4d9fb * * => 0x0ebd4c7f ^ 0xb9c4d9fb == 0xb7799584 */ bytes4 private constant _INTERFACE_ID_FEES = 0xb7799584; function _initialize() public initializer { _registerInterface(_INTERFACE_ID_FEES); } function getFeeRecipients(uint256 id) public view virtual returns (address[] memory); function getFeeBps(uint256 id) public view virtual returns (uint32[] memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721Upgradeable.sol"; import "./IERC721ReceiverUpgradeable.sol"; import "./extensions/IERC721MetadataUpgradeable.sol"; import "../../utils/AddressUpgradeable.sol"; import "../../utils/ContextUpgradeable.sol"; import "../../utils/StringsUpgradeable.sol"; import "../../utils/introspection/ERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable { using AddressUpgradeable for address; using StringsUpgradeable for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ function __ERC721_init(string memory name_, string memory symbol_) internal initializer { __Context_init_unchained(); __ERC165_init_unchained(); __ERC721_init_unchained(name_, symbol_); } function __ERC721_init_unchained(string memory name_, string memory symbol_) internal initializer { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) { return interfaceId == type(IERC721Upgradeable).interfaceId || interfaceId == type(IERC721MetadataUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721Upgradeable.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721Upgradeable.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721Upgradeable.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721Upgradeable.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721Upgradeable.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721ReceiverUpgradeable.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} uint256[44] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (access/AccessControlEnumerable.sol) pragma solidity ^0.8.0; import "./IAccessControlEnumerableUpgradeable.sol"; import "./AccessControlUpgradeable.sol"; import "../utils/structs/EnumerableSetUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Extension of {AccessControl} that allows enumerating the members of each role. */ abstract contract AccessControlEnumerableUpgradeable is Initializable, IAccessControlEnumerableUpgradeable, AccessControlUpgradeable { function __AccessControlEnumerable_init() internal initializer { __Context_init_unchained(); __ERC165_init_unchained(); __AccessControl_init_unchained(); __AccessControlEnumerable_init_unchained(); } function __AccessControlEnumerable_init_unchained() internal initializer { } using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet; mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private _roleMembers; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControlEnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) public view override returns (address) { return _roleMembers[role].at(index); } /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) public view override returns (uint256) { return _roleMembers[role].length(); } /** * @dev Overload {_grantRole} to track enumerable memberships */ function _grantRole(bytes32 role, address account) internal virtual override { super._grantRole(role, account); _roleMembers[role].add(account); } /** * @dev Overload {_revokeRole} to track enumerable memberships */ function _revokeRole(bytes32 role, address account) internal virtual override { super._revokeRole(role, account); _roleMembers[role].remove(account); } uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @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 `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, 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 `sender` to `recipient` 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 sender, address recipient, uint256 amount ) external returns (bool); /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Trees proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merklee tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { bytes32 proofElement = proof[i]; if (computedHash <= proofElement) { // Hash(current computed hash + current element of the proof) computedHash = keccak256(abi.encodePacked(computedHash, proofElement)); } else { // Hash(current element of the proof + current computed hash) computedHash = keccak256(abi.encodePacked(proofElement, computedHash)); } } return computedHash; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/introspection/ERC165Storage.sol) pragma solidity ^0.8.0; import "./ERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Storage based implementation of the {IERC165} interface. * * Contracts may inherit from this and call {_registerInterface} to declare * their support of an interface. */ abstract contract ERC165StorageUpgradeable is Initializable, ERC165Upgradeable { function __ERC165Storage_init() internal initializer { __ERC165_init_unchained(); __ERC165Storage_init_unchained(); } function __ERC165Storage_init_unchained() internal initializer { } /** * @dev Mapping of interface ids to whether or not it's supported. */ mapping(bytes4 => bool) private _supportedInterfaces; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return super.supportsInterface(interfaceId) || _supportedInterfaces[interfaceId]; } /** * @dev Registers the contract as an implementer of the interface defined by * `interfaceId`. Support of the actual ERC165 interface is automatic and * registering its interface id is not required. * * See {IERC165-supportsInterface}. * * Requirements: * * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`). */ function _registerInterface(bytes4 interfaceId) internal virtual { require(interfaceId != 0xffffffff, "ERC165: invalid interface id"); _supportedInterfaces[interfaceId] = true; } uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable { function __ERC165_init() internal initializer { __ERC165_init_unchained(); } function __ERC165_init_unchained() internal initializer { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165Upgradeable).interfaceId; } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (proxy/utils/Initializable.sol) pragma solidity ^0.8.0; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() initializer {} * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { require(_initializing || !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (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 IERC165Upgradeable { /** * @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 v4.4.0 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165Upgradeable.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721Upgradeable is IERC165Upgradeable { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.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 IERC721ReceiverUpgradeable { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721Upgradeable.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721MetadataUpgradeable is IERC721Upgradeable { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/Context.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @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 ContextUpgradeable is Initializable { function __Context_init() internal initializer { __Context_init_unchained(); } function __Context_init_unchained() internal initializer { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library StringsUpgradeable { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (access/IAccessControlEnumerable.sol) pragma solidity ^0.8.0; import "./IAccessControlUpgradeable.sol"; /** * @dev External interface of AccessControlEnumerable declared to support ERC165 detection. */ interface IAccessControlEnumerableUpgradeable is IAccessControlUpgradeable { /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) external view returns (address); /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControlUpgradeable.sol"; import "../utils/ContextUpgradeable.sol"; import "../utils/StringsUpgradeable.sol"; import "../utils/introspection/ERC165Upgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable { function __AccessControl_init() internal initializer { __Context_init_unchained(); __ERC165_init_unchained(); __AccessControl_init_unchained(); } function __AccessControl_init_unchained() internal initializer { } struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role, _msgSender()); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControlUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", StringsUpgradeable.toHexString(uint160(account), 20), " is missing role ", StringsUpgradeable.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/structs/EnumerableSet.sol) pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. */ library EnumerableSetUpgradeable { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { return _values(set._inner); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; assembly { result := store } return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControlUpgradeable { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"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":"uint256","name":"blueprintID","type":"uint256"},{"indexed":false,"internalType":"address","name":"artist","type":"address"},{"indexed":false,"internalType":"address","name":"purchaser","type":"address"},{"indexed":false,"internalType":"uint128","name":"tokenId","type":"uint128"},{"indexed":false,"internalType":"uint64","name":"newCapacity","type":"uint64"},{"indexed":false,"internalType":"bytes32","name":"seedPrefix","type":"bytes32"}],"name":"BlueprintMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"blueprintID","type":"uint256"},{"indexed":false,"internalType":"address","name":"artist","type":"address"},{"indexed":false,"internalType":"uint64","name":"capacity","type":"uint64"},{"indexed":false,"internalType":"string","name":"blueprintMetaData","type":"string"},{"indexed":false,"internalType":"string","name":"baseTokenUri","type":"string"}],"name":"BlueprintPrepared","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"blueprintID","type":"uint256"},{"indexed":false,"internalType":"string","name":"randomSeed","type":"string"}],"name":"BlueprintSeed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"blueprintID","type":"uint256"},{"indexed":false,"internalType":"uint128","name":"price","type":"uint128"},{"indexed":false,"internalType":"uint32","name":"newMintAmountArtist","type":"uint32"},{"indexed":false,"internalType":"uint32","name":"newMintAmountPlatform","type":"uint32"},{"indexed":false,"internalType":"uint32","name":"newSaleState","type":"uint32"},{"indexed":false,"internalType":"uint64","name":"newMaxPurchaseAmount","type":"uint64"},{"indexed":false,"internalType":"bytes32","name":"newMerkleRoot","type":"bytes32"}],"name":"BlueprintSettingsUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"blueprintID","type":"uint256"},{"indexed":false,"internalType":"string","name":"newBaseTokenUri","type":"string"}],"name":"BlueprintTokenUriUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"blueprintID","type":"uint256"}],"name":"SalePaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"blueprintID","type":"uint256"}],"name":"SaleStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"blueprintID","type":"uint256"}],"name":"SaleUnpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address[]","name":"recipients","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"bps","type":"uint256[]"}],"name":"SecondarySaleFees","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"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"asyncSaleFeesRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","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":"blueprintID","type":"uint256"}],"name":"beginSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"blueprintIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"blueprints","outputs":[{"internalType":"bool","name":"tokenUriLocked","type":"bool"},{"internalType":"uint32","name":"mintAmountArtist","type":"uint32"},{"internalType":"uint32","name":"mintAmountPlatform","type":"uint32"},{"internalType":"uint64","name":"capacity","type":"uint64"},{"internalType":"uint64","name":"erc721TokenIndex","type":"uint64"},{"internalType":"uint64","name":"maxPurchaseAmount","type":"uint64"},{"internalType":"uint128","name":"price","type":"uint128"},{"internalType":"address","name":"artist","type":"address"},{"internalType":"address","name":"ERC20Token","type":"address"},{"internalType":"string","name":"baseTokenUri","type":"string"},{"internalType":"bytes32","name":"merkleroot","type":"bytes32"},{"internalType":"enum BlueprintV9.SaleState","name":"saleState","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_basisPoints","type":"uint32"}],"name":"changeDefaultBlueprintSecondarySalePercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_basisPoints","type":"uint32"}],"name":"changeDefaultPlatformPrimaryFeePercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_basisPoints","type":"uint32"}],"name":"changeDefaultPlatformSecondarySalePercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"defaultBlueprintSecondarySalePercentage","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"defaultPlatformPrimaryFeePercentage","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"defaultPlatformSecondarySalePercentage","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"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":"uint256","name":"id","type":"uint256"}],"name":"getFeeBps","outputs":[{"internalType":"uint32[]","name":"","type":"uint32[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getFeeRecipients","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getPrimaryFeeBps","outputs":[{"internalType":"uint32[]","name":"","type":"uint32[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getPrimaryFeeRecipients","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"address","name":"minter","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestErc721TokenIndex","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"blueprintID","type":"uint256"}],"name":"lockBlueprintTokenUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"minterAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"blueprintID","type":"uint256"}],"name":"pauseSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"platform","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"blueprintID","type":"uint256"},{"internalType":"uint32","name":"quantity","type":"uint32"}],"name":"preSaleMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_artist","type":"address"},{"internalType":"uint64","name":"_capacity","type":"uint64"},{"internalType":"uint128","name":"_price","type":"uint128"},{"internalType":"address","name":"_erc20Token","type":"address"},{"internalType":"string","name":"_blueprintMetaData","type":"string"},{"internalType":"string","name":"_baseTokenUri","type":"string"},{"internalType":"bytes32","name":"_merkleroot","type":"bytes32"},{"internalType":"uint32","name":"_mintAmountArtist","type":"uint32"},{"internalType":"uint32","name":"_mintAmountPlatform","type":"uint32"},{"internalType":"uint32","name":"_maxPurchaseAmount","type":"uint32"}],"name":"prepareBlueprint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"blueprintID","type":"uint256"},{"internalType":"uint32","name":"quantity","type":"uint32"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"purchaseBlueprints","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"blueprintID","type":"uint256"},{"internalType":"uint32","name":"quantity","type":"uint32"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"},{"internalType":"address","name":"nftRecipient","type":"address"}],"name":"purchaseBlueprintsTo","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_blueprintID","type":"uint256"},{"internalType":"address","name":"_minter","type":"address"}],"name":"resetClaimedStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"blueprintID","type":"uint256"},{"internalType":"string","name":"randomSeed","type":"string"}],"name":"revealBlueprintSeed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_asyncSaleFeesRecipient","type":"address"}],"name":"setAsyncFeeRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_blueprintID","type":"uint256"},{"internalType":"address[]","name":"_primaryFeeRecipients","type":"address[]"},{"internalType":"uint32[]","name":"_primaryFeeBPS","type":"uint32[]"},{"internalType":"address[]","name":"_secondaryFeeRecipients","type":"address[]"},{"internalType":"uint32[]","name":"_secondaryFeeBPS","type":"uint32[]"}],"name":"setFeeRecipients","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"blueprintID","type":"uint256"}],"name":"unpauseSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_blueprintID","type":"uint256"},{"internalType":"uint64","name":"_newCapacity","type":"uint64"},{"internalType":"uint64","name":"_newLatestErc721TokenIndex","type":"uint64"}],"name":"updateBlueprintCapacity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_blueprintID","type":"uint256"},{"internalType":"uint128","name":"_price","type":"uint128"},{"internalType":"uint32","name":"_mintAmountArtist","type":"uint32"},{"internalType":"uint32","name":"_mintAmountPlatform","type":"uint32"},{"internalType":"uint32","name":"_newSaleState","type":"uint32"},{"internalType":"uint64","name":"_newMaxPurchaseAmount","type":"uint64"},{"internalType":"bytes32","name":"_merkleroot","type":"bytes32"}],"name":"updateBlueprintSettings","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"blueprintID","type":"uint256"},{"internalType":"string","name":"newBaseTokenUri","type":"string"}],"name":"updateBlueprintTokenUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newMinterAddress","type":"address"}],"name":"updateMinterAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_platform","type":"address"}],"name":"updatePlatformAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"recipient","type":"address"}],"name":"withdrawAllFailedCredits","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50615bd480620000216000396000f3fe6080604052600436106103815760003560e01c80637b4252c0116101d1578063c2bce59c11610102578063cba991bf116100a0578063deb941481161006f578063deb9414814610abf578063e985e9c514610ae0578063eaf2115d14610b00578063fce212f314610b2657600080fd5b8063cba991bf14610a38578063ced3604314610a5d578063d539139314610a7d578063d547741f14610a9f57600080fd5b8063c90941b1116100dc578063c90941b1146109b8578063c9e63203146109d8578063c9f2bd93146109f8578063ca15c87314610a1857600080fd5b8063c2bce59c14610958578063c87b56dd14610978578063c8950e601461099857600080fd5b806394a9c9c31161016f578063a22cb46511610149578063a22cb465146108d8578063aec970b0146108f8578063b88d4fde14610918578063b9c4d9fb1461093857600080fd5b806394a9c9c31461089b57806395d89b41146108ae578063a217fddf146108c357600080fd5b8063898a90bc116101ab578063898a90bc1461081b5780638f9f193f1461083b5780639010d07c1461085b57806391d148541461087b57600080fd5b80637b4252c0146107dc57806380ae4ebc146107f357806382c32b801461080857600080fd5b80632f2ff15d116102b65780634bde38c81161025457806366c083d31161022357806366c083d31461075c57806368c31e261461077c57806370a082311461079c5780637550f27d146107bc57600080fd5b80634bde38c8146106a35780634d073a5a146106c45780636352211e1461070457806366bf33be1461072457600080fd5b806336568abe1161029057806336568abe1461062357806338e395cf146106435780633a66e4b61461066357806342842e0e1461068357600080fd5b80632f2ff15d146105c25780632fcfb95a146105e257806334d722c91461060257600080fd5b80630a21a2111161032357806322235d69116102fd57806322235d691461051157806323b872dd14610544578063248a9ca3146105645780632b4ab0e3146105a257600080fd5b80630a21a211146104975780630ebd4c7f146104c457806320ceaf8d146104f157600080fd5b806306fdde031161035f57806306fdde03146103fd578063077f224a1461041f578063081812fc1461043f578063095ea7b31461047757600080fd5b8063018a62a61461038657806301a94950146103a857806301ffc9a7146103c8575b600080fd5b34801561039257600080fd5b506103a66103a136600461512b565b610b46565b005b3480156103b457600080fd5b506103a66103c3366004615328565b610bfc565b3480156103d457600080fd5b506103e86103e3366004614fce565b610c62565b60405190151581526020015b60405180910390f35b34801561040957600080fd5b50610412610c91565b6040516103f491906155c2565b34801561042b57600080fd5b506103a661043a366004615006565b610d23565b34801561044b57600080fd5b5061045f61045a366004614f71565b610e23565b6040516001600160a01b0390911681526020016103f4565b34801561048357600080fd5b506103a6610492366004614e4a565b610eb8565b3480156104a357600080fd5b506104b76104b2366004614f71565b610fce565b6040516103f49190615490565b3480156104d057600080fd5b506104e46104df366004614f71565b6110ca565b6040516103f491906154dd565b3480156104fd57600080fd5b506103a661050c3660046152ed565b61122a565b34801561051d57600080fd5b5061012d5461052f9063ffffffff1681565b60405163ffffffff90911681526020016103f4565b34801561055057600080fd5b506103a661055f366004614d61565b61130f565b34801561057057600080fd5b5061059461057f366004614f71565b600090815260c9602052604090206001015490565b6040519081526020016103f4565b3480156105ae57600080fd5b506103a66105bd36600461516f565b611340565b3480156105ce57600080fd5b506103a66105dd366004614f89565b6114d6565b3480156105ee57600080fd5b506103a66105fd366004614d0d565b6114fc565b34801561060e57600080fd5b506101315461045f906001600160a01b031681565b34801561062f57600080fd5b506103a661063e366004614f89565b61156a565b34801561064f57600080fd5b506103a661065e3660046151e6565b6115e8565b34801561066f57600080fd5b506103a661067e366004614f71565b611869565b34801561068f57600080fd5b506103a661069e366004614d61565b611922565b3480156106af57600080fd5b506101305461045f906001600160a01b031681565b3480156106d057600080fd5b5061012d546106ec90600160601b90046001600160401b031681565b6040516001600160401b0390911681526020016103f4565b34801561071057600080fd5b5061045f61071f366004614f71565b61193d565b34801561073057600080fd5b5061074461073f366004614f71565b6119b4565b6040516103f49c9b9a9998979695949392919061551b565b34801561076857600080fd5b506103a6610777366004615328565b611adb565b34801561078857600080fd5b506103a6610797366004614f71565b611b45565b3480156107a857600080fd5b506105946107b7366004614d0d565b611c2a565b3480156107c857600080fd5b506103a66107d7366004614f89565b611cb1565b3480156107e857600080fd5b5061059461012e5481565b3480156107ff57600080fd5b506103a6611cfd565b6103a6610816366004615276565b611d79565b34801561082757600080fd5b506103a6610836366004614e75565b611f98565b34801561084757600080fd5b506103a6610856366004614d0d565b612050565b34801561086757600080fd5b5061045f610876366004614fad565b6120a4565b34801561088757600080fd5b506103e8610896366004614f89565b6120c3565b6103a66108a9366004615211565b6120ee565b3480156108ba57600080fd5b506104126122fe565b3480156108cf57600080fd5b50610594600081565b3480156108e457600080fd5b506103a66108f3366004614e1d565b61230d565b34801561090457600080fd5b506103a6610913366004614d0d565b612318565b34801561092457600080fd5b506103a6610933366004614da1565b612348565b34801561094457600080fd5b506104b7610953366004614f71565b61237a565b34801561096457600080fd5b506103a6610973366004614f71565b6124a3565b34801561098457600080fd5b50610412610993366004614f71565b612579565b3480156109a457600080fd5b506103a66109b336600461512b565b612654565b3480156109c457600080fd5b506103a66109d3366004614d0d565b612771565b3480156109e457600080fd5b506103a66109f336600461507a565b61286f565b348015610a0457600080fd5b506103a6610a13366004614f71565b6129d0565b348015610a2457600080fd5b50610594610a33366004614f71565b612abb565b348015610a4457600080fd5b5061012d5461052f90600160401b900463ffffffff1681565b348015610a6957600080fd5b506104e4610a78366004614f71565b612ad2565b348015610a8957600080fd5b50610594600080516020615b7f83398151915281565b348015610aab57600080fd5b506103a6610aba366004614f89565b612ba2565b348015610acb57600080fd5b5061012f5461045f906001600160a01b031681565b348015610aec57600080fd5b506103e8610afb366004614d29565b612bc8565b348015610b0c57600080fd5b5061012d5461052f90640100000000900463ffffffff1681565b348015610b3257600080fd5b506103a6610b41366004615328565b612c04565b600080516020615b7f833981519152610b5f8133612c43565b82600080828152610134602052604090206006015460ff166003811115610b9657634e487b7160e01b600052602160045260246000fd5b1415610bbd5760405162461bcd60e51b8152600401610bb490615675565b60405180910390fd5b7f703604f30bacc0494165473e817b003a6db41ed8c598a9ff96093768d701f0958484604051610bee929190615883565b60405180910390a150505050565b6000610c088133612c43565b61012d5461271090610c2790600160401b900463ffffffff1684615932565b63ffffffff161115610c3857600080fd5b5061012d805463ffffffff9092166401000000000267ffffffff0000000019909216919091179055565b6000610c6d82612ca7565b80610c7c5750610c7c82612cf7565b80610c8b5750610c8b82612d28565b92915050565b606060658054610ca090615a77565b80601f0160208091040260200160405190810160405280929190818152602001828054610ccc90615a77565b8015610d195780601f10610cee57610100808354040283529160200191610d19565b820191906000526020600020905b815481529060010190602001808311610cfc57829003601f168201915b5050505050905090565b600054610100900460ff1680610d3c575060005460ff16155b610d585760405162461bcd60e51b8152600401610bb490615627565b600054610100900460ff16158015610d7a576000805461ffff19166101011790555b610d848484612d4d565b610d8c611cfd565b610d94612dd4565b610d9f600033612e43565b610db7600080516020615b7f83398151915283612e43565b6101308054336001600160a01b03199182168117909255610131805482166001600160a01b03861617905561012d80546001600160601b03191668fa000002ee000007d017905561012f805490911690911790558015610e1d576000805461ff00191690555b50505050565b6000818152606760205260408120546001600160a01b0316610e9c5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610bb4565b506000908152606960205260409020546001600160a01b031690565b6000610ec38261193d565b9050806001600160a01b0316836001600160a01b03161415610f315760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610bb4565b336001600160a01b0382161480610f4d5750610f4d8133612bc8565b610fbf5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610bb4565b610fc98383612e4d565b505050565b600081815261013460205260409020600901546060906110575760408051600180825281830190925260009160208083019080368337505061012f5482519293506001600160a01b03169183915060009061103957634e487b7160e01b600052603260045260246000fd5b6001600160a01b039092166020928302919091019091015292915050565b60008281526101346020908152604091829020600901805483518184028101840190945280845290918301828280156110b957602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161109b575b50505050509050919050565b919050565b6000818152610134602052604090206008015460609061119c5760408051600280825260608201835260009260208301908036833701905050905061012d60089054906101000a900463ffffffff168160008151811061113a57634e487b7160e01b600052603260045260246000fd5b63ffffffff928316602091820292909201015261012d548251640100000000909104909116908290600190811061118157634e487b7160e01b600052603260045260246000fd5b63ffffffff9092166020928302919091019091015292915050565b60008281526101346020908152604091829020600801805483518184028101840190945280845290918301828280156110b957602002820191906000526020600020906000905b82829054906101000a900463ffffffff1663ffffffff16815260200190600401906020826003010492830192600103820291508084116111e3575094979650505050505050565b600080516020615b7f8339815191526112438133612c43565b600084815261013460205260409020546001600160401b03808516600160481b90920416116112b45760405162461bcd60e51b815260206004820152601d60248201527f4e6f7420656e6f75676820636170616369747920746f207265647563650000006044820152606401610bb4565b506000928352610134602052604090922080546001600160401b03928316600160481b0267ffffffffffffffff60481b1990911617905561012d805491909216600160601b0267ffffffffffffffff60601b19909116179055565b6113193382612ebb565b6113355760405162461bcd60e51b8152600401610bb490615702565b610fc9838383612f92565b600080516020615b7f8339815191526113598133612c43565b600088815261013460205260409020600181018054600160401b600160c01b031916600160401b6001600160801b038b1602179055805468ffffffffffffffff00191661010063ffffffff8981169190910268ffffffff0000000000191691909117600160281b8883160217909155841660038111156113e957634e487b7160e01b600052602160045260246000fd5b600089815261013460205260409020600601805460ff1916600183600381111561142357634e487b7160e01b600052602160045260246000fd5b0217905550600088815261013460209081526040918290206005810185905560010180546001600160401b03871667ffffffffffffffff19909116811790915582518b81526001600160801b038b169281019290925263ffffffff8981168385015288811660608401528716608083015260a082015260c0810184905290517f8b95f2ac31b4018fe162a0e4305e150fcc6ec712116c66adbbdbf6aa21524bc39181900360e00190a15050505050505050565b600082815260c960205260409020600101546114f28133612c43565b610fc98383613132565b60006115088133612c43565b611520600080516020615b7f833981519152836114d6565b6101315461154690600080516020615b7f833981519152906001600160a01b0316612ba2565b5061013180546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03811633146115da5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610bb4565b6115e48282613154565b5050565b6115f182613176565b61163d5760405162461bcd60e51b815260206004820181905260248201527f4d75737420626520707265706172656420616e64206e6f7420737461727465646044820152606401610bb4565b610131546001600160a01b03163314806116715750600082815261013460205260409020600201546001600160a01b031633145b6116bd5760405162461bcd60e51b815260206004820152601860248201527f757365722063616e6e6f74206d696e742070726573616c6500000000000000006044820152606401610bb4565b610131546001600160a01b031633141561178a576000828152610134602052604090205463ffffffff600160281b909104811690821611156117385760405162461bcd60e51b815260206004820152601460248201527363616e6e6f74206d696e74207175616e7469747960601b6044820152606401610bb4565b6000828152610134602052604090208054829190600590611767908490600160281b900463ffffffff166159ec565b92506101000a81548163ffffffff021916908363ffffffff16021790555061185e565b600082815261013460205260409020600201546001600160a01b031633141561185e576000828152610134602052604090205463ffffffff610100909104811690821611156118125760405162461bcd60e51b815260206004820152601460248201527363616e6e6f74206d696e74207175616e7469747960601b6044820152606401610bb4565b600082815261013460205260409020805482919060019061183f908490610100900463ffffffff166159ec565b92506101000a81548163ffffffff021916908363ffffffff1602179055505b6115e48282336131b7565b600080516020615b7f8339815191526118828133612c43565b8161188c8161344e565b6118cb5760405162461bcd60e51b815260206004820152601060248201526f14d85b19481b9bdd081cdd185c9d195960821b6044820152606401610bb4565b60008381526101346020908152604091829020600601805460ff1916600317905590518481527f4616a0782e5635981b28be1cd36934a60655b462c370d8bd8092c969abc990d091015b60405180910390a1505050565b610fc983838360405180602001604052806000815250612348565b6000818152606760205260408120546001600160a01b031680610c8b5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610bb4565b610134602052600090815260409020805460018201546002830154600384015460048501805460ff861696610100870463ffffffff90811697600160281b810490911696600160481b82046001600160401b0390811697600160881b90930481169690821695600160401b9092046001600160801b0316946001600160a01b039384169493909116929190611a4890615a77565b80601f0160208091040260200160405190810160405280929190818152602001828054611a7490615a77565b8015611ac15780601f10611a9657610100808354040283529160200191611ac1565b820191906000526020600020905b815481529060010190602001808311611aa457829003601f168201915b50505050600583015460069093015491929160ff1690508c565b6000611ae78133612c43565b61012d5461271090611b0790640100000000900463ffffffff1684615932565b63ffffffff161115611b1857600080fd5b5061012d805463ffffffff909216600160401b026bffffffff000000000000000019909216919091179055565b600080516020615b7f833981519152611b5e8133612c43565b60036000838152610134602052604090206006015460ff166003811115611b9557634e487b7160e01b600052602160045260246000fd5b14611bd45760405162461bcd60e51b815260206004820152600f60248201526e14d85b19481b9bdd081c185d5cd959608a1b6044820152606401610bb4565b60008281526101346020908152604091829020600601805460ff1916600217905590518381527fdcba7a000ef2740d4daa9c60f3235ec53ea38eb4164b31d5470f76e01e52d7bd91015b60405180910390a15050565b60006001600160a01b038216611c955760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610bb4565b506001600160a01b031660009081526068602052604090205490565b600080516020615b7f833981519152611cca8133612c43565b506000918252610134602090815260408084206001600160a01b039093168452600b90920190529020805460ff19169055565b600054610100900460ff1680611d16575060005460ff16155b611d325760405162461bcd60e51b8152600401610bb490615627565b600054610100900460ff16158015611d54576000805461ffff19166101011790555b611d64632dde656160e21b613457565b8015611d76576000805461ff00191690555b50565b85858484611d868461344e565b80611dae5750611d9584613176565b8015611dae5750611dae848463ffffffff1684846134d6565b611df65760405162461bcd60e51b81526020600482015260196024820152786e6f7420617661696c61626c6520746f20707572636861736560381b6044820152606401610bb4565b60008a815261013460205260409020548a908a9063ffffffff8216600160481b9091046001600160401b03161015611e6c5760405162461bcd60e51b81526020600482015260196024820152787175616e74697479206578636565647320636170616369747960381b6044820152606401610bb4565b60008c815261013460205260409020600101546001600160401b03161580611eb5575060008c815261013460205260409020600101546001600160401b031663ffffffff8c1611155b611ed15760405162461bcd60e51b8152600401610bb4906156a5565b323314611ef05760405162461bcd60e51b8152600401610bb490615753565b60008c815261013460205260409020600201546001600160a01b0316611f188d8d8d8461361a565b600160008e8152610134602052604090206006015460ff166003811115611f4f57634e487b7160e01b600052602160045260246000fd5b1415611f7e5760008d815261013460209081526040808320338452600b019091529020805460ff191660011790555b611f898d8d8a6131b7565b50505050505050505050505050565b600080516020615b7f833981519152611fb18133612c43565b61012e546000818152610134602052604090206002810180546001600160a01b0319166001600160a01b038f16179055805467ffffffffffffffff60481b1916600160481b6001600160401b038e16021781556001018054600160401b600160c01b031916600160401b6001600160801b038d1602179055612038818a8989898989613863565b6120428189613932565b505050505050505050505050565b600061205c8133612c43565b6120676000836114d6565b61013054612080906000906001600160a01b0316612ba2565b5061013080546001600160a01b0319166001600160a01b0392909216919091179055565b600082815260fb602052604081206120bc9083613a42565b9392505050565b600091825260c9602090815260408084206001600160a01b0393909316845291905290205460ff1690565b848483836120fb8461344e565b80612123575061210a84613176565b80156121235750612123848463ffffffff1684846134d6565b61216b5760405162461bcd60e51b81526020600482015260196024820152786e6f7420617661696c61626c6520746f20707572636861736560381b6044820152606401610bb4565b600089815261013460205260409020548990899063ffffffff8216600160481b9091046001600160401b031610156121e15760405162461bcd60e51b81526020600482015260196024820152787175616e74697479206578636565647320636170616369747960381b6044820152606401610bb4565b60008b815261013460205260409020600101546001600160401b0316158061222a575060008b815261013460205260409020600101546001600160401b031663ffffffff8b1611155b6122465760405162461bcd60e51b8152600401610bb4906156a5565b3233146122655760405162461bcd60e51b8152600401610bb490615753565b60008b815261013460205260409020600201546001600160a01b031661228d8c8c8c8461361a565b600160008d8152610134602052604090206006015460ff1660038111156122c457634e487b7160e01b600052602160045260246000fd5b14156122f35760008c815261013460209081526040808320338452600b019091529020805460ff191660011790555b6120428c8c336131b7565b606060668054610ca090615a77565b6115e4338383613a4e565b60006123248133612c43565b5061012f80546001600160a01b0319166001600160a01b0392909216919091179055565b6123523383612ebb565b61236e5760405162461bcd60e51b8152600401610bb490615702565b610e1d84848484613b1d565b600081815261013460205260409020600a015460609061243757604080516002808252606082018352600092602083019080368337505061012f5482519293506001600160a01b0316918391506000906123e457634e487b7160e01b600052603260045260246000fd5b6001600160a01b039283166020918202929092018101919091526000858152610134909152604090206002015482519116908290600190811061103957634e487b7160e01b600052603260045260246000fd5b60008281526101346020908152604091829020600a01805483518184028101840190945280845290918301828280156110b9576020028201919060005260206000209081546001600160a01b0316815260019091019060200180831161109b5750505050509050919050565b60006124af8133612c43565b81600080828152610134602052604090206006015460ff1660038111156124e657634e487b7160e01b600052602160045260246000fd5b14156125045760405162461bcd60e51b8152600401610bb490615675565b6000838152610134602052604090205460ff161561255b5760405162461bcd60e51b8152602060048201526014602482015273189b1d595c1c9a5b9d08155492481b1bd8dad95960621b6044820152606401610bb4565b5050600090815261013460205260409020805460ff19166001179055565b6000818152606760205260409020546060906001600160a01b03166125f85760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610bb4565b600061260383613b50565b9050600081511161262357604051806020016040528060008152506120bc565b8061262d84613bfa565b60405160200161263e929190615390565b6040516020818303038152906040529392505050565b600080516020615b7f83398151915261266d8133612c43565b82600080828152610134602052604090206006015460ff1660038111156126a457634e487b7160e01b600052602160045260246000fd5b14156126c25760405162461bcd60e51b8152600401610bb490615675565b6000848152610134602052604090205460ff16156127195760405162461bcd60e51b8152602060048201526014602482015273189b1d595c1c9a5b9d08155492481b1bd8dad95960621b6044820152606401610bb4565b600084815261013460209081526040909120845161273f92600490920191860190614991565b507f36ab8e0ce3828485b4d98e97c3f5851331257ffe2b61a43e7e0e9875242f96378484604051610bee929190615883565b3360009081526101336020526040902054806127c85760405162461bcd60e51b81526020600482015260166024820152756e6f206372656469747320746f20776974686472617760501b6044820152606401610bb4565b3360009081526101336020526040808220829055516001600160a01b03841690614e2090849084818181858888f193505050503d8060008114612827576040519150601f19603f3d011682016040523d82523d6000602084013e61282c565b606091505b5050905080610fc95760405162461bcd60e51b815260206004820152600f60248201526e1dda5d1a191c985dc819985a5b1959608a1b6044820152606401610bb4565b600080516020615b7f8339815191526128888133612c43565b60016000878152610134602052604090206006015460ff1660038111156128bf57634e487b7160e01b600052602160045260246000fd5b1461290c5760405162461bcd60e51b815260206004820152601c60248201527f73616c652073746172746564206f72206e6f74207072657061726564000000006044820152606401610bb4565b6129168585613d13565b1561296a57600086815261013460209081526040909120865161294192600990920191880190614a15565b50600086815261013460209081526040909120855161296892600790920191870190614a6a565b505b6129748383613d13565b156129c857600086815261013460209081526040909120845161299f92600a90920191860190614a15565b5060008681526101346020908152604090912083516129c692600890920191850190614a6a565b505b505050505050565b600080516020615b7f8339815191526129e98133612c43565b60016000838152610134602052604090206006015460ff166003811115612a2057634e487b7160e01b600052602160045260246000fd5b14612a6d5760405162461bcd60e51b815260206004820152601c60248201527f73616c652073746172746564206f72206e6f74207072657061726564000000006044820152606401610bb4565b60008281526101346020908152604091829020600601805460ff1916600217905590518381527fa78c547613f6306e7a70d1bd161c18a496cae1eeb8d4f9e58b60d69ad72ddf589101611c1e565b600081815260fb60205260408120610c8b90613e35565b60008181526101346020526040902060070154606090612b3a5760408051600180825281830190925260009160208083019080368337505061012d54825192935063ffffffff169183915060009061118157634e487b7160e01b600052603260045260246000fd5b60008281526101346020908152604091829020600701805483518184028101840190945280845290918301828280156110b9576000918252602091829020805463ffffffff1684529082028301929091600491018084116111e3575094979650505050505050565b600082815260c96020526040902060010154612bbe8133612c43565b610fc98383613154565b6001600160a01b038083166000908152606a6020908152604080832093851683529290529081205460ff16806120bc57506120bc6000836120c3565b6000612c108133612c43565b6127108263ffffffff161115612c2557600080fd5b5061012d805463ffffffff191663ffffffff92909216919091179055565b612c4d82826120c3565b6115e457612c65816001600160a01b03166014613e3f565b612c70836020613e3f565b604051602001612c819291906153e8565b60408051601f198184030181529082905262461bcd60e51b8252610bb4916004016155c2565b60006001600160e01b031982166380ac58cd60e01b1480612cd857506001600160e01b03198216635b5e139f60e01b145b80610c8b57506301ffc9a760e01b6001600160e01b0319831614610c8b565b6000612d0282612ca7565b80610c8b5750506001600160e01b03191660009081526097602052604090205460ff1690565b60006001600160e01b03198216635a05180f60e01b1480610c8b5750610c8b82614020565b600054610100900460ff1680612d66575060005460ff16155b612d825760405162461bcd60e51b8152600401610bb490615627565b600054610100900460ff16158015612da4576000805461ffff19166101011790555b612dac614045565b612db4614045565b612dbe83836140af565b8015610fc9576000805461ff0019169055505050565b600054610100900460ff1680612ded575060005460ff16155b612e095760405162461bcd60e51b8152600401610bb490615627565b600054610100900460ff16158015612e2b576000805461ffff19166101011790555b612e33614045565b612e3b614045565b611d64614045565b6115e48282613132565b600081815260696020526040902080546001600160a01b0319166001600160a01b0384169081179091558190612e828261193d565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152606760205260408120546001600160a01b0316612f345760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610bb4565b6000612f3f8361193d565b9050806001600160a01b0316846001600160a01b03161480612f7a5750836001600160a01b0316612f6f84610e23565b6001600160a01b0316145b80612f8a5750612f8a8185612bc8565b949350505050565b826001600160a01b0316612fa58261193d565b6001600160a01b03161461300d5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610bb4565b6001600160a01b03821661306f5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610bb4565b61307a600082612e4d565b6001600160a01b03831660009081526068602052604081208054600192906130a39084906159d5565b90915550506001600160a01b03821660009081526068602052604081208054600192906130d190849061591a565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b61313c8282614144565b600082815260fb60205260409020610fc990826141ca565b61315e82826141df565b600082815260fb60205260409020610fc99082614246565b600060015b6000838152610134602052604090206006015460ff1660038111156131b057634e487b7160e01b600052602160045260246000fd5b1492915050565b600083815261013460205260408120546001600160401b03600160881b8204811692600160481b90920416905b8463ffffffff168161ffff1610156133bc576000826001600160401b03161161324f5760405162461bcd60e51b815260206004820152601960248201527f626c75657072696e74206f7574206f66206361706163697479000000000000006044820152606401610bb4565b61326f8461326161ffff8416866158ef565b6001600160801b031661425b565b85610132600061328361ffff8516876158ef565b6001600160801b03168152602001908152602001600020819055506000434241856040516020016132e79493929190938452602084019290925260601b6001600160601b031916604083015260c01b6001600160c01b0319166054820152605c0190565b60408051601f19818403018152918152815160209283012060008a81526101349093529120600201549091507fbe53bef0e08aa61aa51091a6fa77b4a68c6da179f64097fa01f92beda583eecc9088906001600160a01b03168761334f61ffff8716896158ef565b604080519485526001600160a01b03938416602086015291909216908301526001600160801b031660608201526001600160401b038516608082015260a0810183905260c00160405180910390a16133a683615a54565b92505080806133b490615ab2565b9150506131e4565b50600085815261013460205260409020805463ffffffff861691906011906133f5908490600160881b90046001600160401b0316615951565b82546101009290920a6001600160401b0381810219909316918316021790915560009687526101346020526040909620805467ffffffffffffffff60481b1916600160481b939097169290920295909517905550505050565b6000600261317b565b6001600160e01b031980821614156134b15760405162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e74657266616365206964000000006044820152606401610bb4565b6001600160e01b0319166000908152609760205260409020805460ff19166001179055565b6000816135195760405162461bcd60e51b81526020600482015260116024820152701b9bc81c1c9bdbd9881c1c9bdd9a591959607a1b6044820152606401610bb4565b600085815261013460209081526040808320338452600b0190915290205460ff16156135795760405162461bcd60e51b815260206004820152600f60248201526e185b1c9958591e4818db185a5b5959608a1b6044820152606401610bb4565b600085815261013460205260409020600501546136106135d633876040516001600160601b0319606084901b1660208201526034810182905260009060540160405160208183030381529060405280519060200120905092915050565b8286868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061439d92505050565b9695505050505050565b60008481526101346020526040902060038101546001909101546001600160a01b0390911690600160401b90046001600160801b03168161371b5783156136a35760405162461bcd60e51b815260206004820152601b60248201527f63616e6e6f74207370656369667920746f6b656e20616d6f756e7400000000006044820152606401610bb4565b6136b38163ffffffff8716615987565b6001600160801b0316341461370a5760405162461bcd60e51b815260206004820181905260248201527f507572636861736520616d6f756e74206d757374206d617463682070726963656044820152606401610bb4565b613716868334866143aa565b6129c8565b34156137695760405162461bcd60e51b815260206004820152601960248201527f63616e6e6f7420737065636966792065746820616d6f756e74000000000000006044820152606401610bb4565b6137798163ffffffff8716615987565b6001600160801b031684146137d05760405162461bcd60e51b815260206004820181905260248201527f507572636861736520616d6f756e74206d757374206d617463682070726963656044820152606401610bb4565b6040516323b872dd60e01b8152336004820152306024820152604481018590526001600160a01b038316906323b872dd90606401602060405180830381600087803b15801561381e57600080fd5b505af1158015613832573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138569190614f55565b506129c8868386866143aa565b61386d8787614484565b600087815261013460209081526040909120865161389392600490920191880190614991565b5083156138b0576000878152610134602052604090206005018490555b600087815261013460205260409020805468ffffffffffffffff00191661010063ffffffff8681169190910268ffffffff0000000000191691909117600160281b85831602179091558116156129c657600087815261013460205260409020600101805467ffffffffffffffff191663ffffffff831617905550505050505050565b600082815261013460205260409020600681018054600160ff1990911617905561012d8054825467ffffffffffffffff60881b1916600160601b918290046001600160401b03908116600160881b0291909117938490558254600160481b909404811693849392600c926139aa928692900416615951565b92506101000a8154816001600160401b0302191690836001600160401b0316021790555061012e60008154809291906139e290615ad4565b90915550506000838152610134602052604090819020600281015491517f97660d9bc329402e809d4aabb7261513a7d331d8762d407be7e3316d08d188fd926119159287926001600160a01b0390921691869188916004909101906157a2565b60006120bc83836144c4565b816001600160a01b0316836001600160a01b03161415613ab05760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610bb4565b6001600160a01b038381166000818152606a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b613b28848484612f92565b613b34848484846144fc565b610e1d5760405162461bcd60e51b8152600401610bb4906155d5565b6000818152610132602090815260408083205483526101349091529020600401805460609190613b7f90615a77565b80601f0160208091040260200160405190810160405280929190818152602001828054613bab90615a77565b80156110b95780601f10613bcd576101008083540402835291602001916110b9565b820191906000526020600020905b815481529060010190602001808311613bdb5750939695505050505050565b606081613c1e5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115613c485780613c3281615ad4565b9150613c419050600a83615973565b9150613c22565b6000816001600160401b03811115613c7057634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015613c9a576020820181803683370190505b5090505b8415612f8a57613caf6001836159d5565b9150613cbc600a86615aef565b613cc790603061591a565b60f81b818381518110613cea57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350613d0c600a86615973565b9450613c9e565b600082516000141580613d265750815115155b15613e2c578151835114613d7c5760405162461bcd60e51b815260206004820152601b60248201527f6d69736d61746368656420726563697069656e747320262042707300000000006044820152606401610bb4565b6000805b8351811015613dd057838181518110613da957634e487b7160e01b600052603260045260246000fd5b602002602001015182613dbc9190615932565b915080613dc881615ad4565b915050613d80565b506127108163ffffffff161115613e225760405162461bcd60e51b81526020600482015260166024820152754665652042707320657863656564206d6178696d756d60501b6044820152606401610bb4565b6001915050610c8b565b50600092915050565b6000610c8b825490565b60606000613e4e8360026159b6565b613e5990600261591a565b6001600160401b03811115613e7e57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015613ea8576020820181803683370190505b509050600360fc1b81600081518110613ed157634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613f0e57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000613f328460026159b6565b613f3d90600161591a565b90505b6001811115613fd1576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110613f7f57634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110613fa357634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93613fca81615a3d565b9050613f40565b5083156120bc5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610bb4565b60006001600160e01b03198216637965db0b60e01b1480610c8b5750610c8b82612cf7565b600054610100900460ff168061405e575060005460ff16155b61407a5760405162461bcd60e51b8152600401610bb490615627565b600054610100900460ff16158015611d64576000805461ffff19166101011790558015611d76576000805461ff001916905550565b600054610100900460ff16806140c8575060005460ff16155b6140e45760405162461bcd60e51b8152600401610bb490615627565b600054610100900460ff16158015614106576000805461ffff19166101011790555b8251614119906065906020860190614991565b50815161412d906066906020850190614991565b508015610fc9576000805461ff0019169055505050565b61414e82826120c3565b6115e457600082815260c9602090815260408083206001600160a01b03851684529091529020805460ff191660011790556141863390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006120bc836001600160a01b038416614606565b6141e982826120c3565b156115e457600082815260c9602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60006120bc836001600160a01b038416614655565b6001600160a01b0382166142b15760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610bb4565b6000818152606760205260409020546001600160a01b0316156143165760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610bb4565b6001600160a01b038216600090815260686020526040812080546001929061433f90849061591a565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000612f8a828486614772565b60006143b585610fce565b905060006143c286612ad2565b90506000805b835181101561445d57600061440a878584815181106143f757634e487b7160e01b600052603260045260246000fd5b602002602001015163ffffffff16614788565b9050614416818461591a565b925061444a85838151811061443b57634e487b7160e01b600052603260045260246000fd5b602002602001015189836147a1565b508061445581615ad4565b9150506143c8565b50600061446a82876159d5565b11156129c6576129c6848761447f84896159d5565b6147a1565b6001600160a01b038116156115e45760008281526101346020526040902060030180546001600160a01b0383166001600160a01b03199091161790555050565b60008260000182815481106144e957634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b60006001600160a01b0384163b156145fe57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061454090339089908890889060040161545d565b602060405180830381600087803b15801561455a57600080fd5b505af192505050801561458a575060408051601f3d908101601f1916820190925261458791810190614fea565b60015b6145e4573d8080156145b8576040519150601f19603f3d011682016040523d82523d6000602084013e6145bd565b606091505b5080516145dc5760405162461bcd60e51b8152600401610bb4906155d5565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612f8a565b506001612f8a565b600081815260018301602052604081205461464d57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610c8b565b506000610c8b565b600081815260018301602052604081205480156147685760006146796001836159d5565b855490915060009061468d906001906159d5565b905081811461470e5760008660000182815481106146bb57634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050808760000184815481106146ec57634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255918252600188019052604090208390555b855486908061472d57634e487b7160e01b600052603160045260246000fd5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610c8b565b6000915050610c8b565b60008261477f85846148d7565b14949350505050565b600061271061479783856159b6565b6120bc9190615973565b6001600160a01b038216156148325760405163a9059cbb60e01b81526001600160a01b0384811660048301526024820183905283169063a9059cbb90604401602060405180830381600087803b1580156147fa57600080fd5b505af115801561480e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e1d9190614f55565b6000836001600160a01b031682614e2090604051600060405180830381858888f193505050503d8060008114614884576040519150601f19603f3d011682016040523d82523d6000602084013e614889565b606091505b5050905080610e1d576001600160a01b038416600090815261013360205260409020546148b790839061591a565b6001600160a01b0385166000908152610133602052604090205550505050565b600081815b845181101561498957600085828151811061490757634e487b7160e01b600052603260045260246000fd5b60200260200101519050808311614949576040805160208101859052908101829052606001604051602081830303815290604052805190602001209250614976565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b508061498181615ad4565b9150506148dc565b509392505050565b82805461499d90615a77565b90600052602060002090601f0160209004810192826149bf5760008555614a05565b82601f106149d857805160ff1916838001178555614a05565b82800160010185558215614a05579182015b82811115614a055782518255916020019190600101906149ea565b50614a11929150614b10565b5090565b828054828255906000526020600020908101928215614a05579160200282015b82811115614a0557825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190614a35565b82805482825590600052602060002090600701600890048101928215614a055791602002820160005b83821115614ad757835183826101000a81548163ffffffff021916908363ffffffff1602179055509260200192600401602081600301049283019260010302614a93565b8015614b075782816101000a81549063ffffffff0219169055600401602081600301049283019260010302614ad7565b5050614a119291505b5b80821115614a115760008155600101614b11565b60006001600160401b03831115614b3e57614b3e615b2f565b614b51601f8401601f191660200161589c565b9050828152838383011115614b6557600080fd5b828260208301376000602084830101529392505050565b80356110c581615b45565b600082601f830112614b97578081fd5b81356020614bac614ba7836158cc565b61589c565b80838252828201915082860187848660051b8901011115614bcb578586fd5b855b85811015614bf2578135614be081615b45565b84529284019290840190600101614bcd565b5090979650505050505050565b60008083601f840112614c10578182fd5b5081356001600160401b03811115614c26578182fd5b6020830191508360208260051b8501011115614c4157600080fd5b9250929050565b600082601f830112614c58578081fd5b81356020614c68614ba7836158cc565b80838252828201915082860187848660051b8901011115614c87578586fd5b855b85811015614bf257614c9a82614ce2565b84529284019290840190600101614c89565b600082601f830112614cbc578081fd5b6120bc83833560208501614b25565b80356001600160801b03811681146110c557600080fd5b803563ffffffff811681146110c557600080fd5b80356001600160401b03811681146110c557600080fd5b600060208284031215614d1e578081fd5b81356120bc81615b45565b60008060408385031215614d3b578081fd5b8235614d4681615b45565b91506020830135614d5681615b45565b809150509250929050565b600080600060608486031215614d75578081fd5b8335614d8081615b45565b92506020840135614d9081615b45565b929592945050506040919091013590565b60008060008060808587031215614db6578081fd5b8435614dc181615b45565b93506020850135614dd181615b45565b92506040850135915060608501356001600160401b03811115614df2578182fd5b8501601f81018713614e02578182fd5b614e1187823560208401614b25565b91505092959194509250565b60008060408385031215614e2f578182fd5b8235614e3a81615b45565b91506020830135614d5681615b5a565b60008060408385031215614e5c578182fd5b8235614e6781615b45565b946020939093013593505050565b6000806000806000806000806000806101408b8d031215614e94578788fd5b614e9d8b614b7c565b9950614eab60208c01614cf6565b9850614eb960408c01614ccb565b9750614ec760608c01614b7c565b965060808b01356001600160401b0380821115614ee2578788fd5b614eee8e838f01614cac565b975060a08d0135915080821115614f03578687fd5b50614f108d828e01614cac565b95505060c08b01359350614f2660e08c01614ce2565b9250614f356101008c01614ce2565b9150614f446101208c01614ce2565b90509295989b9194979a5092959850565b600060208284031215614f66578081fd5b81516120bc81615b5a565b600060208284031215614f82578081fd5b5035919050565b60008060408385031215614f9b578182fd5b823591506020830135614d5681615b45565b60008060408385031215614fbf578182fd5b50508035926020909101359150565b600060208284031215614fdf578081fd5b81356120bc81615b68565b600060208284031215614ffb578081fd5b81516120bc81615b68565b60008060006060848603121561501a578081fd5b83356001600160401b0380821115615030578283fd5b61503c87838801614cac565b94506020860135915080821115615051578283fd5b5061505e86828701614cac565b925050604084013561506f81615b45565b809150509250925092565b600080600080600060a08688031215615091578283fd5b8535945060208601356001600160401b03808211156150ae578485fd5b6150ba89838a01614b87565b955060408801359150808211156150cf578485fd5b6150db89838a01614c48565b945060608801359150808211156150f0578283fd5b6150fc89838a01614b87565b93506080880135915080821115615111578283fd5b5061511e88828901614c48565b9150509295509295909350565b6000806040838503121561513d578182fd5b8235915060208301356001600160401b03811115615159578182fd5b61516585828601614cac565b9150509250929050565b600080600080600080600060e0888a031215615189578081fd5b8735965061519960208901614ccb565b95506151a760408901614ce2565b94506151b560608901614ce2565b93506151c360808901614ce2565b92506151d160a08901614cf6565b915060c0880135905092959891949750929550565b600080604083850312156151f8578182fd5b8235915061520860208401614ce2565b90509250929050565b600080600080600060808688031215615228578283fd5b8535945061523860208701614ce2565b93506040860135925060608601356001600160401b03811115615259578182fd5b61526588828901614bff565b969995985093965092949392505050565b60008060008060008060a0878903121561528e578384fd5b8635955061529e60208801614ce2565b94506040870135935060608701356001600160401b038111156152bf578283fd5b6152cb89828a01614bff565b90945092505060808701356152df81615b45565b809150509295509295509295565b600080600060608486031215615301578081fd5b8335925061531160208501614cf6565b915061531f60408501614cf6565b90509250925092565b600060208284031215615339578081fd5b6120bc82614ce2565b6000815180845261535a816020860160208601615a11565b601f01601f19169290920160200192915050565b6004811061538c57634e487b7160e01b600052602160045260246000fd5b9052565b600083516153a2818460208801615a11565b8083019050602f60f81b80825284516153c2816001850160208901615a11565b6001920191820152693a37b5b2b7173539b7b760b11b6002820152600c01949350505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351615420816017850160208801615a11565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351615451816028840160208801615a11565b01602801949350505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061361090830184615342565b6020808252825182820181905260009190848201906040850190845b818110156154d15783516001600160a01b0316835292840192918401916001016154ac565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b818110156154d157835163ffffffff16835292840192918401916001016154f9565b8c1515815263ffffffff8c811660208301528b1660408201526001600160401b038a811660608301528981166080830152881660a08201526001600160801b03871660c082015260006101806001600160a01b03881660e08401526001600160a01b0387166101008401528061012084015261559981840187615342565b915050836101408301526155b161016083018461536e565b9d9c50505050505050505050505050565b6020815260006120bc6020830184615342565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b602080825260169082015275189b1d595c1c9a5b9d081b9bdd081c1c995c185c995960521b604082015260600190565b60208082526038908201527f757365722063616e6e6f7420627579206d6f7265207468616e206d617850757260408201527f6368617365416d6f756e7420696e2073696e676c652074780000000000000000606082015260800190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252602f908201527f70757263686173652063616e6e6f742062652063616c6c65642066726f6d206160408201526e1b9bdd1a195c8818dbdb9d1c9858dd608a1b606082015260800190565b8581526000602060018060a01b038716818401526001600160401b038616604084015260a060608401526157d960a0840186615342565b838103608085015284548390600181811c90808316806157fa57607f831692505b86831081141561581857634e487b7160e01b88526022600452602488fd5b828652602086019550808015615835576001811461584657615870565b60ff19851687528787019550615870565b60008b815260209020895b8581101561586a57815489820152908401908901615851565b88019650505b50939d9c50505050505050505050505050565b828152604060208201526000612f8a6040830184615342565b604051601f8201601f191681016001600160401b03811182821017156158c4576158c4615b2f565b604052919050565b60006001600160401b038211156158e5576158e5615b2f565b5060051b60200190565b60006001600160801b0380831681851680830382111561591157615911615b03565b01949350505050565b6000821982111561592d5761592d615b03565b500190565b600063ffffffff80831681851680830382111561591157615911615b03565b60006001600160401b0380831681851680830382111561591157615911615b03565b60008261598257615982615b19565b500490565b60006001600160801b03808316818516818304811182151516156159ad576159ad615b03565b02949350505050565b60008160001904831182151516156159d0576159d0615b03565b500290565b6000828210156159e7576159e7615b03565b500390565b600063ffffffff83811690831681811015615a0957615a09615b03565b039392505050565b60005b83811015615a2c578181015183820152602001615a14565b83811115610e1d5750506000910152565b600081615a4c57615a4c615b03565b506000190190565b60006001600160401b03821680615a6d57615a6d615b03565b6000190192915050565b600181811c90821680615a8b57607f821691505b60208210811415615aac57634e487b7160e01b600052602260045260246000fd5b50919050565b600061ffff80831681811415615aca57615aca615b03565b6001019392505050565b6000600019821415615ae857615ae8615b03565b5060010190565b600082615afe57615afe615b19565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114611d7657600080fd5b8015158114611d7657600080fd5b6001600160e01b031981168114611d7657600080fdfe9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6a2646970667358221220826f886a99a41e1716b73a922995a9ea7bfb95aa0c13147602d512cf302c9cd664736f6c63430008040033
Deployed Bytecode
0x6080604052600436106103815760003560e01c80637b4252c0116101d1578063c2bce59c11610102578063cba991bf116100a0578063deb941481161006f578063deb9414814610abf578063e985e9c514610ae0578063eaf2115d14610b00578063fce212f314610b2657600080fd5b8063cba991bf14610a38578063ced3604314610a5d578063d539139314610a7d578063d547741f14610a9f57600080fd5b8063c90941b1116100dc578063c90941b1146109b8578063c9e63203146109d8578063c9f2bd93146109f8578063ca15c87314610a1857600080fd5b8063c2bce59c14610958578063c87b56dd14610978578063c8950e601461099857600080fd5b806394a9c9c31161016f578063a22cb46511610149578063a22cb465146108d8578063aec970b0146108f8578063b88d4fde14610918578063b9c4d9fb1461093857600080fd5b806394a9c9c31461089b57806395d89b41146108ae578063a217fddf146108c357600080fd5b8063898a90bc116101ab578063898a90bc1461081b5780638f9f193f1461083b5780639010d07c1461085b57806391d148541461087b57600080fd5b80637b4252c0146107dc57806380ae4ebc146107f357806382c32b801461080857600080fd5b80632f2ff15d116102b65780634bde38c81161025457806366c083d31161022357806366c083d31461075c57806368c31e261461077c57806370a082311461079c5780637550f27d146107bc57600080fd5b80634bde38c8146106a35780634d073a5a146106c45780636352211e1461070457806366bf33be1461072457600080fd5b806336568abe1161029057806336568abe1461062357806338e395cf146106435780633a66e4b61461066357806342842e0e1461068357600080fd5b80632f2ff15d146105c25780632fcfb95a146105e257806334d722c91461060257600080fd5b80630a21a2111161032357806322235d69116102fd57806322235d691461051157806323b872dd14610544578063248a9ca3146105645780632b4ab0e3146105a257600080fd5b80630a21a211146104975780630ebd4c7f146104c457806320ceaf8d146104f157600080fd5b806306fdde031161035f57806306fdde03146103fd578063077f224a1461041f578063081812fc1461043f578063095ea7b31461047757600080fd5b8063018a62a61461038657806301a94950146103a857806301ffc9a7146103c8575b600080fd5b34801561039257600080fd5b506103a66103a136600461512b565b610b46565b005b3480156103b457600080fd5b506103a66103c3366004615328565b610bfc565b3480156103d457600080fd5b506103e86103e3366004614fce565b610c62565b60405190151581526020015b60405180910390f35b34801561040957600080fd5b50610412610c91565b6040516103f491906155c2565b34801561042b57600080fd5b506103a661043a366004615006565b610d23565b34801561044b57600080fd5b5061045f61045a366004614f71565b610e23565b6040516001600160a01b0390911681526020016103f4565b34801561048357600080fd5b506103a6610492366004614e4a565b610eb8565b3480156104a357600080fd5b506104b76104b2366004614f71565b610fce565b6040516103f49190615490565b3480156104d057600080fd5b506104e46104df366004614f71565b6110ca565b6040516103f491906154dd565b3480156104fd57600080fd5b506103a661050c3660046152ed565b61122a565b34801561051d57600080fd5b5061012d5461052f9063ffffffff1681565b60405163ffffffff90911681526020016103f4565b34801561055057600080fd5b506103a661055f366004614d61565b61130f565b34801561057057600080fd5b5061059461057f366004614f71565b600090815260c9602052604090206001015490565b6040519081526020016103f4565b3480156105ae57600080fd5b506103a66105bd36600461516f565b611340565b3480156105ce57600080fd5b506103a66105dd366004614f89565b6114d6565b3480156105ee57600080fd5b506103a66105fd366004614d0d565b6114fc565b34801561060e57600080fd5b506101315461045f906001600160a01b031681565b34801561062f57600080fd5b506103a661063e366004614f89565b61156a565b34801561064f57600080fd5b506103a661065e3660046151e6565b6115e8565b34801561066f57600080fd5b506103a661067e366004614f71565b611869565b34801561068f57600080fd5b506103a661069e366004614d61565b611922565b3480156106af57600080fd5b506101305461045f906001600160a01b031681565b3480156106d057600080fd5b5061012d546106ec90600160601b90046001600160401b031681565b6040516001600160401b0390911681526020016103f4565b34801561071057600080fd5b5061045f61071f366004614f71565b61193d565b34801561073057600080fd5b5061074461073f366004614f71565b6119b4565b6040516103f49c9b9a9998979695949392919061551b565b34801561076857600080fd5b506103a6610777366004615328565b611adb565b34801561078857600080fd5b506103a6610797366004614f71565b611b45565b3480156107a857600080fd5b506105946107b7366004614d0d565b611c2a565b3480156107c857600080fd5b506103a66107d7366004614f89565b611cb1565b3480156107e857600080fd5b5061059461012e5481565b3480156107ff57600080fd5b506103a6611cfd565b6103a6610816366004615276565b611d79565b34801561082757600080fd5b506103a6610836366004614e75565b611f98565b34801561084757600080fd5b506103a6610856366004614d0d565b612050565b34801561086757600080fd5b5061045f610876366004614fad565b6120a4565b34801561088757600080fd5b506103e8610896366004614f89565b6120c3565b6103a66108a9366004615211565b6120ee565b3480156108ba57600080fd5b506104126122fe565b3480156108cf57600080fd5b50610594600081565b3480156108e457600080fd5b506103a66108f3366004614e1d565b61230d565b34801561090457600080fd5b506103a6610913366004614d0d565b612318565b34801561092457600080fd5b506103a6610933366004614da1565b612348565b34801561094457600080fd5b506104b7610953366004614f71565b61237a565b34801561096457600080fd5b506103a6610973366004614f71565b6124a3565b34801561098457600080fd5b50610412610993366004614f71565b612579565b3480156109a457600080fd5b506103a66109b336600461512b565b612654565b3480156109c457600080fd5b506103a66109d3366004614d0d565b612771565b3480156109e457600080fd5b506103a66109f336600461507a565b61286f565b348015610a0457600080fd5b506103a6610a13366004614f71565b6129d0565b348015610a2457600080fd5b50610594610a33366004614f71565b612abb565b348015610a4457600080fd5b5061012d5461052f90600160401b900463ffffffff1681565b348015610a6957600080fd5b506104e4610a78366004614f71565b612ad2565b348015610a8957600080fd5b50610594600080516020615b7f83398151915281565b348015610aab57600080fd5b506103a6610aba366004614f89565b612ba2565b348015610acb57600080fd5b5061012f5461045f906001600160a01b031681565b348015610aec57600080fd5b506103e8610afb366004614d29565b612bc8565b348015610b0c57600080fd5b5061012d5461052f90640100000000900463ffffffff1681565b348015610b3257600080fd5b506103a6610b41366004615328565b612c04565b600080516020615b7f833981519152610b5f8133612c43565b82600080828152610134602052604090206006015460ff166003811115610b9657634e487b7160e01b600052602160045260246000fd5b1415610bbd5760405162461bcd60e51b8152600401610bb490615675565b60405180910390fd5b7f703604f30bacc0494165473e817b003a6db41ed8c598a9ff96093768d701f0958484604051610bee929190615883565b60405180910390a150505050565b6000610c088133612c43565b61012d5461271090610c2790600160401b900463ffffffff1684615932565b63ffffffff161115610c3857600080fd5b5061012d805463ffffffff9092166401000000000267ffffffff0000000019909216919091179055565b6000610c6d82612ca7565b80610c7c5750610c7c82612cf7565b80610c8b5750610c8b82612d28565b92915050565b606060658054610ca090615a77565b80601f0160208091040260200160405190810160405280929190818152602001828054610ccc90615a77565b8015610d195780601f10610cee57610100808354040283529160200191610d19565b820191906000526020600020905b815481529060010190602001808311610cfc57829003601f168201915b5050505050905090565b600054610100900460ff1680610d3c575060005460ff16155b610d585760405162461bcd60e51b8152600401610bb490615627565b600054610100900460ff16158015610d7a576000805461ffff19166101011790555b610d848484612d4d565b610d8c611cfd565b610d94612dd4565b610d9f600033612e43565b610db7600080516020615b7f83398151915283612e43565b6101308054336001600160a01b03199182168117909255610131805482166001600160a01b03861617905561012d80546001600160601b03191668fa000002ee000007d017905561012f805490911690911790558015610e1d576000805461ff00191690555b50505050565b6000818152606760205260408120546001600160a01b0316610e9c5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610bb4565b506000908152606960205260409020546001600160a01b031690565b6000610ec38261193d565b9050806001600160a01b0316836001600160a01b03161415610f315760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610bb4565b336001600160a01b0382161480610f4d5750610f4d8133612bc8565b610fbf5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610bb4565b610fc98383612e4d565b505050565b600081815261013460205260409020600901546060906110575760408051600180825281830190925260009160208083019080368337505061012f5482519293506001600160a01b03169183915060009061103957634e487b7160e01b600052603260045260246000fd5b6001600160a01b039092166020928302919091019091015292915050565b60008281526101346020908152604091829020600901805483518184028101840190945280845290918301828280156110b957602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161109b575b50505050509050919050565b919050565b6000818152610134602052604090206008015460609061119c5760408051600280825260608201835260009260208301908036833701905050905061012d60089054906101000a900463ffffffff168160008151811061113a57634e487b7160e01b600052603260045260246000fd5b63ffffffff928316602091820292909201015261012d548251640100000000909104909116908290600190811061118157634e487b7160e01b600052603260045260246000fd5b63ffffffff9092166020928302919091019091015292915050565b60008281526101346020908152604091829020600801805483518184028101840190945280845290918301828280156110b957602002820191906000526020600020906000905b82829054906101000a900463ffffffff1663ffffffff16815260200190600401906020826003010492830192600103820291508084116111e3575094979650505050505050565b600080516020615b7f8339815191526112438133612c43565b600084815261013460205260409020546001600160401b03808516600160481b90920416116112b45760405162461bcd60e51b815260206004820152601d60248201527f4e6f7420656e6f75676820636170616369747920746f207265647563650000006044820152606401610bb4565b506000928352610134602052604090922080546001600160401b03928316600160481b0267ffffffffffffffff60481b1990911617905561012d805491909216600160601b0267ffffffffffffffff60601b19909116179055565b6113193382612ebb565b6113355760405162461bcd60e51b8152600401610bb490615702565b610fc9838383612f92565b600080516020615b7f8339815191526113598133612c43565b600088815261013460205260409020600181018054600160401b600160c01b031916600160401b6001600160801b038b1602179055805468ffffffffffffffff00191661010063ffffffff8981169190910268ffffffff0000000000191691909117600160281b8883160217909155841660038111156113e957634e487b7160e01b600052602160045260246000fd5b600089815261013460205260409020600601805460ff1916600183600381111561142357634e487b7160e01b600052602160045260246000fd5b0217905550600088815261013460209081526040918290206005810185905560010180546001600160401b03871667ffffffffffffffff19909116811790915582518b81526001600160801b038b169281019290925263ffffffff8981168385015288811660608401528716608083015260a082015260c0810184905290517f8b95f2ac31b4018fe162a0e4305e150fcc6ec712116c66adbbdbf6aa21524bc39181900360e00190a15050505050505050565b600082815260c960205260409020600101546114f28133612c43565b610fc98383613132565b60006115088133612c43565b611520600080516020615b7f833981519152836114d6565b6101315461154690600080516020615b7f833981519152906001600160a01b0316612ba2565b5061013180546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03811633146115da5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610bb4565b6115e48282613154565b5050565b6115f182613176565b61163d5760405162461bcd60e51b815260206004820181905260248201527f4d75737420626520707265706172656420616e64206e6f7420737461727465646044820152606401610bb4565b610131546001600160a01b03163314806116715750600082815261013460205260409020600201546001600160a01b031633145b6116bd5760405162461bcd60e51b815260206004820152601860248201527f757365722063616e6e6f74206d696e742070726573616c6500000000000000006044820152606401610bb4565b610131546001600160a01b031633141561178a576000828152610134602052604090205463ffffffff600160281b909104811690821611156117385760405162461bcd60e51b815260206004820152601460248201527363616e6e6f74206d696e74207175616e7469747960601b6044820152606401610bb4565b6000828152610134602052604090208054829190600590611767908490600160281b900463ffffffff166159ec565b92506101000a81548163ffffffff021916908363ffffffff16021790555061185e565b600082815261013460205260409020600201546001600160a01b031633141561185e576000828152610134602052604090205463ffffffff610100909104811690821611156118125760405162461bcd60e51b815260206004820152601460248201527363616e6e6f74206d696e74207175616e7469747960601b6044820152606401610bb4565b600082815261013460205260409020805482919060019061183f908490610100900463ffffffff166159ec565b92506101000a81548163ffffffff021916908363ffffffff1602179055505b6115e48282336131b7565b600080516020615b7f8339815191526118828133612c43565b8161188c8161344e565b6118cb5760405162461bcd60e51b815260206004820152601060248201526f14d85b19481b9bdd081cdd185c9d195960821b6044820152606401610bb4565b60008381526101346020908152604091829020600601805460ff1916600317905590518481527f4616a0782e5635981b28be1cd36934a60655b462c370d8bd8092c969abc990d091015b60405180910390a1505050565b610fc983838360405180602001604052806000815250612348565b6000818152606760205260408120546001600160a01b031680610c8b5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610bb4565b610134602052600090815260409020805460018201546002830154600384015460048501805460ff861696610100870463ffffffff90811697600160281b810490911696600160481b82046001600160401b0390811697600160881b90930481169690821695600160401b9092046001600160801b0316946001600160a01b039384169493909116929190611a4890615a77565b80601f0160208091040260200160405190810160405280929190818152602001828054611a7490615a77565b8015611ac15780601f10611a9657610100808354040283529160200191611ac1565b820191906000526020600020905b815481529060010190602001808311611aa457829003601f168201915b50505050600583015460069093015491929160ff1690508c565b6000611ae78133612c43565b61012d5461271090611b0790640100000000900463ffffffff1684615932565b63ffffffff161115611b1857600080fd5b5061012d805463ffffffff909216600160401b026bffffffff000000000000000019909216919091179055565b600080516020615b7f833981519152611b5e8133612c43565b60036000838152610134602052604090206006015460ff166003811115611b9557634e487b7160e01b600052602160045260246000fd5b14611bd45760405162461bcd60e51b815260206004820152600f60248201526e14d85b19481b9bdd081c185d5cd959608a1b6044820152606401610bb4565b60008281526101346020908152604091829020600601805460ff1916600217905590518381527fdcba7a000ef2740d4daa9c60f3235ec53ea38eb4164b31d5470f76e01e52d7bd91015b60405180910390a15050565b60006001600160a01b038216611c955760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610bb4565b506001600160a01b031660009081526068602052604090205490565b600080516020615b7f833981519152611cca8133612c43565b506000918252610134602090815260408084206001600160a01b039093168452600b90920190529020805460ff19169055565b600054610100900460ff1680611d16575060005460ff16155b611d325760405162461bcd60e51b8152600401610bb490615627565b600054610100900460ff16158015611d54576000805461ffff19166101011790555b611d64632dde656160e21b613457565b8015611d76576000805461ff00191690555b50565b85858484611d868461344e565b80611dae5750611d9584613176565b8015611dae5750611dae848463ffffffff1684846134d6565b611df65760405162461bcd60e51b81526020600482015260196024820152786e6f7420617661696c61626c6520746f20707572636861736560381b6044820152606401610bb4565b60008a815261013460205260409020548a908a9063ffffffff8216600160481b9091046001600160401b03161015611e6c5760405162461bcd60e51b81526020600482015260196024820152787175616e74697479206578636565647320636170616369747960381b6044820152606401610bb4565b60008c815261013460205260409020600101546001600160401b03161580611eb5575060008c815261013460205260409020600101546001600160401b031663ffffffff8c1611155b611ed15760405162461bcd60e51b8152600401610bb4906156a5565b323314611ef05760405162461bcd60e51b8152600401610bb490615753565b60008c815261013460205260409020600201546001600160a01b0316611f188d8d8d8461361a565b600160008e8152610134602052604090206006015460ff166003811115611f4f57634e487b7160e01b600052602160045260246000fd5b1415611f7e5760008d815261013460209081526040808320338452600b019091529020805460ff191660011790555b611f898d8d8a6131b7565b50505050505050505050505050565b600080516020615b7f833981519152611fb18133612c43565b61012e546000818152610134602052604090206002810180546001600160a01b0319166001600160a01b038f16179055805467ffffffffffffffff60481b1916600160481b6001600160401b038e16021781556001018054600160401b600160c01b031916600160401b6001600160801b038d1602179055612038818a8989898989613863565b6120428189613932565b505050505050505050505050565b600061205c8133612c43565b6120676000836114d6565b61013054612080906000906001600160a01b0316612ba2565b5061013080546001600160a01b0319166001600160a01b0392909216919091179055565b600082815260fb602052604081206120bc9083613a42565b9392505050565b600091825260c9602090815260408084206001600160a01b0393909316845291905290205460ff1690565b848483836120fb8461344e565b80612123575061210a84613176565b80156121235750612123848463ffffffff1684846134d6565b61216b5760405162461bcd60e51b81526020600482015260196024820152786e6f7420617661696c61626c6520746f20707572636861736560381b6044820152606401610bb4565b600089815261013460205260409020548990899063ffffffff8216600160481b9091046001600160401b031610156121e15760405162461bcd60e51b81526020600482015260196024820152787175616e74697479206578636565647320636170616369747960381b6044820152606401610bb4565b60008b815261013460205260409020600101546001600160401b0316158061222a575060008b815261013460205260409020600101546001600160401b031663ffffffff8b1611155b6122465760405162461bcd60e51b8152600401610bb4906156a5565b3233146122655760405162461bcd60e51b8152600401610bb490615753565b60008b815261013460205260409020600201546001600160a01b031661228d8c8c8c8461361a565b600160008d8152610134602052604090206006015460ff1660038111156122c457634e487b7160e01b600052602160045260246000fd5b14156122f35760008c815261013460209081526040808320338452600b019091529020805460ff191660011790555b6120428c8c336131b7565b606060668054610ca090615a77565b6115e4338383613a4e565b60006123248133612c43565b5061012f80546001600160a01b0319166001600160a01b0392909216919091179055565b6123523383612ebb565b61236e5760405162461bcd60e51b8152600401610bb490615702565b610e1d84848484613b1d565b600081815261013460205260409020600a015460609061243757604080516002808252606082018352600092602083019080368337505061012f5482519293506001600160a01b0316918391506000906123e457634e487b7160e01b600052603260045260246000fd5b6001600160a01b039283166020918202929092018101919091526000858152610134909152604090206002015482519116908290600190811061103957634e487b7160e01b600052603260045260246000fd5b60008281526101346020908152604091829020600a01805483518184028101840190945280845290918301828280156110b9576020028201919060005260206000209081546001600160a01b0316815260019091019060200180831161109b5750505050509050919050565b60006124af8133612c43565b81600080828152610134602052604090206006015460ff1660038111156124e657634e487b7160e01b600052602160045260246000fd5b14156125045760405162461bcd60e51b8152600401610bb490615675565b6000838152610134602052604090205460ff161561255b5760405162461bcd60e51b8152602060048201526014602482015273189b1d595c1c9a5b9d08155492481b1bd8dad95960621b6044820152606401610bb4565b5050600090815261013460205260409020805460ff19166001179055565b6000818152606760205260409020546060906001600160a01b03166125f85760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610bb4565b600061260383613b50565b9050600081511161262357604051806020016040528060008152506120bc565b8061262d84613bfa565b60405160200161263e929190615390565b6040516020818303038152906040529392505050565b600080516020615b7f83398151915261266d8133612c43565b82600080828152610134602052604090206006015460ff1660038111156126a457634e487b7160e01b600052602160045260246000fd5b14156126c25760405162461bcd60e51b8152600401610bb490615675565b6000848152610134602052604090205460ff16156127195760405162461bcd60e51b8152602060048201526014602482015273189b1d595c1c9a5b9d08155492481b1bd8dad95960621b6044820152606401610bb4565b600084815261013460209081526040909120845161273f92600490920191860190614991565b507f36ab8e0ce3828485b4d98e97c3f5851331257ffe2b61a43e7e0e9875242f96378484604051610bee929190615883565b3360009081526101336020526040902054806127c85760405162461bcd60e51b81526020600482015260166024820152756e6f206372656469747320746f20776974686472617760501b6044820152606401610bb4565b3360009081526101336020526040808220829055516001600160a01b03841690614e2090849084818181858888f193505050503d8060008114612827576040519150601f19603f3d011682016040523d82523d6000602084013e61282c565b606091505b5050905080610fc95760405162461bcd60e51b815260206004820152600f60248201526e1dda5d1a191c985dc819985a5b1959608a1b6044820152606401610bb4565b600080516020615b7f8339815191526128888133612c43565b60016000878152610134602052604090206006015460ff1660038111156128bf57634e487b7160e01b600052602160045260246000fd5b1461290c5760405162461bcd60e51b815260206004820152601c60248201527f73616c652073746172746564206f72206e6f74207072657061726564000000006044820152606401610bb4565b6129168585613d13565b1561296a57600086815261013460209081526040909120865161294192600990920191880190614a15565b50600086815261013460209081526040909120855161296892600790920191870190614a6a565b505b6129748383613d13565b156129c857600086815261013460209081526040909120845161299f92600a90920191860190614a15565b5060008681526101346020908152604090912083516129c692600890920191850190614a6a565b505b505050505050565b600080516020615b7f8339815191526129e98133612c43565b60016000838152610134602052604090206006015460ff166003811115612a2057634e487b7160e01b600052602160045260246000fd5b14612a6d5760405162461bcd60e51b815260206004820152601c60248201527f73616c652073746172746564206f72206e6f74207072657061726564000000006044820152606401610bb4565b60008281526101346020908152604091829020600601805460ff1916600217905590518381527fa78c547613f6306e7a70d1bd161c18a496cae1eeb8d4f9e58b60d69ad72ddf589101611c1e565b600081815260fb60205260408120610c8b90613e35565b60008181526101346020526040902060070154606090612b3a5760408051600180825281830190925260009160208083019080368337505061012d54825192935063ffffffff169183915060009061118157634e487b7160e01b600052603260045260246000fd5b60008281526101346020908152604091829020600701805483518184028101840190945280845290918301828280156110b9576000918252602091829020805463ffffffff1684529082028301929091600491018084116111e3575094979650505050505050565b600082815260c96020526040902060010154612bbe8133612c43565b610fc98383613154565b6001600160a01b038083166000908152606a6020908152604080832093851683529290529081205460ff16806120bc57506120bc6000836120c3565b6000612c108133612c43565b6127108263ffffffff161115612c2557600080fd5b5061012d805463ffffffff191663ffffffff92909216919091179055565b612c4d82826120c3565b6115e457612c65816001600160a01b03166014613e3f565b612c70836020613e3f565b604051602001612c819291906153e8565b60408051601f198184030181529082905262461bcd60e51b8252610bb4916004016155c2565b60006001600160e01b031982166380ac58cd60e01b1480612cd857506001600160e01b03198216635b5e139f60e01b145b80610c8b57506301ffc9a760e01b6001600160e01b0319831614610c8b565b6000612d0282612ca7565b80610c8b5750506001600160e01b03191660009081526097602052604090205460ff1690565b60006001600160e01b03198216635a05180f60e01b1480610c8b5750610c8b82614020565b600054610100900460ff1680612d66575060005460ff16155b612d825760405162461bcd60e51b8152600401610bb490615627565b600054610100900460ff16158015612da4576000805461ffff19166101011790555b612dac614045565b612db4614045565b612dbe83836140af565b8015610fc9576000805461ff0019169055505050565b600054610100900460ff1680612ded575060005460ff16155b612e095760405162461bcd60e51b8152600401610bb490615627565b600054610100900460ff16158015612e2b576000805461ffff19166101011790555b612e33614045565b612e3b614045565b611d64614045565b6115e48282613132565b600081815260696020526040902080546001600160a01b0319166001600160a01b0384169081179091558190612e828261193d565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152606760205260408120546001600160a01b0316612f345760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610bb4565b6000612f3f8361193d565b9050806001600160a01b0316846001600160a01b03161480612f7a5750836001600160a01b0316612f6f84610e23565b6001600160a01b0316145b80612f8a5750612f8a8185612bc8565b949350505050565b826001600160a01b0316612fa58261193d565b6001600160a01b03161461300d5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610bb4565b6001600160a01b03821661306f5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610bb4565b61307a600082612e4d565b6001600160a01b03831660009081526068602052604081208054600192906130a39084906159d5565b90915550506001600160a01b03821660009081526068602052604081208054600192906130d190849061591a565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b61313c8282614144565b600082815260fb60205260409020610fc990826141ca565b61315e82826141df565b600082815260fb60205260409020610fc99082614246565b600060015b6000838152610134602052604090206006015460ff1660038111156131b057634e487b7160e01b600052602160045260246000fd5b1492915050565b600083815261013460205260408120546001600160401b03600160881b8204811692600160481b90920416905b8463ffffffff168161ffff1610156133bc576000826001600160401b03161161324f5760405162461bcd60e51b815260206004820152601960248201527f626c75657072696e74206f7574206f66206361706163697479000000000000006044820152606401610bb4565b61326f8461326161ffff8416866158ef565b6001600160801b031661425b565b85610132600061328361ffff8516876158ef565b6001600160801b03168152602001908152602001600020819055506000434241856040516020016132e79493929190938452602084019290925260601b6001600160601b031916604083015260c01b6001600160c01b0319166054820152605c0190565b60408051601f19818403018152918152815160209283012060008a81526101349093529120600201549091507fbe53bef0e08aa61aa51091a6fa77b4a68c6da179f64097fa01f92beda583eecc9088906001600160a01b03168761334f61ffff8716896158ef565b604080519485526001600160a01b03938416602086015291909216908301526001600160801b031660608201526001600160401b038516608082015260a0810183905260c00160405180910390a16133a683615a54565b92505080806133b490615ab2565b9150506131e4565b50600085815261013460205260409020805463ffffffff861691906011906133f5908490600160881b90046001600160401b0316615951565b82546101009290920a6001600160401b0381810219909316918316021790915560009687526101346020526040909620805467ffffffffffffffff60481b1916600160481b939097169290920295909517905550505050565b6000600261317b565b6001600160e01b031980821614156134b15760405162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e74657266616365206964000000006044820152606401610bb4565b6001600160e01b0319166000908152609760205260409020805460ff19166001179055565b6000816135195760405162461bcd60e51b81526020600482015260116024820152701b9bc81c1c9bdbd9881c1c9bdd9a591959607a1b6044820152606401610bb4565b600085815261013460209081526040808320338452600b0190915290205460ff16156135795760405162461bcd60e51b815260206004820152600f60248201526e185b1c9958591e4818db185a5b5959608a1b6044820152606401610bb4565b600085815261013460205260409020600501546136106135d633876040516001600160601b0319606084901b1660208201526034810182905260009060540160405160208183030381529060405280519060200120905092915050565b8286868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061439d92505050565b9695505050505050565b60008481526101346020526040902060038101546001909101546001600160a01b0390911690600160401b90046001600160801b03168161371b5783156136a35760405162461bcd60e51b815260206004820152601b60248201527f63616e6e6f74207370656369667920746f6b656e20616d6f756e7400000000006044820152606401610bb4565b6136b38163ffffffff8716615987565b6001600160801b0316341461370a5760405162461bcd60e51b815260206004820181905260248201527f507572636861736520616d6f756e74206d757374206d617463682070726963656044820152606401610bb4565b613716868334866143aa565b6129c8565b34156137695760405162461bcd60e51b815260206004820152601960248201527f63616e6e6f7420737065636966792065746820616d6f756e74000000000000006044820152606401610bb4565b6137798163ffffffff8716615987565b6001600160801b031684146137d05760405162461bcd60e51b815260206004820181905260248201527f507572636861736520616d6f756e74206d757374206d617463682070726963656044820152606401610bb4565b6040516323b872dd60e01b8152336004820152306024820152604481018590526001600160a01b038316906323b872dd90606401602060405180830381600087803b15801561381e57600080fd5b505af1158015613832573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138569190614f55565b506129c8868386866143aa565b61386d8787614484565b600087815261013460209081526040909120865161389392600490920191880190614991565b5083156138b0576000878152610134602052604090206005018490555b600087815261013460205260409020805468ffffffffffffffff00191661010063ffffffff8681169190910268ffffffff0000000000191691909117600160281b85831602179091558116156129c657600087815261013460205260409020600101805467ffffffffffffffff191663ffffffff831617905550505050505050565b600082815261013460205260409020600681018054600160ff1990911617905561012d8054825467ffffffffffffffff60881b1916600160601b918290046001600160401b03908116600160881b0291909117938490558254600160481b909404811693849392600c926139aa928692900416615951565b92506101000a8154816001600160401b0302191690836001600160401b0316021790555061012e60008154809291906139e290615ad4565b90915550506000838152610134602052604090819020600281015491517f97660d9bc329402e809d4aabb7261513a7d331d8762d407be7e3316d08d188fd926119159287926001600160a01b0390921691869188916004909101906157a2565b60006120bc83836144c4565b816001600160a01b0316836001600160a01b03161415613ab05760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610bb4565b6001600160a01b038381166000818152606a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b613b28848484612f92565b613b34848484846144fc565b610e1d5760405162461bcd60e51b8152600401610bb4906155d5565b6000818152610132602090815260408083205483526101349091529020600401805460609190613b7f90615a77565b80601f0160208091040260200160405190810160405280929190818152602001828054613bab90615a77565b80156110b95780601f10613bcd576101008083540402835291602001916110b9565b820191906000526020600020905b815481529060010190602001808311613bdb5750939695505050505050565b606081613c1e5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115613c485780613c3281615ad4565b9150613c419050600a83615973565b9150613c22565b6000816001600160401b03811115613c7057634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015613c9a576020820181803683370190505b5090505b8415612f8a57613caf6001836159d5565b9150613cbc600a86615aef565b613cc790603061591a565b60f81b818381518110613cea57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350613d0c600a86615973565b9450613c9e565b600082516000141580613d265750815115155b15613e2c578151835114613d7c5760405162461bcd60e51b815260206004820152601b60248201527f6d69736d61746368656420726563697069656e747320262042707300000000006044820152606401610bb4565b6000805b8351811015613dd057838181518110613da957634e487b7160e01b600052603260045260246000fd5b602002602001015182613dbc9190615932565b915080613dc881615ad4565b915050613d80565b506127108163ffffffff161115613e225760405162461bcd60e51b81526020600482015260166024820152754665652042707320657863656564206d6178696d756d60501b6044820152606401610bb4565b6001915050610c8b565b50600092915050565b6000610c8b825490565b60606000613e4e8360026159b6565b613e5990600261591a565b6001600160401b03811115613e7e57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015613ea8576020820181803683370190505b509050600360fc1b81600081518110613ed157634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613f0e57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000613f328460026159b6565b613f3d90600161591a565b90505b6001811115613fd1576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110613f7f57634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110613fa357634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93613fca81615a3d565b9050613f40565b5083156120bc5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610bb4565b60006001600160e01b03198216637965db0b60e01b1480610c8b5750610c8b82612cf7565b600054610100900460ff168061405e575060005460ff16155b61407a5760405162461bcd60e51b8152600401610bb490615627565b600054610100900460ff16158015611d64576000805461ffff19166101011790558015611d76576000805461ff001916905550565b600054610100900460ff16806140c8575060005460ff16155b6140e45760405162461bcd60e51b8152600401610bb490615627565b600054610100900460ff16158015614106576000805461ffff19166101011790555b8251614119906065906020860190614991565b50815161412d906066906020850190614991565b508015610fc9576000805461ff0019169055505050565b61414e82826120c3565b6115e457600082815260c9602090815260408083206001600160a01b03851684529091529020805460ff191660011790556141863390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006120bc836001600160a01b038416614606565b6141e982826120c3565b156115e457600082815260c9602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60006120bc836001600160a01b038416614655565b6001600160a01b0382166142b15760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610bb4565b6000818152606760205260409020546001600160a01b0316156143165760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610bb4565b6001600160a01b038216600090815260686020526040812080546001929061433f90849061591a565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000612f8a828486614772565b60006143b585610fce565b905060006143c286612ad2565b90506000805b835181101561445d57600061440a878584815181106143f757634e487b7160e01b600052603260045260246000fd5b602002602001015163ffffffff16614788565b9050614416818461591a565b925061444a85838151811061443b57634e487b7160e01b600052603260045260246000fd5b602002602001015189836147a1565b508061445581615ad4565b9150506143c8565b50600061446a82876159d5565b11156129c6576129c6848761447f84896159d5565b6147a1565b6001600160a01b038116156115e45760008281526101346020526040902060030180546001600160a01b0383166001600160a01b03199091161790555050565b60008260000182815481106144e957634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b60006001600160a01b0384163b156145fe57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061454090339089908890889060040161545d565b602060405180830381600087803b15801561455a57600080fd5b505af192505050801561458a575060408051601f3d908101601f1916820190925261458791810190614fea565b60015b6145e4573d8080156145b8576040519150601f19603f3d011682016040523d82523d6000602084013e6145bd565b606091505b5080516145dc5760405162461bcd60e51b8152600401610bb4906155d5565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612f8a565b506001612f8a565b600081815260018301602052604081205461464d57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610c8b565b506000610c8b565b600081815260018301602052604081205480156147685760006146796001836159d5565b855490915060009061468d906001906159d5565b905081811461470e5760008660000182815481106146bb57634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050808760000184815481106146ec57634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255918252600188019052604090208390555b855486908061472d57634e487b7160e01b600052603160045260246000fd5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610c8b565b6000915050610c8b565b60008261477f85846148d7565b14949350505050565b600061271061479783856159b6565b6120bc9190615973565b6001600160a01b038216156148325760405163a9059cbb60e01b81526001600160a01b0384811660048301526024820183905283169063a9059cbb90604401602060405180830381600087803b1580156147fa57600080fd5b505af115801561480e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e1d9190614f55565b6000836001600160a01b031682614e2090604051600060405180830381858888f193505050503d8060008114614884576040519150601f19603f3d011682016040523d82523d6000602084013e614889565b606091505b5050905080610e1d576001600160a01b038416600090815261013360205260409020546148b790839061591a565b6001600160a01b0385166000908152610133602052604090205550505050565b600081815b845181101561498957600085828151811061490757634e487b7160e01b600052603260045260246000fd5b60200260200101519050808311614949576040805160208101859052908101829052606001604051602081830303815290604052805190602001209250614976565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b508061498181615ad4565b9150506148dc565b509392505050565b82805461499d90615a77565b90600052602060002090601f0160209004810192826149bf5760008555614a05565b82601f106149d857805160ff1916838001178555614a05565b82800160010185558215614a05579182015b82811115614a055782518255916020019190600101906149ea565b50614a11929150614b10565b5090565b828054828255906000526020600020908101928215614a05579160200282015b82811115614a0557825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190614a35565b82805482825590600052602060002090600701600890048101928215614a055791602002820160005b83821115614ad757835183826101000a81548163ffffffff021916908363ffffffff1602179055509260200192600401602081600301049283019260010302614a93565b8015614b075782816101000a81549063ffffffff0219169055600401602081600301049283019260010302614ad7565b5050614a119291505b5b80821115614a115760008155600101614b11565b60006001600160401b03831115614b3e57614b3e615b2f565b614b51601f8401601f191660200161589c565b9050828152838383011115614b6557600080fd5b828260208301376000602084830101529392505050565b80356110c581615b45565b600082601f830112614b97578081fd5b81356020614bac614ba7836158cc565b61589c565b80838252828201915082860187848660051b8901011115614bcb578586fd5b855b85811015614bf2578135614be081615b45565b84529284019290840190600101614bcd565b5090979650505050505050565b60008083601f840112614c10578182fd5b5081356001600160401b03811115614c26578182fd5b6020830191508360208260051b8501011115614c4157600080fd5b9250929050565b600082601f830112614c58578081fd5b81356020614c68614ba7836158cc565b80838252828201915082860187848660051b8901011115614c87578586fd5b855b85811015614bf257614c9a82614ce2565b84529284019290840190600101614c89565b600082601f830112614cbc578081fd5b6120bc83833560208501614b25565b80356001600160801b03811681146110c557600080fd5b803563ffffffff811681146110c557600080fd5b80356001600160401b03811681146110c557600080fd5b600060208284031215614d1e578081fd5b81356120bc81615b45565b60008060408385031215614d3b578081fd5b8235614d4681615b45565b91506020830135614d5681615b45565b809150509250929050565b600080600060608486031215614d75578081fd5b8335614d8081615b45565b92506020840135614d9081615b45565b929592945050506040919091013590565b60008060008060808587031215614db6578081fd5b8435614dc181615b45565b93506020850135614dd181615b45565b92506040850135915060608501356001600160401b03811115614df2578182fd5b8501601f81018713614e02578182fd5b614e1187823560208401614b25565b91505092959194509250565b60008060408385031215614e2f578182fd5b8235614e3a81615b45565b91506020830135614d5681615b5a565b60008060408385031215614e5c578182fd5b8235614e6781615b45565b946020939093013593505050565b6000806000806000806000806000806101408b8d031215614e94578788fd5b614e9d8b614b7c565b9950614eab60208c01614cf6565b9850614eb960408c01614ccb565b9750614ec760608c01614b7c565b965060808b01356001600160401b0380821115614ee2578788fd5b614eee8e838f01614cac565b975060a08d0135915080821115614f03578687fd5b50614f108d828e01614cac565b95505060c08b01359350614f2660e08c01614ce2565b9250614f356101008c01614ce2565b9150614f446101208c01614ce2565b90509295989b9194979a5092959850565b600060208284031215614f66578081fd5b81516120bc81615b5a565b600060208284031215614f82578081fd5b5035919050565b60008060408385031215614f9b578182fd5b823591506020830135614d5681615b45565b60008060408385031215614fbf578182fd5b50508035926020909101359150565b600060208284031215614fdf578081fd5b81356120bc81615b68565b600060208284031215614ffb578081fd5b81516120bc81615b68565b60008060006060848603121561501a578081fd5b83356001600160401b0380821115615030578283fd5b61503c87838801614cac565b94506020860135915080821115615051578283fd5b5061505e86828701614cac565b925050604084013561506f81615b45565b809150509250925092565b600080600080600060a08688031215615091578283fd5b8535945060208601356001600160401b03808211156150ae578485fd5b6150ba89838a01614b87565b955060408801359150808211156150cf578485fd5b6150db89838a01614c48565b945060608801359150808211156150f0578283fd5b6150fc89838a01614b87565b93506080880135915080821115615111578283fd5b5061511e88828901614c48565b9150509295509295909350565b6000806040838503121561513d578182fd5b8235915060208301356001600160401b03811115615159578182fd5b61516585828601614cac565b9150509250929050565b600080600080600080600060e0888a031215615189578081fd5b8735965061519960208901614ccb565b95506151a760408901614ce2565b94506151b560608901614ce2565b93506151c360808901614ce2565b92506151d160a08901614cf6565b915060c0880135905092959891949750929550565b600080604083850312156151f8578182fd5b8235915061520860208401614ce2565b90509250929050565b600080600080600060808688031215615228578283fd5b8535945061523860208701614ce2565b93506040860135925060608601356001600160401b03811115615259578182fd5b61526588828901614bff565b969995985093965092949392505050565b60008060008060008060a0878903121561528e578384fd5b8635955061529e60208801614ce2565b94506040870135935060608701356001600160401b038111156152bf578283fd5b6152cb89828a01614bff565b90945092505060808701356152df81615b45565b809150509295509295509295565b600080600060608486031215615301578081fd5b8335925061531160208501614cf6565b915061531f60408501614cf6565b90509250925092565b600060208284031215615339578081fd5b6120bc82614ce2565b6000815180845261535a816020860160208601615a11565b601f01601f19169290920160200192915050565b6004811061538c57634e487b7160e01b600052602160045260246000fd5b9052565b600083516153a2818460208801615a11565b8083019050602f60f81b80825284516153c2816001850160208901615a11565b6001920191820152693a37b5b2b7173539b7b760b11b6002820152600c01949350505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351615420816017850160208801615a11565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351615451816028840160208801615a11565b01602801949350505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061361090830184615342565b6020808252825182820181905260009190848201906040850190845b818110156154d15783516001600160a01b0316835292840192918401916001016154ac565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b818110156154d157835163ffffffff16835292840192918401916001016154f9565b8c1515815263ffffffff8c811660208301528b1660408201526001600160401b038a811660608301528981166080830152881660a08201526001600160801b03871660c082015260006101806001600160a01b03881660e08401526001600160a01b0387166101008401528061012084015261559981840187615342565b915050836101408301526155b161016083018461536e565b9d9c50505050505050505050505050565b6020815260006120bc6020830184615342565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b602080825260169082015275189b1d595c1c9a5b9d081b9bdd081c1c995c185c995960521b604082015260600190565b60208082526038908201527f757365722063616e6e6f7420627579206d6f7265207468616e206d617850757260408201527f6368617365416d6f756e7420696e2073696e676c652074780000000000000000606082015260800190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252602f908201527f70757263686173652063616e6e6f742062652063616c6c65642066726f6d206160408201526e1b9bdd1a195c8818dbdb9d1c9858dd608a1b606082015260800190565b8581526000602060018060a01b038716818401526001600160401b038616604084015260a060608401526157d960a0840186615342565b838103608085015284548390600181811c90808316806157fa57607f831692505b86831081141561581857634e487b7160e01b88526022600452602488fd5b828652602086019550808015615835576001811461584657615870565b60ff19851687528787019550615870565b60008b815260209020895b8581101561586a57815489820152908401908901615851565b88019650505b50939d9c50505050505050505050505050565b828152604060208201526000612f8a6040830184615342565b604051601f8201601f191681016001600160401b03811182821017156158c4576158c4615b2f565b604052919050565b60006001600160401b038211156158e5576158e5615b2f565b5060051b60200190565b60006001600160801b0380831681851680830382111561591157615911615b03565b01949350505050565b6000821982111561592d5761592d615b03565b500190565b600063ffffffff80831681851680830382111561591157615911615b03565b60006001600160401b0380831681851680830382111561591157615911615b03565b60008261598257615982615b19565b500490565b60006001600160801b03808316818516818304811182151516156159ad576159ad615b03565b02949350505050565b60008160001904831182151516156159d0576159d0615b03565b500290565b6000828210156159e7576159e7615b03565b500390565b600063ffffffff83811690831681811015615a0957615a09615b03565b039392505050565b60005b83811015615a2c578181015183820152602001615a14565b83811115610e1d5750506000910152565b600081615a4c57615a4c615b03565b506000190190565b60006001600160401b03821680615a6d57615a6d615b03565b6000190192915050565b600181811c90821680615a8b57607f821691505b60208210811415615aac57634e487b7160e01b600052602260045260246000fd5b50919050565b600061ffff80831681811415615aca57615aca615b03565b6001019392505050565b6000600019821415615ae857615ae8615b03565b5060010190565b600082615afe57615afe615b19565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114611d7657600080fd5b8015158114611d7657600080fd5b6001600160e01b031981168114611d7657600080fdfe9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6a2646970667358221220826f886a99a41e1716b73a922995a9ea7bfb95aa0c13147602d512cf302c9cd664736f6c63430008040033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.