Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
PropsERC1155UCreatorRoyalties
Compiler Version
v0.8.13+commit.abaa5c0e
Optimization Enabled:
Yes with 1 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: Apache 2.0 pragma solidity ^0.8.4; // ========== External imports ========== import "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155SupplyUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155BurnableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/interfaces/IERC2981Upgradeable.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@thirdweb-dev/contracts/openzeppelin-presets/metatx/ERC2771ContextUpgradeable.sol"; import "@thirdweb-dev/contracts/feature/interface/IOwnable.sol"; // ========== Internal imports ========== import "../interfaces/IAllowlist.sol"; import "../interfaces/IPropsContract.sol"; import "../interfaces/IPropsCreatorConfig.sol"; import {DefaultOperatorFiltererUpgradeable} from "./opensea/DefaultOperatorFiltererUpgradeable.sol"; contract PropsERC1155UCreatorRoyalties is Initializable, IOwnable, IAllowlist, IPropsContract, ReentrancyGuardUpgradeable, PausableUpgradeable, ERC2771ContextUpgradeable, DefaultOperatorFiltererUpgradeable, AccessControlEnumerableUpgradeable, ERC1155Upgradeable, ERC1155SupplyUpgradeable, ERC1155BurnableUpgradeable, ERC2981 { using StringsUpgradeable for uint256; ////////////////////////////////////////////// // State Vars ///////////////////////////////////////////// bytes32 private constant MODULE_TYPE = bytes32("PropsERC1155UCreatorRoyalties"); uint256 private constant VERSION = 4; mapping(address => uint256) public minted; mapping(address => mapping(uint256 => uint256)) public mintedByAllowlist; bytes32 private constant CONTRACT_ADMIN_ROLE = keccak256("CONTRACT_ADMIN_ROLE"); bytes32 private constant PRODUCER_ROLE = keccak256("PRODUCER_ROLE"); // @dev reserving space for 10 more roles bytes32[32] private __gap; string public contractURI; address private _owner; address public configContract; address[] private trustedForwarders; Allowlists public allowlists; mapping(string => bool) internal nonces; ////////////////////////////////////////////// // Errors ///////////////////////////////////////////// error InsufficientFunds(); ////////////////////////////////////////////// // Events ///////////////////////////////////////////// event Minted(address indexed account, string tokens); ////////////////////////////////////////////// // Extras ///////////////////////////////////////////// mapping(string => uint256) internal tokenConfigurations; ////////////////////////////////////////////// // Init ///////////////////////////////////////////// function initialize( address _defaultAdmin, address[] memory _trustedForwarders ) public initializer { __ReentrancyGuard_init(); __ERC2771Context_init(_trustedForwarders); __ERC1155_init(""); _owner = _defaultAdmin; _setupRole(DEFAULT_ADMIN_ROLE, _defaultAdmin); _setRoleAdmin(CONTRACT_ADMIN_ROLE, DEFAULT_ADMIN_ROLE); _setRoleAdmin(PRODUCER_ROLE, CONTRACT_ADMIN_ROLE); } /*/////////////////////////////////////////////////////////////// Generic contract logic //////////////////////////////////////////////////////////////*/ /// @dev Returns the type of the contract. function contractType() external pure returns (bytes32) { return MODULE_TYPE; } /// @dev Returns the version of the contract. function contractVersion() external pure returns (uint8) { return uint8(VERSION); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /*/////////////////////////////////////////////////////////////// ERC 165 / 1155 logic //////////////////////////////////////////////////////////////*/ /** * @dev see {IERC721Metadata} */ function uri(uint256 _tokenId) public view virtual override returns (string memory) { require(totalSupply(_tokenId) > 0, "U"); return IPropsCreatorConfig(configContract).getTokenURI(_tokenId); } function createAndMint(IPropsCreatorConfig.ERC1155Token[] memory _token, IPropsCreatorConfig.Split[] memory _primarySplit, IPropsCreatorConfig.Split[] memory _royaltySplit, IPropsCreatorConfig.CreateMintConfig[] memory _config) external payable nonReentrant whenNotPaused { require(!IPropsCreatorConfig(configContract).isSanctioned(_msgSender()), "S"); IPropsCreatorConfig.MintCart memory cart; //@dev beta check only, downgrading this post beta unchecked { IPropsCreatorConfig.betaCheck memory betaCheck; for (uint256 t = 1; t <= 10; t++) { betaCheck.betaMints += totalSupply(t); } for (uint256 i = 0; i < _token.length; i++) { betaCheck.cartMints += _config[i]._quantity; } require(betaCheck.betaMints + betaCheck.cartMints <= 1000, "Q1"); } //end beta check unchecked { for (uint256 i = 0; i < _token.length; i++) { require(!nonces[_config[i]._nonce], "N"); nonces[_config[i]._nonce] = true; uint256 lineItemCost = _config[i]._price * _config[i]._quantity; cart._cost += lineItemCost; if (cart._cost > msg.value) revert InsufficientFunds(); string memory tokenCheck; string memory primaryCheck; string memory royaltyCheck; (tokenCheck, primaryCheck, royaltyCheck) = IPropsCreatorConfig(configContract).getCreationCheck(_token[i], _primarySplit[i], _royaltySplit[i]); IPropsCreatorConfig.SignatureRequest memory signatureRequest = IPropsCreatorConfig.SignatureRequest({tokenCheck: tokenCheck, primaryCheck: primaryCheck, royaltyCheck: royaltyCheck, configuration: _config[i]._configuration, quantity: _config[i]._quantity, price: _config[i]._price, nonce: _config[i]._nonce, issuedOn: _config[i]._issuedOn, signature: _config[i]._signature}); IPropsCreatorConfig(configContract).revertOnUnauthorizedSignature(signatureRequest); uint256 existingConfigTokenId = tokenConfigurations[_config[i]._configuration]; if(existingConfigTokenId > 0){ _token[i] = IPropsCreatorConfig(configContract).getToken(existingConfigTokenId); } else{ _token[i] = IPropsCreatorConfig(configContract).upsertToken(_token[i], _primarySplit[i], _royaltySplit[i], true); tokenConfigurations[_config[i]._configuration] = _token[i].tokenId; } payable(IPropsCreatorConfig(configContract).getToken(_token[i].tokenId).primaryReceiver).transfer(lineItemCost); cart._tokensMinted = string( abi.encodePacked( cart._tokensMinted, _token[i].tokenId.toString(), "|*|", _config[i]._configuration, "|*|", existingConfigTokenId > 0 ? "false" : "true", "|**|" ) ); _mint(_msgSender(), _token[i].tokenId, _config[i]._quantity, ""); } } emit Minted(_msgSender(), cart._tokensMinted); } function mint( uint256[] calldata _quantities, bytes32[][] calldata _proofs, uint256[] calldata _allotments, uint256[] calldata _allowlistIds ) external payable nonReentrant whenNotPaused{ require(IPropsCreatorConfig(configContract).isValidMinter(_msgSender(), _allowlistIds)); IPropsCreatorConfig.MintCart memory cart; unchecked { for (uint256 i; i < _quantities.length; i++) { cart._quantity += _quantities[i]; IPropsCreatorConfig.AllocationCheck memory allocationCheck = IPropsCreatorConfig.AllocationCheck({allowlist: allowlists.lists[_allowlistIds[i]], _address:_msgSender(), _minted: mintedByAllowlist[_msgSender()][_allowlistIds[i]], _quantity: _quantities[i], _alloted: _allotments[i], _proof:_proofs[i]}); IPropsCreatorConfig(configContract).revertOnAllocationCheckFailure(allocationCheck); uint256 lineItemCost = allowlists.lists[_allowlistIds[i]].price * _quantities[i]; cart._cost += lineItemCost; payable(IPropsCreatorConfig(configContract).getToken(allowlists.lists[_allowlistIds[i]].tokenPool).primaryReceiver).transfer(lineItemCost); } } if (cart._cost > msg.value) revert InsufficientFunds(); unchecked { for (uint256 i; i < _quantities.length; i++) { mintedByAllowlist[address(_msgSender())][ _allowlistIds[i] ] += _quantities[i]; cart._tokensMinted = string( abi.encodePacked( cart._tokensMinted, allowlists.lists[_allowlistIds[i]].tokenPool.toString(), "," ) ); _mint(_msgSender(), allowlists .lists[_allowlistIds[i]] .tokenPool, _quantities[i], ""); } } emit Minted(_msgSender(), cart._tokensMinted); } /*/////////////////////////////////////////////////////////////// Allowlist Logic //////////////////////////////////////////////////////////////*/ function updateAllowlistByIndex(Allowlist calldata _allowlist, uint256 i) external { require(hasMinRole(PRODUCER_ROLE)); allowlists.lists[i] = _allowlist; } function addAllowlist(Allowlist calldata _allowlist) external { require(hasMinRole(PRODUCER_ROLE)); allowlists.lists[allowlists.count] = _allowlist; allowlists.count++; } /*/////////////////////////////////////////////////////////////// Getters //////////////////////////////////////////////////////////////*/ /// @dev Returns the allowlist at the given uid. function getAllowlistById(uint256 _allowlistId) external view returns (Allowlist memory allowlist) { allowlist = allowlists.lists[_allowlistId]; } /// @dev Returns the number of minted tokens for sender by allowlist. function getMintedByAllowlist(uint256 _allowlistId) external view returns (uint256 minted_) { minted_ = mintedByAllowlist[_msgSender()][_allowlistId]; } /*/////////////////////////////////////////////////////////////// Setters //////////////////////////////////////////////////////////////*/ function setTokenRoyalty(uint256 _tokenId, address _royaltyReceiver, uint96 _royaltyPercentage) external { require(_msgSender() == configContract, "A"); _setTokenRoyalty(_tokenId, _royaltyReceiver, _royaltyPercentage); } function setInternals(address _configContract, bool pause) external { require(hasMinRole(CONTRACT_ADMIN_ROLE)); configContract = _configContract; if(pause && !paused()) _pause(); if(!pause && paused()) _unpause(); } /// @dev Lets a contract admin set the URI for contract-level metadata. function setContractURI(string calldata _uri) external { require(hasMinRole(CONTRACT_ADMIN_ROLE)); contractURI = _uri; } /// @dev Lets a contract admin set a new owner for the contract. The new owner must be a contract admin. function setOwner(address _newOwner) external onlyRole(DEFAULT_ADMIN_ROLE) { require(hasRole(DEFAULT_ADMIN_ROLE, _newOwner), "A"); address _prevOwner = _owner; _owner = _newOwner; emit OwnerUpdated(_prevOwner, _newOwner); } /*/////////////////////////////////////////////////////////////// Miscellaneous / Overrides //////////////////////////////////////////////////////////////*/ function grantRole(bytes32 role, address account) public virtual override(AccessControlUpgradeable, IAccessControlUpgradeable) { require(hasMinRole(CONTRACT_ADMIN_ROLE)); super._grantRole(role, account); } function revokeRole(bytes32 role, address account) public virtual override(AccessControlUpgradeable, IAccessControlUpgradeable) { require(hasMinRole(CONTRACT_ADMIN_ROLE)); super._revokeRole(role, account); } function hasMinRole(bytes32 _role) public view virtual returns (bool) { // @dev does account have role? if (hasRole(_role, _msgSender())) return true; // @dev are we checking against default admin? if (_role == DEFAULT_ADMIN_ROLE) return false; // @dev walk up tree to check if user has role admin role return hasMinRole(getRoleAdmin(_role)); } function _msgSender() internal view virtual override(ContextUpgradeable, ERC2771ContextUpgradeable) returns (address sender) { return ERC2771ContextUpgradeable._msgSender(); } function _msgData() internal view virtual override(ContextUpgradeable, ERC2771ContextUpgradeable) returns (bytes calldata) { return ERC2771ContextUpgradeable._msgData(); } /** * @dev see {IERC165-supportsInterface} */ function supportsInterface(bytes4 interfaceId) public view virtual override( AccessControlEnumerableUpgradeable, ERC1155Upgradeable, ERC2981 ) returns (bool) { return super.supportsInterface(interfaceId) || type(IERC1155Upgradeable).interfaceId == interfaceId || type(IERC2981Upgradeable).interfaceId == interfaceId; } /// @dev See {ERC721-_beforeTokenTransfer}. function _beforeTokenTransfer(address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) internal virtual override(ERC1155Upgradeable, ERC1155SupplyUpgradeable) { require(!IPropsCreatorConfig(configContract).isSanctioned(to), "S"); IPropsCreatorConfig(configContract).updateOwnership(from, to, ids, amounts); super._beforeTokenTransfer(operator, from, to, ids, amounts, data); } function setApprovalForAll(address operator, bool approved) public override { require(onlyAllowedOperatorApproval(operator), "O"); super.setApprovalForAll(operator, approved); } function safeTransferFrom(address from, address to, uint256 tokenId, uint256 amount, bytes memory data) public override { require(onlyAllowedOperatorApproval(from), "O"); super.safeTransferFrom(from, to, tokenId, amount, data); } function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override { require(onlyAllowedOperatorApproval(from), "O"); super.safeBatchTransferFrom(from, to, ids, amounts, data); } function totalBalanceOf(address owner) public view returns (uint256){ return IPropsCreatorConfig(configContract).balanceOf(owner); } function tokenOfOwnerByIndex(address owner, uint256 index) public view returns (uint256) { return IPropsCreatorConfig(configContract).tokenOfOwnerByIndex(owner, index); } function name() public view returns (string memory) { return "RSTLSS"; } function symbol() public view returns (string memory) { return "RSTLSS"; } uint256[48] private ___gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC1155/ERC1155.sol) pragma solidity ^0.8.0; import "./IERC1155Upgradeable.sol"; import "./IERC1155ReceiverUpgradeable.sol"; import "./extensions/IERC1155MetadataURIUpgradeable.sol"; import "../../utils/AddressUpgradeable.sol"; import "../../utils/ContextUpgradeable.sol"; import "../../utils/introspection/ERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */ contract ERC1155Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC1155Upgradeable, IERC1155MetadataURIUpgradeable { using AddressUpgradeable for address; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json string private _uri; /** * @dev See {_setURI}. */ function __ERC1155_init(string memory uri_) internal onlyInitializing { __ERC1155_init_unchained(uri_); } function __ERC1155_init_unchained(string memory uri_) internal onlyInitializing { _setURI(uri_); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) { return interfaceId == type(IERC1155Upgradeable).interfaceId || interfaceId == type(IERC1155MetadataURIUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256) public view virtual override returns (string memory) { return _uri; } /** * @dev See {IERC1155-balanceOf}. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) public view virtual override returns (uint256) { require(account != address(0), "ERC1155: address zero is not a valid owner"); return _balances[id][account]; } /** * @dev See {IERC1155-balanceOfBatch}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] memory accounts, uint256[] memory ids) public view virtual override returns (uint256[] memory) { require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch"); uint256[] memory batchBalances = new uint256[](accounts.length); for (uint256 i = 0; i < accounts.length; ++i) { batchBalances[i] = balanceOf(accounts[i], ids[i]); } return batchBalances; } /** * @dev See {IERC1155-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view virtual override returns (bool) { return _operatorApprovals[account][operator]; } /** * @dev See {IERC1155-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not token owner or approved" ); _safeTransferFrom(from, to, id, amount, data); } /** * @dev See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not token owner or approved" ); _safeBatchTransferFrom(from, to, ids, amounts, data); } /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, from, to, ids, amounts, data); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; emit TransferSingle(operator, from, to, id, amount); _afterTokenTransfer(operator, from, to, ids, amounts, data); _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, ids, amounts, data); for (uint256 i = 0; i < ids.length; ++i) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; } emit TransferBatch(operator, from, to, ids, amounts); _afterTokenTransfer(operator, from, to, ids, amounts, data); _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data); } /** * @dev Sets a new URI for all token types, by relying on the token type ID * substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * By this mechanism, any occurrence of the `\{id\}` substring in either the * URI or any of the amounts in the JSON file at said URI will be replaced by * clients with the token type ID. * * For example, the `https://token-cdn-domain/\{id\}.json` URI would be * interpreted by clients as * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json` * for token type ID 0x4cce0. * * See {uri}. * * Because these URIs cannot be meaningfully represented by the {URI} event, * this function emits no events. */ function _setURI(string memory newuri) internal virtual { _uri = newuri; } /** * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint( address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); _balances[id][to] += amount; emit TransferSingle(operator, address(0), to, id, amount); _afterTokenTransfer(operator, address(0), to, ids, amounts, data); _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _mintBatch( address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); for (uint256 i = 0; i < ids.length; i++) { _balances[ids[i]][to] += amounts[i]; } emit TransferBatch(operator, address(0), to, ids, amounts); _afterTokenTransfer(operator, address(0), to, ids, amounts, data); _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data); } /** * @dev Destroys `amount` tokens of token type `id` from `from` * * Emits a {TransferSingle} event. * * Requirements: * * - `from` cannot be the zero address. * - `from` must have at least `amount` tokens of token type `id`. */ function _burn( address from, uint256 id, uint256 amount ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } emit TransferSingle(operator, from, address(0), id, amount); _afterTokenTransfer(operator, from, address(0), ids, amounts, ""); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. */ function _burnBatch( address from, uint256[] memory ids, uint256[] memory amounts ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); for (uint256 i = 0; i < ids.length; i++) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } } emit TransferBatch(operator, from, address(0), ids, amounts); _afterTokenTransfer(operator, from, address(0), ids, amounts, ""); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC1155: setting approval status for self"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Hook that is called before any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `ids` and `amounts` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} /** * @dev Hook that is called after any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `id` and `amount` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 amount, bytes memory data ) private { if (to.isContract()) { try IERC1155ReceiverUpgradeable(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) { if (response != IERC1155ReceiverUpgradeable.onERC1155Received.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non-ERC1155Receiver implementer"); } } } function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) private { if (to.isContract()) { try IERC1155ReceiverUpgradeable(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns ( bytes4 response ) { if (response != IERC1155ReceiverUpgradeable.onERC1155BatchReceived.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non-ERC1155Receiver implementer"); } } } function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) { uint256[] memory array = new uint256[](1); array[0] = element; return array; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[47] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165Upgradeable.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155Upgradeable is IERC165Upgradeable { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC1155/extensions/ERC1155Supply.sol) pragma solidity ^0.8.0; import "../ERC1155Upgradeable.sol"; import "../../../proxy/utils/Initializable.sol"; /** * @dev Extension of ERC1155 that adds tracking of total supply per id. * * Useful for scenarios where Fungible and Non-fungible tokens have to be * clearly identified. Note: While a totalSupply of 1 might mean the * corresponding is an NFT, there is no guarantees that no other token with the * same id are not going to be minted. */ abstract contract ERC1155SupplyUpgradeable is Initializable, ERC1155Upgradeable { function __ERC1155Supply_init() internal onlyInitializing { } function __ERC1155Supply_init_unchained() internal onlyInitializing { } mapping(uint256 => uint256) private _totalSupply; /** * @dev Total amount of tokens in with a given id. */ function totalSupply(uint256 id) public view virtual returns (uint256) { return _totalSupply[id]; } /** * @dev Indicates whether any token exist with a given id, or not. */ function exists(uint256 id) public view virtual returns (bool) { return ERC1155SupplyUpgradeable.totalSupply(id) > 0; } /** * @dev See {ERC1155-_beforeTokenTransfer}. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override { super._beforeTokenTransfer(operator, from, to, ids, amounts, data); if (from == address(0)) { for (uint256 i = 0; i < ids.length; ++i) { _totalSupply[ids[i]] += amounts[i]; } } if (to == address(0)) { for (uint256 i = 0; i < ids.length; ++i) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 supply = _totalSupply[id]; require(supply >= amount, "ERC1155: burn amount exceeds totalSupply"); unchecked { _totalSupply[id] = supply - amount; } } } } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC1155/extensions/ERC1155Burnable.sol) pragma solidity ^0.8.0; import "../ERC1155Upgradeable.sol"; import "../../../proxy/utils/Initializable.sol"; /** * @dev Extension of {ERC1155} that allows token holders to destroy both their * own tokens and those that they have been approved to use. * * _Available since v3.1._ */ abstract contract ERC1155BurnableUpgradeable is Initializable, ERC1155Upgradeable { function __ERC1155Burnable_init() internal onlyInitializing { } function __ERC1155Burnable_init_unchained() internal onlyInitializing { } function burn( address account, uint256 id, uint256 value ) public virtual { require( account == _msgSender() || isApprovedForAll(account, _msgSender()), "ERC1155: caller is not token owner or approved" ); _burn(account, id, value); } function burnBatch( address account, uint256[] memory ids, uint256[] memory values ) public virtual { require( account == _msgSender() || isApprovedForAll(account, _msgSender()), "ERC1155: caller is not token owner or approved" ); _burnBatch(account, ids, values); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.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 onlyInitializing { } function __AccessControlEnumerable_init_unchained() internal onlyInitializing { } 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 virtual 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 virtual 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); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuardUpgradeable is Initializable { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; function __ReentrancyGuard_init() internal onlyInitializing { __ReentrancyGuard_init_unchained(); } function __ReentrancyGuard_init_unchained() internal onlyInitializing { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract PausableUpgradeable is Initializable, ContextUpgradeable { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ function __Pausable_init() internal onlyInitializing { __Pausable_init_unchained(); } function __Pausable_init_unchained() internal onlyInitializing { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { require(paused(), "Pausable: not paused"); } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/MathUpgradeable.sol"; /** * @dev String operations. */ library StringsUpgradeable { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = MathUpgradeable.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, MathUpgradeable.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165Upgradeable.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981Upgradeable is IERC165Upgradeable { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/common/ERC2981.sol) pragma solidity ^0.8.0; import "../../interfaces/IERC2981.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information. * * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first. * * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the * fee is specified in basis points by default. * * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. * * _Available since v4.5._ */ abstract contract ERC2981 is IERC2981, ERC165 { struct RoyaltyInfo { address receiver; uint96 royaltyFraction; } RoyaltyInfo private _defaultRoyaltyInfo; mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } /** * @inheritdoc IERC2981 */ function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) { RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId]; if (royalty.receiver == address(0)) { royalty = _defaultRoyaltyInfo; } uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator(); return (royalty.receiver, royaltyAmount); } /** * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an * override. */ function _feeDenominator() internal pure virtual returns (uint96) { return 10000; } /** * @dev Sets the royalty information that all ids in this contract will default to. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: invalid receiver"); _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Removes default royalty information. */ function _deleteDefaultRoyalty() internal virtual { delete _defaultRoyaltyInfo; } /** * @dev Sets the royalty information for a specific token id, overriding the global default. * * Requirements: * * - `tokenId` must be already minted. * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setTokenRoyalty( uint256 tokenId, address receiver, uint96 feeNumerator ) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: Invalid parameters"); _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Resets royalty information for the token id back to the global default. */ function _resetTokenRoyalty(uint256 tokenId) internal virtual { delete _tokenRoyaltyInfo[tokenId]; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (metatx/ERC2771Context.sol) pragma solidity ^0.8.11; import "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; /** * @dev Context variant with ERC2771 support. */ abstract contract ERC2771ContextUpgradeable is Initializable, ContextUpgradeable { mapping(address => bool) private _trustedForwarder; function __ERC2771Context_init(address[] memory trustedForwarder) internal onlyInitializing { __Context_init_unchained(); __ERC2771Context_init_unchained(trustedForwarder); } function __ERC2771Context_init_unchained(address[] memory trustedForwarder) internal onlyInitializing { for (uint256 i = 0; i < trustedForwarder.length; i++) { _trustedForwarder[trustedForwarder[i]] = true; } } function isTrustedForwarder(address forwarder) public view virtual returns (bool) { return _trustedForwarder[forwarder]; } function _msgSender() internal view virtual override returns (address sender) { if (isTrustedForwarder(msg.sender)) { // The assembly code is more direct than the Solidity version using `abi.decode`. assembly { sender := shr(96, calldataload(sub(calldatasize(), 20))) } } else { return super._msgSender(); } } function _msgData() internal view virtual override returns (bytes calldata) { if (isTrustedForwarder(msg.sender)) { return msg.data[:msg.data.length - 20]; } else { return super._msgData(); } } uint256[49] private __gap; }
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.0; interface IOwnable { /// @dev Returns the owner of the contract. function owner() external view returns (address); /// @dev Lets a module admin set a new owner for the contract. The new owner must be a module admin. function setOwner(address _newOwner) external; /// @dev Emitted when a new Owner is set. event OwnerUpdated(address prevOwner, address newOwner); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; interface IAllowlist { struct Allowlist { bytes32 typedata; bool isActive; string metadataUri; string name; uint256 price; uint256 maxMintPerWallet; uint256 tokenPool; uint256 startTime; uint256 endTime; } struct Allowlists { uint256 currentStartId; uint256 count; mapping(uint256 => Allowlist) lists; } }
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.11; interface IPropsContract { /// @dev Returns the module type of the contract. function contractType() external pure returns (bytes32); /// @dev Returns the version of the contract. function contractVersion() external pure returns (uint8); /// @dev Returns the metadata URI of the contract. function contractURI() external view returns (string memory); /** * @dev Sets contract URI for the storefront-level metadata of the contract. * Only module admin can call this function. */ function setContractURI(string calldata _uri) external; }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.4; import "./IERC1155Token.sol"; import "./IAllowlist.sol"; interface IPropsCreatorConfig is IERC1155Token { struct Split{ address[] accounts; uint32[] percentAllocations; uint32 distributorFee; } struct CreateMintConfig{ string _configuration; uint256 _quantity; uint256 _price; string _nonce; bytes _signature; uint256 _issuedOn; } struct SignatureRequest{ string tokenCheck; string primaryCheck; string royaltyCheck; string configuration; uint256 quantity; uint256 price; string nonce; uint256 issuedOn; bytes signature; } struct MintCart{ uint256 _cost; uint256 _quantity; string _tokensMinted; } struct AllocationCheck{ IAllowlist.Allowlist allowlist; address _address; uint256 _minted; uint256 _quantity; uint256 _alloted; bytes32[] _proof; } function getSignatureVerifier() external view returns (address); function getSplitMain() external view returns (address); function isUniqueArray(uint256[] calldata _array) external pure returns (bool); function getTokenCheck(ERC1155Token memory _token) external view returns (string memory); function getPrimaryCheck(Split memory _primarySplit) external view returns (string memory); function getRoyaltyCheck(Split memory _royaltySplit) external view returns (string memory); function getCreationCheck(IPropsCreatorConfig.ERC1155Token memory _token, IPropsCreatorConfig.Split memory _primarySplit, IPropsCreatorConfig.Split memory _royaltySplit) external view returns(string memory, string memory, string memory); function setTokenRoyalty(uint256 _tokenId, address _royaltyReceiver, uint96 _royaltyPercentage) external; function upsertToken(ERC1155Token memory _token, Split memory _primarySplit, Split memory _royaltySplit, bool _updateSplits) external returns (ERC1155Token memory); function getToken(uint256 _tokenId) external view returns (ERC1155Token memory); function revertOnUnauthorizedSignature(SignatureRequest calldata _inputs ) external view; function isOperatorBlocked(address _operatorAddress) external view returns (bool); function getDisallowedOperatorMessage(address _operatorAddress) external view returns (string memory); function getIPFSAt() external view returns (uint256); function getBaseURI() external view returns (string memory); function getTokenURI(uint256 _tokenId) external view returns (string memory); function isSanctioned(address _operatorAddress) external view returns (bool); function isValidMinter(address _operatorAddress, uint256[] calldata _array) external view returns (bool); function packMintString(string memory _string1, string memory _string2, string memory _string3,string memory _string4,string memory _string5) external pure returns (string memory); function revertOnAllocationCheckFailure(AllocationCheck calldata check) external view; function updateOwnership(address from, address to, uint256[] memory tokenIds, uint256[] memory amounts) external; function balanceOf(address owner) external view returns (uint256); function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); function totalSupply(uint256 id) external view returns (uint256); function getTokenSupply(uint256 _tokenId) external returns (uint256); struct betaCheck{ uint256 betaTokens; uint256 betaMints; uint256 cartMints; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {OperatorFiltererUpgradeable} from "./OperatorFiltererUpgradeable.sol"; abstract contract DefaultOperatorFiltererUpgradeable is OperatorFiltererUpgradeable { address constant DEFAULT_SUBSCRIPTION = address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6); function __DefaultOperatorFilterer_init() internal onlyInitializing { OperatorFiltererUpgradeable.__OperatorFilterer_init(DEFAULT_SUBSCRIPTION, true); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165Upgradeable.sol"; /** * @dev _Available since v3.1._ */ interface IERC1155ReceiverUpgradeable is IERC165Upgradeable { /** * @dev Handles the receipt of a single ERC1155 token type. This function is * called at the end of a `safeTransferFrom` after the balance has been updated. * * NOTE: To accept the transfer, this must return * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` * (i.e. 0xf23a6e61, or its own function selector). * * @param operator The address which initiated the transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param id The ID of the token being transferred * @param value The amount of tokens being transferred * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed */ function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns (bytes4); /** * @dev Handles the receipt of a multiple ERC1155 token types. This function * is called at the end of a `safeBatchTransferFrom` after the balances have * been updated. * * NOTE: To accept the transfer(s), this must return * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` * (i.e. 0xbc197c81, or its own function selector). * * @param operator The address which initiated the batch transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param ids An array containing ids of each token being transferred (order and length must match values array) * @param values An array containing amounts of each token being transferred (order and length must match ids array) * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol) pragma solidity ^0.8.0; import "../IERC1155Upgradeable.sol"; /** * @dev Interface of the optional ERC1155MetadataExtension interface, as defined * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. * * _Available since v3.1._ */ interface IERC1155MetadataURIUpgradeable is IERC1155Upgradeable { /** * @dev Returns the URI for token type `id`. * * If the `\{id\}` substring is present in the URI, it must be replaced by * clients with the actual token type ID. */ function uri(uint256 id) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library 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 * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; 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 onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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 onlyInitializing { } function __ERC165_init_unchained() internal onlyInitializing { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165Upgradeable).interfaceId; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/AddressUpgradeable.sol"; /** * @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 proxied contracts do not make use of 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. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ``` * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * 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 prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. * * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a * constructor. * * Emits an {Initialized} event. */ modifier initializer() { bool isTopLevelCall = !_initializing; require( (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1), "Initializable: contract is already initialized" ); _initialized = 1; if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * A reinitializer may be used after the original initialization step. This is essential to configure modules that * are added through upgrades and that require initialization. * * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` * cannot be nested. If one is invoked in the context of another, execution will revert. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. * * WARNING: setting the version to 255 will prevent any future reinitialization. * * Emits an {Initialized} event. */ modifier reinitializer(uint8 version) { require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); _initialized = version; _initializing = true; _; _initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. * * Emits an {Initialized} event the first time it is successfully executed. */ function _disableInitializers() internal virtual { require(!_initializing, "Initializable: contract is initializing"); if (_initialized < type(uint8).max) { _initialized = type(uint8).max; emit Initialized(type(uint8).max); } } /** * @dev Internal function that returns the initialized version. Returns `_initialized` */ function _getInitializedVersion() internal view returns (uint8) { return _initialized; } /** * @dev Internal function that returns the initialized version. Returns `_initializing` */ function _isInitializing() internal view returns (bool) { return _initializing; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface 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.1 (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 (last updated v4.8.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 onlyInitializing { } function __AccessControl_init_unchained() internal onlyInitializing { } 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); _; } /** * @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 virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `_msgSender()` is missing `role`. * Overriding this function changes the behavior of the {onlyRole} modifier. * * Format of the revert message is described in {_checkRole}. * * _Available since v4.6._ */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @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 virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", StringsUpgradeable.toHexString(account), " 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 virtual 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. * * May emit a {RoleGranted} event. */ 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. * * May emit a {RoleRevoked} event. */ 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`. * * May emit a {RoleRevoked} event. */ 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. * * May emit a {RoleGranted} event. * * [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. * * May emit a {RoleGranted} event. */ 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. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/structs/EnumerableSet.sol) // This file was procedurally generated from scripts/generate/templates/EnumerableSet.js. 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. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure * unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an * array of EnumerableSet. * ==== */ 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) { bytes32[] memory store = _values(set._inner); bytes32[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // 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; /// @solidity memory-safe-assembly 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 in 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; /// @solidity memory-safe-assembly assembly { result := store } return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library MathUpgradeable { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; /// @author: @props /** * @dev */ interface IERC1155Token { struct ERC1155Token { string uid; uint256 tokenId; string name; uint256 maxSupply; address royaltyReceiver; address primaryReceiver; uint8 royaltyPercentage; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol"; import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; abstract contract OperatorFiltererUpgradeable is Initializable { error OperatorNotAllowed(address operator); IOperatorFilterRegistry constant operatorFilterRegistry = IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E); function __OperatorFilterer_init(address subscriptionOrRegistrantToCopy, bool subscribe) internal onlyInitializing { // If an inheriting token contract is deployed to a network without the registry deployed, the modifier // will not revert, but the contract will need to be registered with the registry once it is deployed in // order for the modifier to filter addresses. if (address(operatorFilterRegistry).code.length > 0) { if (!operatorFilterRegistry.isRegistered(address(this))) { if (subscribe) { operatorFilterRegistry.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy); } else { if (subscriptionOrRegistrantToCopy != address(0)) { operatorFilterRegistry.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy); } else { operatorFilterRegistry.register(address(this)); } } } } } modifier onlyAllowedOperator(address from) virtual { // Check registry code length to facilitate testing in environments without a deployed registry. if (address(operatorFilterRegistry).code.length > 0) { // Allow spending tokens from addresses with balance // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred // from an EOA. if (from == msg.sender) { _; return; } if (!operatorFilterRegistry.isOperatorAllowed(address(this), msg.sender)) { revert OperatorNotAllowed(msg.sender); } } _; } function onlyAllowedOperatorApproval(address operator) public view returns (bool){ // Check registry code length to facilitate testing in environments without a deployed registry. if (address(operatorFilterRegistry).code.length > 0) { if (!operatorFilterRegistry.isOperatorAllowed(address(this), operator)) { revert OperatorNotAllowed(operator); } } return true; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; interface IOperatorFilterRegistry { function isOperatorAllowed(address registrant, address operator) external view returns (bool); function register(address registrant) external; function registerAndSubscribe(address registrant, address subscription) external; function registerAndCopyEntries(address registrant, address registrantToCopy) external; function unregister(address addr) external; function updateOperator(address registrant, address operator, bool filtered) external; function updateOperators(address registrant, address[] calldata operators, bool filtered) external; function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external; function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external; function subscribe(address registrant, address registrantToSubscribe) external; function unsubscribe(address registrant, bool copyExistingEntries) external; function subscriptionOf(address addr) external returns (address registrant); function subscribers(address registrant) external returns (address[] memory); function subscriberAt(address registrant, uint256 index) external returns (address); function copyEntriesOf(address registrant, address registrantToCopy) external; function isOperatorFiltered(address registrant, address operator) external returns (bool); function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool); function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool); function filteredOperators(address addr) external returns (address[] memory); function filteredCodeHashes(address addr) external returns (bytes32[] memory); function filteredOperatorAt(address registrant, uint256 index) external returns (address); function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32); function isRegistered(address addr) external returns (bool); function codeHashOf(address addr) external returns (bytes32); }
{ "metadata": { "bytecodeHash": "none", "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 1 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"name":"InsufficientFunds","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","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":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"string","name":"tokens","type":"string"}],"name":"Minted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"prevOwner","type":"address"},{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","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":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"typedata","type":"bytes32"},{"internalType":"bool","name":"isActive","type":"bool"},{"internalType":"string","name":"metadataUri","type":"string"},{"internalType":"string","name":"name","type":"string"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"maxMintPerWallet","type":"uint256"},{"internalType":"uint256","name":"tokenPool","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"}],"internalType":"struct IAllowlist.Allowlist","name":"_allowlist","type":"tuple"}],"name":"addAllowlist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"allowlists","outputs":[{"internalType":"uint256","name":"currentStartId","type":"uint256"},{"internalType":"uint256","name":"count","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"burnBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"configContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractType","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractVersion","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"components":[{"internalType":"string","name":"uid","type":"string"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"name","type":"string"},{"internalType":"uint256","name":"maxSupply","type":"uint256"},{"internalType":"address","name":"royaltyReceiver","type":"address"},{"internalType":"address","name":"primaryReceiver","type":"address"},{"internalType":"uint8","name":"royaltyPercentage","type":"uint8"}],"internalType":"struct IERC1155Token.ERC1155Token[]","name":"_token","type":"tuple[]"},{"components":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint32[]","name":"percentAllocations","type":"uint32[]"},{"internalType":"uint32","name":"distributorFee","type":"uint32"}],"internalType":"struct IPropsCreatorConfig.Split[]","name":"_primarySplit","type":"tuple[]"},{"components":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint32[]","name":"percentAllocations","type":"uint32[]"},{"internalType":"uint32","name":"distributorFee","type":"uint32"}],"internalType":"struct IPropsCreatorConfig.Split[]","name":"_royaltySplit","type":"tuple[]"},{"components":[{"internalType":"string","name":"_configuration","type":"string"},{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"uint256","name":"_price","type":"uint256"},{"internalType":"string","name":"_nonce","type":"string"},{"internalType":"bytes","name":"_signature","type":"bytes"},{"internalType":"uint256","name":"_issuedOn","type":"uint256"}],"internalType":"struct IPropsCreatorConfig.CreateMintConfig[]","name":"_config","type":"tuple[]"}],"name":"createAndMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_allowlistId","type":"uint256"}],"name":"getAllowlistById","outputs":[{"components":[{"internalType":"bytes32","name":"typedata","type":"bytes32"},{"internalType":"bool","name":"isActive","type":"bool"},{"internalType":"string","name":"metadataUri","type":"string"},{"internalType":"string","name":"name","type":"string"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"maxMintPerWallet","type":"uint256"},{"internalType":"uint256","name":"tokenPool","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"}],"internalType":"struct IAllowlist.Allowlist","name":"allowlist","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_allowlistId","type":"uint256"}],"name":"getMintedByAllowlist","outputs":[{"internalType":"uint256","name":"minted_","type":"uint256"}],"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"}],"name":"hasMinRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","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":"address","name":"_defaultAdmin","type":"address"},{"internalType":"address[]","name":"_trustedForwarders","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":[{"internalType":"address","name":"forwarder","type":"address"}],"name":"isTrustedForwarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_quantities","type":"uint256[]"},{"internalType":"bytes32[][]","name":"_proofs","type":"bytes32[][]"},{"internalType":"uint256[]","name":"_allotments","type":"uint256[]"},{"internalType":"uint256[]","name":"_allowlistIds","type":"uint256[]"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"minted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"mintedByAllowlist","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"onlyAllowedOperatorApproval","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","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":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","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":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_configContract","type":"address"},{"internalType":"bool","name":"pause","type":"bool"}],"name":"setInternals","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"setOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"address","name":"_royaltyReceiver","type":"address"},{"internalType":"uint96","name":"_royaltyPercentage","type":"uint96"}],"name":"setTokenRoyalty","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":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"totalBalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"typedata","type":"bytes32"},{"internalType":"bool","name":"isActive","type":"bool"},{"internalType":"string","name":"metadataUri","type":"string"},{"internalType":"string","name":"name","type":"string"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"maxMintPerWallet","type":"uint256"},{"internalType":"uint256","name":"tokenPool","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"}],"internalType":"struct IAllowlist.Allowlist","name":"_allowlist","type":"tuple"},{"internalType":"uint256","name":"i","type":"uint256"}],"name":"updateAllowlistByIndex","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50615f9480620000216000396000f3fe6080604052600436106102225760003560e01c8062fdd58e1461022757806301ffc9a71461025a57806306fdde031461028a5780630e89341c146102c257806313af4035146102e25780631e7269c514610304578063248a9ca3146103325780632a55205a146103525780632eb2c2d6146103805780632f2ff15d146103a05780632f745c59146103c057806336568abe146103e05780633b6fda59146104005780634b0ee02a146104395780634e1273f4146104595780634f558e7914610486578063572b6c05146104a65780635944c753146104c65780635c975abb146104e65780636182ff53146104fe57806363906d0d1461052b57806364274fef146105565780636b20c4541461057657806387b63e3a146105965780638b81a7ee146105b65780638da5cb5b146105d65780639010d07c146105fe57806391d148541461061e578063938e3d7b1461063e578063942593991461065e578063946d92041461067157806395d89b411461028a578063a0a8e46014610691578063a217fddf146106ad578063a22cb465146106c2578063b3738dfc146106e2578063bd85b03914610702578063bf66a18214610722578063c90a356e14610743578063ca15c87314610763578063cb2ef6f714610783578063d05a381a146107b6578063d2b5c0bb146107d6578063d547741f146107e9578063e8a3d48514610809578063e985e9c51461081e578063f242432a14610868578063f5298aca14610888575b600080fd5b34801561023357600080fd5b506102476102423660046141d0565b6108a8565b6040519081526020015b60405180910390f35b34801561026657600080fd5b5061027a610275366004614212565b610944565b6040519015158152602001610251565b34801561029657600080fd5b506040805180820190915260068152655253544c535360d01b60208201525b6040516102519190614287565b3480156102ce57600080fd5b506102b56102dd36600461429a565b610987565b3480156102ee57600080fd5b506103026102fd3660046142b3565b610a37565b005b34801561031057600080fd5b5061024761031f3660046142b3565b6101f76020526000908152604090205481565b34801561033e57600080fd5b5061024761034d36600461429a565b610aca565b34801561035e57600080fd5b5061037261036d3660046142d0565b610adf565b6040516102519291906142f2565b34801561038c57600080fd5b5061030261039b3660046144d3565b610b8f565b3480156103ac57600080fd5b506103026103bb366004614580565b610bc8565b3480156103cc57600080fd5b506102476103db3660046141d0565b610bf6565b3480156103ec57600080fd5b506103026103fb366004614580565b610c72565b34801561040c57600080fd5b5061024761041b3660046141d0565b6101f860209081526000928352604080842090915290825290205481565b34801561044557600080fd5b506102476104543660046142b3565b610cfc565b34801561046557600080fd5b5061047961047436600461461f565b610d6f565b60405161025191906146bd565b34801561049257600080fd5b5061027a6104a136600461429a565b610e98565b3480156104b257600080fd5b5061027a6104c13660046142b3565b610eab565b3480156104d257600080fd5b506103026104e13660046146d0565b610ec9565b3480156104f257600080fd5b5060655460ff1661027a565b34801561050a57600080fd5b5061051e61051936600461429a565b610f14565b60405161025191906147ad565b34801561053757600080fd5b5061021d5461021e54610548919082565b6040516102519291906147c0565b34801561056257600080fd5b506103026105713660046147e7565b6110fd565b34801561058257600080fd5b5061030261059136600461482b565b61113e565b3480156105a257600080fd5b506102476105b136600461429a565b611193565b3480156105c257600080fd5b506103026105d13660046148a0565b6111db565b3480156105e257600080fd5b5061021a546001600160a01b03165b60405161025191906148dc565b34801561060a57600080fd5b506105f16106193660046142d0565b611235565b34801561062a57600080fd5b5061027a610639366004614580565b61124e565b34801561064a57600080fd5b506103026106593660046148f0565b611279565b61030261066c3660046149a5565b6112a6565b34801561067d57600080fd5b5061030261068c366004614a68565b6119c1565b34801561069d57600080fd5b5060405160048152602001610251565b3480156106b957600080fd5b50610247600081565b3480156106ce57600080fd5b506103026106dd366004614abb565b611b59565b3480156106ee57600080fd5b5061027a6106fd36600461429a565b611b88565b34801561070e57600080fd5b5061024761071d36600461429a565b611bbc565b34801561072e57600080fd5b5061021b546105f1906001600160a01b031681565b34801561074f57600080fd5b5061030261075e366004614abb565b611bcf565b34801561076f57600080fd5b5061024761077e36600461429a565b611c45565b34801561078f57600080fd5b507f50726f7073455243313135355543726561746f72526f79616c74696573000000610247565b3480156107c257600080fd5b5061027a6107d13660046142b3565b611c5d565b6103026107e4366004614db8565b611d0f565b3480156107f557600080fd5b50610302610804366004614580565b61265d565b34801561081557600080fd5b506102b561267d565b34801561082a57600080fd5b5061027a610839366004614f80565b6001600160a01b0391821660009081526101606020908152604080832093909416825291909152205460ff1690565b34801561087457600080fd5b50610302610883366004614fae565b61270c565b34801561089457600080fd5b506103026108a3366004615016565b61273e565b60006001600160a01b0383166109185760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b50600081815261015f602090815260408083206001600160a01b03861684529091529020545b92915050565b600061094f82612793565b8061096a5750636cdb3d1360e11b6001600160e01b03198316145b8061093e5750506001600160e01b03191663152a902d60e11b1490565b6060600061099483611bbc565b116109c55760405162461bcd60e51b81526020600482015260016024820152605560f81b604482015260640161090f565b61021b54604051633bb3a24d60e01b8152600481018490526001600160a01b0390911690633bb3a24d90602401600060405180830381865afa158015610a0f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261093e91908101906150a3565b6000610a42816127c8565b610a4d60008361124e565b610a695760405162461bcd60e51b815260040161090f906150d7565b61021a80546001600160a01b038481166001600160a01b03198316179092556040519116907f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d7690610abd90839086906150f2565b60405180910390a1505050565b600090815260fb602052604090206001015490565b60008281526101f6602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610b565750604080518082019091526101f5546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090610b75906001600160601b031687615122565b610b7f9190615141565b91519350909150505b9250929050565b610b9885611c5d565b610bb45760405162461bcd60e51b815260040161090f90615163565b610bc185858585856127dc565b5050505050565b610bdf600080516020615f68833981519152611b88565b610be857600080fd5b610bf28282612833565b5050565b61021b54604051632f745c5960e01b81526000916001600160a01b031690632f745c5990610c2a90869086906004016142f2565b602060405180830381865afa158015610c47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c6b919061517e565b9392505050565b610c7a612856565b6001600160a01b0316816001600160a01b031614610cf25760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b606482015260840161090f565b610bf28282612865565b61021b546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610d2e9085906004016148dc565b602060405180830381865afa158015610d4b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061093e919061517e565b60608151835114610dd45760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b606482015260840161090f565b600083516001600160401b03811115610def57610def61430b565b604051908082528060200260200182016040528015610e18578160200160208202803683370190505b50905060005b8451811015610e9057610e63858281518110610e3c57610e3c615197565b6020026020010151858381518110610e5657610e56615197565b60200260200101516108a8565b828281518110610e7557610e75615197565b6020908102919091010152610e89816151ad565b9050610e1e565b509392505050565b600080610ea483611bbc565b1192915050565b6001600160a01b031660009081526097602052604090205460ff1690565b61021b546001600160a01b0316610ede612856565b6001600160a01b031614610f045760405162461bcd60e51b815260040161090f906150d7565b610f0f838383612888565b505050565b610f6860405180610120016040528060008019168152602001600015158152602001606081526020016060815260200160008152602001600081526020016000815260200160008152602001600081525090565b600082815261021f602090815260409182902082516101208101845281548152600182015460ff161515928101929092526002810180549293919291840191610fb0906151c6565b80601f0160208091040260200160405190810160405280929190818152602001828054610fdc906151c6565b80156110295780601f10610ffe57610100808354040283529160200191611029565b820191906000526020600020905b81548152906001019060200180831161100c57829003601f168201915b50505050508152602001600382018054611042906151c6565b80601f016020809104026020016040519081016040528092919081815260200182805461106e906151c6565b80156110bb5780601f10611090576101008083540402835291602001916110bb565b820191906000526020600020905b81548152906001019060200180831161109e57829003601f168201915b50505050508152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815250509050919050565b611114600080516020615f48833981519152611b88565b61111d57600080fd5b600081815261021f6020526040902082906111388282615352565b50505050565b611146612856565b6001600160a01b0316836001600160a01b0316148061116c575061116c83610839612856565b6111885760405162461bcd60e51b815260040161090f906153ef565b610f0f838383612995565b60006101f860006111a2612856565b6001600160a01b03166001600160a01b031681526020019081526020016000206000838152602001908152602001600020549050919050565b6111f2600080516020615f48833981519152611b88565b6111fb57600080fd5b61021e54600090815261021f60205260409020819061121a8282615352565b505061021e805490600061122d836151ad565b919050555050565b600082815261012d60205260408120610c6b9083612b2b565b600091825260fb602090815260408084206001600160a01b0393909316845291905290205460ff1690565b611290600080516020615f68833981519152611b88565b61129957600080fd5b610f0f610219838361407d565b6112ae612b37565b6112b6612b90565b61021b546001600160a01b031663ed9907a46112d0612856565b84846040518463ffffffff1660e01b81526004016112f09392919061543d565b602060405180830381865afa15801561130d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611331919061548a565b61133a57600080fd5b611342614101565b60005b888110156117f35789898281811061135f5761135f615197565b9050602002013582602001818151019150818152505060006040518060c0016040528061021d600201600088888781811061139c5761139c615197565b90506020020135815260200190815260200160002060405180610120016040529081600082015481526020016001820160009054906101000a900460ff161515151581526020016002820180546113f2906151c6565b80601f016020809104026020016040519081016040528092919081815260200182805461141e906151c6565b801561146b5780601f106114405761010080835404028352916020019161146b565b820191906000526020600020905b81548152906001019060200180831161144e57829003601f168201915b50505050508152602001600382018054611484906151c6565b80601f01602080910402602001604051908101604052809291908181526020018280546114b0906151c6565b80156114fd5780601f106114d2576101008083540402835291602001916114fd565b820191906000526020600020905b8154815290600101906020018083116114e057829003601f168201915b50505050508152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815250508152602001611545612856565b6001600160a01b031681526020016101f86000611560612856565b6001600160a01b03166001600160a01b03168152602001908152602001600020600088888781811061159457611594615197565b9050602002013581526020019081526020016000205481526020018c8c858181106115c1576115c1615197565b9050602002013581526020018888858181106115df576115df615197565b9050602002013581526020018a8a858181106115fd576115fd615197565b905060200281019061160f91906154a7565b80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250505091525061021b54604051634f9ff26160e01b81529192506001600160a01b031690634f9ff261906116749084906004016154f0565b60006040518083038186803b15801561168c57600080fd5b505afa1580156116a0573d6000803e3d6000fd5b5050505060008b8b848181106116b8576116b8615197565b9050602002013561021d60020160008888878181106116d9576116d9615197565b6020908102929092013583525081019190915260400160009081206004015486519202918201865261021b549192506001600160a01b039091169063e4b50cb89061021f9089898881811061173057611730615197565b905060200201358152602001908152602001600020600601546040518263ffffffff1660e01b815260040161176791815260200190565b600060405180830381865afa158015611784573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526117ac9190810190615599565b60a001516001600160a01b03166108fc829081150290604051600060405180830381858888f193505050501580156117e8573d6000803e3d6000fd5b505050600101611345565b5080513410156118165760405163356680b760e01b815260040160405180910390fd5b60005b888110156119725789898281811061183357611833615197565b905060200201356101f86000611847612856565b6001600160a01b03166001600160a01b03168152602001908152602001600020600086868581811061187b5761187b615197565b9050602002013581526020019081526020016000206000828254019250508190555081604001516118dd61021d60020160008787868181106118bf576118bf615197565b90506020020135815260200190815260200160002060060154612bd8565b6040516020016118ee929190615670565b60408051601f1981840301815291815283015261196a61190c612856565b61021f600087878681811061192357611923615197565b905060200201358152602001908152602001600020600601548c8c8581811061194e5761194e615197565b9050602002013560405180602001604052806000815250612c6a565b600101611819565b5061197b612856565b6001600160a01b0316600080516020615f2883398151915282604001516040516119a59190614287565b60405180910390a2506119b760018055565b5050505050505050565b600054610100900460ff16158080156119e15750600054600160ff909116105b80611a0257506119f030612d9d565b158015611a02575060005460ff166001145b611a655760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161090f565b6000805460ff191660011790558015611a88576000805461ff0019166101001790555b611a90612dac565b611a9982612ddb565b611ab160405180602001604052806000815250612e13565b61021a80546001600160a01b0319166001600160a01b038516179055611ad8600084610be8565b611af1600080516020615f688339815191526000612e43565b611b17600080516020615f48833981519152600080516020615f68833981519152612e43565b8015610f0f576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602001610abd565b611b6282611c5d565b611b7e5760405162461bcd60e51b815260040161090f90615163565b610bf28282612e96565b6000611b9682610639612856565b15611ba357506001919050565b81611bb057506000919050565b61093e6106fd83610aca565b6000908152610191602052604090205490565b611be6600080516020615f68833981519152611b88565b611bef57600080fd5b61021b80546001600160a01b0319166001600160a01b038416179055808015611c1b575060655460ff16155b15611c2857611c28612ea8565b80158015611c38575060655460ff165b15610bf257610bf2612efd565b600081815261012d6020526040812061093e90612f38565b60006daaeb6d7670e522a718067333cd4e3b15611d0757604051633185c44d60e21b81526daaeb6d7670e522a718067333cd4e9063c617113490611ca790309086906004016150f2565b602060405180830381865afa158015611cc4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ce8919061548a565b611d075781604051633b79c77360e21b815260040161090f91906148dc565b506001919050565b611d17612b37565b611d1f612b90565b61021b546001600160a01b031663df592f7d611d39612856565b6040518263ffffffff1660e01b8152600401611d5591906148dc565b602060405180830381865afa158015611d72573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d96919061548a565b15611db35760405162461bcd60e51b815260040161090f906156ab565b611dbb614101565b611ddf60405180606001604052806000815260200160008152602001600081525090565b60015b600a8111611e0657611df381611bbc565b6020830180519091019052600101611de2565b5060005b8651811015611e4657838181518110611e2557611e25615197565b60209081029190910181015101516040830180519091019052600101611e0a565b506103e881604001518260200151011115611e885760405162461bcd60e51b8152602060048201526002602482015261513160f01b604482015260640161090f565b5060005b855181101561261857610220838281518110611eaa57611eaa615197565b602002602001015160600151604051611ec391906156c6565b9081526040519081900360200190205460ff1615611f075760405162461bcd60e51b81526020600482015260016024820152602760f91b604482015260640161090f565b6001610220848381518110611f1e57611f1e615197565b602002602001015160600151604051611f3791906156c6565b908152602001604051809103902060006101000a81548160ff0219169083151502179055506000838281518110611f7057611f70615197565b602002602001015160200151848381518110611f8e57611f8e615197565b60209081029190910101516040015184519102908101808552909150341015611fca5760405163356680b760e01b815260040160405180910390fd5b61021b548751606091829182916001600160a01b031690633bcf5cce908c9088908110611ff957611ff9615197565b60200260200101518b888151811061201357612013615197565b60200260200101518b898151811061202d5761202d615197565b60200260200101516040518463ffffffff1660e01b81526004016120539392919061580d565b600060405180830381865afa158015612070573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526120989190810190615846565b80935081945082955050505060006040518061012001604052808581526020018481526020018381526020018988815181106120d6576120d6615197565b60200260200101516000015181526020018988815181106120f9576120f9615197565b602002602001015160200151815260200189888151811061211c5761211c615197565b602002602001015160400151815260200189888151811061213f5761213f615197565b602002602001015160600151815260200189888151811061216257612162615197565b602002602001015160a00151815260200189888151811061218557612185615197565b602090810291909101015160800151905261021b54604051631fd08af360e31b81529192506001600160a01b03169063fe845798906121c89084906004016158c3565b60006040518083038186803b1580156121e057600080fd5b505afa1580156121f4573d6000803e3d6000fd5b50505050600061022189888151811061220f5761220f615197565b60200260200101516000015160405161222891906156c6565b90815260405190819003602001902054905080156122d45761021b54604051631c96a19760e31b8152600481018390526001600160a01b039091169063e4b50cb890602401600060405180830381865afa15801561228a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526122b29190810190615599565b8c88815181106122c4576122c4615197565b602002602001018190525061241c565b61021b548c516001600160a01b03909116906368f3af50908e908a9081106122fe576122fe615197565b60200260200101518d8a8151811061231857612318615197565b60200260200101518d8b8151811061233257612332615197565b602002602001015160016040518563ffffffff1660e01b815260040161235b9493929190615995565b6000604051808303816000875af115801561237a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526123a29190810190615599565b8c88815181106123b4576123b4615197565b60200260200101819052508b87815181106123d1576123d1615197565b6020026020010151602001516102218a89815181106123f2576123f2615197565b60200260200101516000015160405161240b91906156c6565b908152604051908190036020019020555b61021b548c516001600160a01b039091169063e4b50cb8908e908a90811061244657612446615197565b6020026020010151602001516040518263ffffffff1660e01b815260040161247091815260200190565b600060405180830381865afa15801561248d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526124b59190810190615599565b60a001516001600160a01b03166108fc879081150290604051600060405180830381858888f193505050501580156124f1573d6000803e3d6000fd5b50876040015161251d8d898151811061250c5761250c615197565b602002602001015160200151612bd8565b8a898151811061252f5761252f615197565b6020026020010151600001516000841161256557604051806040016040528060048152602001637472756560e01b815250612584565b6040518060400160405280600581526020016466616c736560d81b8152505b60405160200161259794939291906159e2565b60408051601f198184030181529181528901526126066125b5612856565b8d89815181106125c7576125c7615197565b6020026020010151602001518b8a815181106125e5576125e5615197565b60200260200101516020015160405180602001604052806000815250612c6a565b505060019094019350611e8c92505050565b50612621612856565b6001600160a01b0316600080516020615f28833981519152826040015160405161264b9190614287565b60405180910390a25061113860018055565b612674600080516020615f68833981519152611b88565b610cf257600080fd5b610219805461268b906151c6565b80601f01602080910402602001604051908101604052809291908181526020018280546126b7906151c6565b80156127045780601f106126d957610100808354040283529160200191612704565b820191906000526020600020905b8154815290600101906020018083116126e757829003601f168201915b505050505081565b61271585611c5d565b6127315760405162461bcd60e51b815260040161090f90615163565b610bc18585858585612f42565b612746612856565b6001600160a01b0316836001600160a01b0316148061276c575061276c83610839612856565b6127885760405162461bcd60e51b815260040161090f906153ef565b610f0f838383612f99565b60006001600160e01b0319821663152a902d60e11b148061093e57506301ffc9a760e01b6001600160e01b031983161461093e565b6127d9816127d4612856565b6130b3565b50565b6127e4612856565b6001600160a01b0316856001600160a01b0316148061280a575061280a85610839612856565b6128265760405162461bcd60e51b815260040161090f906153ef565b610bc1858585858561310c565b61283d82826132b4565b600082815261012d60205260409020610f0f908261333b565b6000612860613350565b905090565b61286f8282613375565b600082815261012d60205260409020610f0f90826133fa565b6127106001600160601b03821611156128f65760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b606482015260840161090f565b6001600160a01b03821661294a5760405162461bcd60e51b815260206004820152601b60248201527a455243323938313a20496e76616c696420706172616d657465727360281b604482015260640161090f565b6040805180820182526001600160a01b0393841681526001600160601b03928316602080830191825260009687526101f690529190942093519051909116600160a01b029116179055565b6001600160a01b0383166129bb5760405162461bcd60e51b815260040161090f90615a64565b80518251146129dc5760405162461bcd60e51b815260040161090f90615aa7565b60006129e6612856565b9050612a068185600086866040518060200160405280600081525061340f565b60005b8351811015612ad0576000848281518110612a2657612a26615197565b602002602001015190506000848381518110612a4457612a44615197565b602090810291909101810151600084815261015f835260408082206001600160a01b038c168352909352919091205490915081811015612a965760405162461bcd60e51b815260040161090f90615aef565b600092835261015f602090815260408085206001600160a01b038b1686529091529092209103905580612ac8816151ad565b915050612a09565b5060006001600160a01b0316846001600160a01b0316826001600160a01b0316600080516020615ee88339815191528686604051612b0f929190615b33565b60405180910390a4604080516020810190915260009052611138565b6000610c6b8383613515565b600260015403612b895760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161090f565b6002600155565b60655460ff1615612bd65760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640161090f565b565b60606000612be58361353f565b60010190506000816001600160401b03811115612c0457612c0461430b565b6040519080825280601f01601f191660200182016040528015612c2e576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084612c3857509392505050565b6001600160a01b038416612cca5760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b606482015260840161090f565b6000612cd4612856565b90506000612ce185613615565b90506000612cee85613615565b9050612cff8360008985858961340f565b600086815261015f602090815260408083206001600160a01b038b16845290915281208054879290612d32908490615b58565b92505081905550866001600160a01b031660006001600160a01b0316846001600160a01b0316600080516020615f088339815191528989604051612d779291906147c0565b60405180910390a4612d8e83600089898989613660565b50505050505050565b60018055565b6001600160a01b03163b151590565b600054610100900460ff16612dd35760405162461bcd60e51b815260040161090f90615b70565b612bd66137c2565b600054610100900460ff16612e025760405162461bcd60e51b815260040161090f90615b70565b612e0a6137e9565b6127d981613810565b600054610100900460ff16612e3a5760405162461bcd60e51b815260040161090f90615b70565b6127d98161389f565b6000612e4e83610aca565b600084815260fb6020526040808220600101859055519192508391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b610bf2612ea1612856565b83836138cf565b612eb0612b90565b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612ee6612856565b604051612ef391906148dc565b60405180910390a1565b612f056139b0565b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa612ee6612856565b600061093e825490565b612f4a612856565b6001600160a01b0316856001600160a01b03161480612f705750612f7085610839612856565b612f8c5760405162461bcd60e51b815260040161090f906153ef565b610bc185858585856139f9565b6001600160a01b038316612fbf5760405162461bcd60e51b815260040161090f90615a64565b6000612fc9612856565b90506000612fd684613615565b90506000612fe384613615565b90506130038387600085856040518060200160405280600081525061340f565b600085815261015f602090815260408083206001600160a01b038a168452909152902054848110156130475760405162461bcd60e51b815260040161090f90615aef565b600086815261015f602090815260408083206001600160a01b03808c1680865291909352818420898603905590519091871690600080516020615f0883398151915290613097908b908b906147c0565b60405180910390a4604080516020810190915260009052612d8e565b6130bd828261124e565b610bf2576130ca81613b3c565b6130d5836020613b4e565b6040516020016130e6929190615bbb565b60408051601f198184030181529082905262461bcd60e51b825261090f91600401614287565b815183511461312d5760405162461bcd60e51b815260040161090f90615aa7565b6001600160a01b0384166131535760405162461bcd60e51b815260040161090f90615c2a565b600061315d612856565b905061316d81878787878761340f565b60005b845181101561325857600085828151811061318d5761318d615197565b6020026020010151905060008583815181106131ab576131ab615197565b602090810291909101810151600084815261015f835260408082206001600160a01b038e1683529093529190912054909150818110156131fd5760405162461bcd60e51b815260040161090f90615c6f565b600083815261015f602090815260408083206001600160a01b038e8116855292528083208585039055908b1682528120805484929061323d908490615b58565b9250508190555050505080613251906151ad565b9050613170565b50846001600160a01b0316866001600160a01b0316826001600160a01b0316600080516020615ee88339815191528787604051613296929190615b33565b60405180910390a46132ac818787878787613ce9565b505050505050565b6132be828261124e565b610bf257600082815260fb602090815260408083206001600160a01b03851684529091529020805460ff191660011790556132f7612856565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610c6b836001600160a01b038416613dab565b600061335b33610eab565b1561336d575060131936013560601c90565b503390565b90565b61337f828261124e565b15610bf257600082815260fb602090815260408083206001600160a01b03851684529091529020805460ff191690556133b6612856565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b6000610c6b836001600160a01b038416613dfa565b61021b5460405163df592f7d60e01b81526001600160a01b039091169063df592f7d906134409087906004016148dc565b602060405180830381865afa15801561345d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613481919061548a565b1561349e5760405162461bcd60e51b815260040161090f906156ab565b61021b54604051637fbd487360e01b81526001600160a01b0390911690637fbd4873906134d5908890889088908890600401615cb9565b600060405180830381600087803b1580156134ef57600080fd5b505af1158015613503573d6000803e3d6000fd5b505050506132ac868686868686613eed565b600082600001828154811061352c5761352c615197565b9060005260206000200154905092915050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b831061357e5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6904ee2d6d415b85acef8160201b83106135a8576904ee2d6d415b85acef8160201b830492506020015b662386f26fc1000083106135c657662386f26fc10000830492506010015b6305f5e10083106135de576305f5e100830492506008015b61271083106135f257612710830492506004015b60648310613604576064830492506002015b600a831061093e5760010192915050565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061364f5761364f615197565b602090810291909101015292915050565b613672846001600160a01b0316612d9d565b156132ac5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906136ab9089908990889088908890600401615d02565b6020604051808303816000875af19250505080156136e6575060408051601f3d908101601f191682019092526136e391810190615d3c565b60015b613792576136f2615d59565b806308c379a00361372b5750613706615d74565b80613711575061372d565b8060405162461bcd60e51b815260040161090f9190614287565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b606482015260840161090f565b6001600160e01b0319811663f23a6e6160e01b14612d8e5760405162461bcd60e51b815260040161090f90615dfd565b600054610100900460ff16612d975760405162461bcd60e51b815260040161090f90615b70565b600054610100900460ff16612bd65760405162461bcd60e51b815260040161090f90615b70565b600054610100900460ff166138375760405162461bcd60e51b815260040161090f90615b70565b60005b8151811015610bf25760016097600084848151811061385b5761385b615197565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905580613897816151ad565b91505061383a565b600054610100900460ff166138c65760405162461bcd60e51b815260040161090f90615b70565b6127d981614069565b816001600160a01b0316836001600160a01b0316036139425760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b606482015260840161090f565b6001600160a01b0383811660008181526101606020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60655460ff16612bd65760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161090f565b6001600160a01b038416613a1f5760405162461bcd60e51b815260040161090f90615c2a565b6000613a29612856565b90506000613a3685613615565b90506000613a4385613615565b9050613a5383898985858961340f565b600086815261015f602090815260408083206001600160a01b038c16845290915290205485811015613a975760405162461bcd60e51b815260040161090f90615c6f565b600087815261015f602090815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290613ad7908490615b58565b92505081905550876001600160a01b0316896001600160a01b0316856001600160a01b0316600080516020615f088339815191528a8a604051613b1b9291906147c0565b60405180910390a4613b31848a8a8a8a8a613660565b505050505050505050565b606061093e6001600160a01b03831660145b60606000613b5d836002615122565b613b68906002615b58565b6001600160401b03811115613b7f57613b7f61430b565b6040519080825280601f01601f191660200182016040528015613ba9576020820181803683370190505b509050600360fc1b81600081518110613bc457613bc4615197565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613bf357613bf3615197565b60200101906001600160f81b031916908160001a9053506000613c17846002615122565b613c22906001615b58565b90505b6001811115613c9a576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110613c5657613c56615197565b1a60f81b828281518110613c6c57613c6c615197565b60200101906001600160f81b031916908160001a90535060049490941c93613c9381615e45565b9050613c25565b508315610c6b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161090f565b613cfb846001600160a01b0316612d9d565b156132ac5760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190613d349089908990889088908890600401615e5c565b6020604051808303816000875af1925050508015613d6f575060408051601f3d908101601f19168201909252613d6c91810190615d3c565b60015b613d7b576136f2615d59565b6001600160e01b0319811663bc197c8160e01b14612d8e5760405162461bcd60e51b815260040161090f90615dfd565b6000818152600183016020526040812054613df25750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561093e565b50600061093e565b60008181526001830160205260408120548015613ee3576000613e1e600183615eba565b8554909150600090613e3290600190615eba565b9050818114613e97576000866000018281548110613e5257613e52615197565b9060005260206000200154905080876000018481548110613e7557613e75615197565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613ea857613ea8615ed1565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061093e565b600091505061093e565b6001600160a01b038516613f755760005b8351811015613f7357828181518110613f1957613f19615197565b60200260200101516101916000868481518110613f3857613f38615197565b602002602001015181526020019081526020016000206000828254613f5d9190615b58565b90915550613f6c9050816151ad565b9050613efe565b505b6001600160a01b0384166132ac5760005b8351811015612d8e576000848281518110613fa357613fa3615197565b602002602001015190506000848381518110613fc157613fc1615197565b6020026020010151905060006101916000848152602001908152602001600020549050818110156140455760405162461bcd60e51b815260206004820152602860248201527f455243313135353a206275726e20616d6f756e74206578636565647320746f74604482015267616c537570706c7960c01b606482015260840161090f565b6000928352610191602052604090922091039055614062816151ad565b9050613f86565b8051610bf290610161906020840190614122565b828054614089906151c6565b90600052602060002090601f0160209004810192826140ab57600085556140f1565b82601f106140c45782800160ff198235161785556140f1565b828001600101855582156140f1579182015b828111156140f15782358255916020019190600101906140d6565b506140fd929150614196565b5090565b60405180606001604052806000815260200160008152602001606081525090565b82805461412e906151c6565b90600052602060002090601f01602090048101928261415057600085556140f1565b82601f1061416957805160ff19168380011785556140f1565b828001600101855582156140f1579182015b828111156140f157825182559160200191906001019061417b565b5b808211156140fd5760008155600101614197565b6001600160a01b03811681146127d957600080fd5b80356141cb816141ab565b919050565b600080604083850312156141e357600080fd5b82356141ee816141ab565b946020939093013593505050565b6001600160e01b0319811681146127d957600080fd5b60006020828403121561422457600080fd5b8135610c6b816141fc565b60005b8381101561424a578181015183820152602001614232565b838111156111385750506000910152565b6000815180845261427381602086016020860161422f565b601f01601f19169290920160200192915050565b602081526000610c6b602083018461425b565b6000602082840312156142ac57600080fd5b5035919050565b6000602082840312156142c557600080fd5b8135610c6b816141ab565b600080604083850312156142e357600080fd5b50508035926020909101359150565b6001600160a01b03929092168252602082015260400190565b634e487b7160e01b600052604160045260246000fd5b606081016001600160401b03811182821017156143405761434061430b565b60405250565b601f8201601f191681016001600160401b038111828210171561436b5761436b61430b565b6040525050565b60405160c081016001600160401b03811182821017156143945761439461430b565b60405290565b60405160e081016001600160401b03811182821017156143945761439461430b565b60006001600160401b038211156143d5576143d561430b565b5060051b60200190565b600082601f8301126143f057600080fd5b813560206143fd826143bc565b60405161440a8282614346565b83815260059390931b850182019282810191508684111561442a57600080fd5b8286015b84811015614445578035835291830191830161442e565b509695505050505050565b60006001600160401b038211156144695761446961430b565b50601f01601f191660200190565b600082601f83011261448857600080fd5b813561449381614450565b6040516144a08282614346565b8281528560208487010111156144b557600080fd5b82602086016020830137600092810160200192909252509392505050565b600080600080600060a086880312156144eb57600080fd5b85356144f6816141ab565b94506020860135614506816141ab565b935060408601356001600160401b038082111561452257600080fd5b61452e89838a016143df565b9450606088013591508082111561454457600080fd5b61455089838a016143df565b9350608088013591508082111561456657600080fd5b5061457388828901614477565b9150509295509295909350565b6000806040838503121561459357600080fd5b8235915060208301356145a5816141ab565b809150509250929050565b600082601f8301126145c157600080fd5b813560206145ce826143bc565b6040516145db8282614346565b83815260059390931b85018201928281019150868411156145fb57600080fd5b8286015b84811015614445578035614612816141ab565b83529183019183016145ff565b6000806040838503121561463257600080fd5b82356001600160401b038082111561464957600080fd5b614655868387016145b0565b9350602085013591508082111561466b57600080fd5b50614678858286016143df565b9150509250929050565b600081518084526020808501945080840160005b838110156146b257815187529582019590820190600101614696565b509495945050505050565b602081526000610c6b6020830184614682565b6000806000606084860312156146e557600080fd5b8335925060208401356146f7816141ab565b915060408401356001600160601b038116811461471357600080fd5b809150509250925092565b600061012082518452602083015161473a602086018215159052565b5060408301518160408601526147528286018261425b565b9150506060830151848203606086015261476c828261425b565b9150506080830151608085015260a083015160a085015260c083015160c085015260e083015160e08501526101008084015181860152508091505092915050565b602081526000610c6b602083018461471e565b918252602082015260400190565b600061012082840312156147e157600080fd5b50919050565b600080604083850312156147fa57600080fd5b82356001600160401b0381111561481057600080fd5b61481c858286016147ce565b95602094909401359450505050565b60008060006060848603121561484057600080fd5b833561484b816141ab565b925060208401356001600160401b038082111561486757600080fd5b614873878388016143df565b9350604086013591508082111561488957600080fd5b50614896868287016143df565b9150509250925092565b6000602082840312156148b257600080fd5b81356001600160401b038111156148c857600080fd5b6148d4848285016147ce565b949350505050565b6001600160a01b0391909116815260200190565b6000806020838503121561490357600080fd5b82356001600160401b038082111561491a57600080fd5b818501915085601f83011261492e57600080fd5b81358181111561493d57600080fd5b86602082850101111561494f57600080fd5b60209290920196919550909350505050565b60008083601f84011261497357600080fd5b5081356001600160401b0381111561498a57600080fd5b6020830191508360208260051b8501011115610b8857600080fd5b6000806000806000806000806080898b0312156149c157600080fd5b88356001600160401b03808211156149d857600080fd5b6149e48c838d01614961565b909a50985060208b01359150808211156149fd57600080fd5b614a098c838d01614961565b909850965060408b0135915080821115614a2257600080fd5b614a2e8c838d01614961565b909650945060608b0135915080821115614a4757600080fd5b50614a548b828c01614961565b999c989b5096995094979396929594505050565b60008060408385031215614a7b57600080fd5b8235614a86816141ab565b915060208301356001600160401b03811115614aa157600080fd5b614678858286016145b0565b80151581146127d957600080fd5b60008060408385031215614ace57600080fd5b8235614ad9816141ab565b915060208301356145a581614aad565b60ff811681146127d957600080fd5b80356141cb81614ae9565b803563ffffffff811681146141cb57600080fd5b600082601f830112614b2857600080fd5b81356020614b35826143bc565b60408051614b438382614346565b84815260059490941b8601830193838101925087851115614b6357600080fd5b8387015b85811015614c7a5780356001600160401b0380821115614b875760008081fd5b908901906060828c03601f1901811315614ba15760008081fd5b8551614bac81614321565b8884013583811115614bbe5760008081fd5b614bcc8e8b838801016145b0565b8252508684013583811115614be15760008081fd5b84019250603f83018d13614bf55760008081fd5b88830135614c02816143bc565b8851614c0e8282614346565b82815260059290921b85018901918b810191508f831115614c2f5760008081fd5b948901945b82861015614c5457614c4586614b03565b8252948b0194908b0190614c34565b838c015250614c669050848301614b03565b818801528752505050928401928401614b67565b50979650505050505050565b600082601f830112614c9757600080fd5b81356020614ca4826143bc565b604051614cb18282614346565b83815260059390931b8501820192828101915086841115614cd157600080fd5b8286015b848110156144455780356001600160401b0380821115614cf55760008081fd5b9088019060c0828b03601f1901811315614d0f5760008081fd5b614d17614372565b8784013583811115614d295760008081fd5b614d378d8a83880101614477565b825250604084013588820152606080850135604083015260808086013585811115614d625760008081fd5b614d708f8c838a0101614477565b838501525060a091508186013585811115614d8b5760008081fd5b614d998f8c838a0101614477565b9184019190915250919093013590830152508352918301918301614cd5565b60008060008060808587031215614dce57600080fd5b6001600160401b038535811015614de457600080fd5b8535860187601f820112614df757600080fd5b614e0181356143bc565b604051614e0e8282614346565b82358082526020808301935060059190911b8401018a811115614e3057600080fd5b602084015b81811015614f0c578581351115614e4b57600080fd5b8035850160e0818e03601f19011215614e6357600080fd5b614e6b61439a565b602082013588811115614e7d57600080fd5b614e8c8f602083860101614477565b82525060408201356020820152606082013588811115614eab57600080fd5b614eba8f602083860101614477565b60408301525060808201356060820152614ed660a083016141c0565b6080820152614ee760c083016141c0565b60a0820152614ef860e08301614af8565b60c082015285525060209384019301614e35565b50909750505050602086013581811115614f2557600080fd5b614f3188828901614b17565b945050604086013581811115614f4657600080fd5b614f5288828901614b17565b935050606086013581811115614f6757600080fd5b614f7388828901614c86565b9250505092959194509250565b60008060408385031215614f9357600080fd5b8235614f9e816141ab565b915060208301356145a5816141ab565b600080600080600060a08688031215614fc657600080fd5b8535614fd1816141ab565b94506020860135614fe1816141ab565b9350604086013592506060860135915060808601356001600160401b0381111561500a57600080fd5b61457388828901614477565b60008060006060848603121561502b57600080fd5b8335615036816141ab565b95602085013595506040909401359392505050565b600082601f83011261505c57600080fd5b815161506781614450565b6040516150748282614346565b82815285602084870101111561508957600080fd5b61509a83602083016020880161422f565b95945050505050565b6000602082840312156150b557600080fd5b81516001600160401b038111156150cb57600080fd5b6148d48482850161504b565b6020808252600190820152604160f81b604082015260600190565b6001600160a01b0392831681529116602082015260400190565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561513c5761513c61510c565b500290565b60008261515e57634e487b7160e01b600052601260045260246000fd5b500490565b6020808252600190820152604f60f81b604082015260600190565b60006020828403121561519057600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b6000600182016151bf576151bf61510c565b5060010190565b600181811c908216806151da57607f821691505b6020821081036147e157634e487b7160e01b600052602260045260246000fd5b6000813561093e81614aad565b6000808335601e1984360301811261521e57600080fd5b8301803591506001600160401b0382111561523857600080fd5b602001915036819003821315610b8857600080fd5b601f821115610f0f57600081815260208120601f850160051c810160208610156152745750805b601f850160051c820191505b818110156132ac57828155600101615280565b6001600160401b038311156152aa576152aa61430b565b6152be836152b883546151c6565b8361524d565b6000601f8411600181146152f257600085156152da5750838201355b600019600387901b1c1916600186901b178355610bc1565b600083815260209020601f19861690835b828110156153235786850135825560209485019460019092019101615303565b50868210156153405760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b8135815561537e615365602084016151fa565b6001830160ff1981541660ff8315151681178255505050565b61538b6040830183615207565b615399818360028601615293565b50506153a86060830183615207565b6153b6818360038601615293565b50506080820135600482015560a0820135600582015560c0820135600682015560e0820135600782015561010082013560088201555050565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b6001600160a01b0384168152604060208201819052810182905260006001600160fb1b0383111561546d57600080fd5b8260051b8085606085013760009201606001918252509392505050565b60006020828403121561549c57600080fd5b8151610c6b81614aad565b6000808335601e198436030181126154be57600080fd5b8301803591506001600160401b038211156154d857600080fd5b6020019150600581901b3603821315610b8857600080fd5b60006020808352835160c08285015261550c60e085018261471e565b905060018060a01b03828601511660408501526040850151606085015260608501516080850152608085015160a085015260a0850151601f198583030160c086015281815180845284840191508483019350600092505b808310156144455783518252928401926001929092019190840190615563565b80516141cb816141ab565b80516141cb81614ae9565b6000602082840312156155ab57600080fd5b81516001600160401b03808211156155c257600080fd5b9083019060e082860312156155d657600080fd5b6155de61439a565b8251828111156155ed57600080fd5b6155f98782860161504b565b8252506020830151602082015260408301518281111561561857600080fd5b6156248782860161504b565b6040830152506060830151606082015261564060808401615583565b608082015261565160a08401615583565b60a082015261566260c0840161558e565b60c082015295945050505050565b6000835161568281846020880161422f565b83519083019061569681836020880161422f565b600b60fa1b9101908152600101949350505050565b6020808252600190820152605360f81b604082015260600190565b600082516156d881846020870161422f565b9190910192915050565b6000815160e084526156f760e085018261425b565b9050602083015160208501526040830151848203604086015261571a828261425b565b91505060608301516060850152608083015160018060a01b0380821660808701528060a08601511660a0870152505060ff60c08401511660c08501528091505092915050565b805160608084528151908401819052600091602091908201906080860190845b818110156157a55783516001600160a01b031683529284019291840191600101615780565b50508483015186820387850152805180835290840192506000918401905b808310156157e957835163ffffffff1682529284019260019290920191908401906157c3565b5060408601519350615803604088018563ffffffff169052565b9695505050505050565b60608152600061582060608301866156e2565b82810360208401526158328186615760565b905082810360408401526158038185615760565b60008060006060848603121561585b57600080fd5b83516001600160401b038082111561587257600080fd5b61587e8783880161504b565b9450602086015191508082111561589457600080fd5b6158a08783880161504b565b935060408601519150808211156158b657600080fd5b506148968682870161504b565b60208152600082516101208060208501526158e261014085018361425b565b91506020850151601f1980868503016040870152615900848361425b565b9350604087015191508086850301606087015261591d848361425b565b9350606087015191508086850301608087015261593a848361425b565b9350608087015160a087015260a087015160c087015260c08701519150808685030160e087015261596b848361425b565b60e0880151610100888101919091528801518782039092018488015293509050615803838261425b565b6080815260006159a860808301876156e2565b82810360208401526159ba8187615760565b905082810360408401526159ce8186615760565b915050821515606083015295945050505050565b600085516159f4818460208a0161422f565b855190830190615a08818360208a0161422f565b621f0a9f60ea1b91018181528551909190615a2a816003850160208a0161422f565b60039201918201528351615a4581600684016020880161422f565b631f0a8a9f60e21b60069290910191820152600a019695505050505050565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b604081526000615b466040830185614682565b828103602084015261509a8185614682565b60008219821115615b6b57615b6b61510c565b500190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b815260008351615bed81601785016020880161422f565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351615c1e81602884016020880161422f565b01602801949350505050565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6001600160a01b03858116825284166020820152608060408201819052600090615ce590830185614682565b8281036060840152615cf78185614682565b979650505050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090615cf79083018461425b565b600060208284031215615d4e57600080fd5b8151610c6b816141fc565b600060033d11156133725760046000803e5060005160e01c90565b600060443d1015615d825790565b6040516003193d81016004833e81513d6001600160401b038083116024840183101715615db157505050505090565b8285019150815181811115615dc95750505050505090565b843d8701016020828501011115615de35750505050505090565b615df260208286010187614346565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b600081615e5457615e5461510c565b506000190190565b6001600160a01b0386811682528516602082015260a060408201819052600090615e8890830186614682565b8281036060840152615e9a8186614682565b90508281036080840152615eae818561425b565b98975050505050505050565b600082821015615ecc57615ecc61510c565b500390565b634e487b7160e01b600052603160045260246000fdfe4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fbc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f620c1b180fbb60448c5491c5ddc7c3a923854214b9ff70f90a7821333338971f928eb467f061ca67f42a2d2ca4a346fc9fb645efc0ba75056ee9f71c3a0ccc10a82ce8d04a9c35987429af538825cd2438cc5c5bb5dc427955f84daaa3ea105016a164736f6c634300080d000a
Deployed Bytecode
0x6080604052600436106102225760003560e01c8062fdd58e1461022757806301ffc9a71461025a57806306fdde031461028a5780630e89341c146102c257806313af4035146102e25780631e7269c514610304578063248a9ca3146103325780632a55205a146103525780632eb2c2d6146103805780632f2ff15d146103a05780632f745c59146103c057806336568abe146103e05780633b6fda59146104005780634b0ee02a146104395780634e1273f4146104595780634f558e7914610486578063572b6c05146104a65780635944c753146104c65780635c975abb146104e65780636182ff53146104fe57806363906d0d1461052b57806364274fef146105565780636b20c4541461057657806387b63e3a146105965780638b81a7ee146105b65780638da5cb5b146105d65780639010d07c146105fe57806391d148541461061e578063938e3d7b1461063e578063942593991461065e578063946d92041461067157806395d89b411461028a578063a0a8e46014610691578063a217fddf146106ad578063a22cb465146106c2578063b3738dfc146106e2578063bd85b03914610702578063bf66a18214610722578063c90a356e14610743578063ca15c87314610763578063cb2ef6f714610783578063d05a381a146107b6578063d2b5c0bb146107d6578063d547741f146107e9578063e8a3d48514610809578063e985e9c51461081e578063f242432a14610868578063f5298aca14610888575b600080fd5b34801561023357600080fd5b506102476102423660046141d0565b6108a8565b6040519081526020015b60405180910390f35b34801561026657600080fd5b5061027a610275366004614212565b610944565b6040519015158152602001610251565b34801561029657600080fd5b506040805180820190915260068152655253544c535360d01b60208201525b6040516102519190614287565b3480156102ce57600080fd5b506102b56102dd36600461429a565b610987565b3480156102ee57600080fd5b506103026102fd3660046142b3565b610a37565b005b34801561031057600080fd5b5061024761031f3660046142b3565b6101f76020526000908152604090205481565b34801561033e57600080fd5b5061024761034d36600461429a565b610aca565b34801561035e57600080fd5b5061037261036d3660046142d0565b610adf565b6040516102519291906142f2565b34801561038c57600080fd5b5061030261039b3660046144d3565b610b8f565b3480156103ac57600080fd5b506103026103bb366004614580565b610bc8565b3480156103cc57600080fd5b506102476103db3660046141d0565b610bf6565b3480156103ec57600080fd5b506103026103fb366004614580565b610c72565b34801561040c57600080fd5b5061024761041b3660046141d0565b6101f860209081526000928352604080842090915290825290205481565b34801561044557600080fd5b506102476104543660046142b3565b610cfc565b34801561046557600080fd5b5061047961047436600461461f565b610d6f565b60405161025191906146bd565b34801561049257600080fd5b5061027a6104a136600461429a565b610e98565b3480156104b257600080fd5b5061027a6104c13660046142b3565b610eab565b3480156104d257600080fd5b506103026104e13660046146d0565b610ec9565b3480156104f257600080fd5b5060655460ff1661027a565b34801561050a57600080fd5b5061051e61051936600461429a565b610f14565b60405161025191906147ad565b34801561053757600080fd5b5061021d5461021e54610548919082565b6040516102519291906147c0565b34801561056257600080fd5b506103026105713660046147e7565b6110fd565b34801561058257600080fd5b5061030261059136600461482b565b61113e565b3480156105a257600080fd5b506102476105b136600461429a565b611193565b3480156105c257600080fd5b506103026105d13660046148a0565b6111db565b3480156105e257600080fd5b5061021a546001600160a01b03165b60405161025191906148dc565b34801561060a57600080fd5b506105f16106193660046142d0565b611235565b34801561062a57600080fd5b5061027a610639366004614580565b61124e565b34801561064a57600080fd5b506103026106593660046148f0565b611279565b61030261066c3660046149a5565b6112a6565b34801561067d57600080fd5b5061030261068c366004614a68565b6119c1565b34801561069d57600080fd5b5060405160048152602001610251565b3480156106b957600080fd5b50610247600081565b3480156106ce57600080fd5b506103026106dd366004614abb565b611b59565b3480156106ee57600080fd5b5061027a6106fd36600461429a565b611b88565b34801561070e57600080fd5b5061024761071d36600461429a565b611bbc565b34801561072e57600080fd5b5061021b546105f1906001600160a01b031681565b34801561074f57600080fd5b5061030261075e366004614abb565b611bcf565b34801561076f57600080fd5b5061024761077e36600461429a565b611c45565b34801561078f57600080fd5b507f50726f7073455243313135355543726561746f72526f79616c74696573000000610247565b3480156107c257600080fd5b5061027a6107d13660046142b3565b611c5d565b6103026107e4366004614db8565b611d0f565b3480156107f557600080fd5b50610302610804366004614580565b61265d565b34801561081557600080fd5b506102b561267d565b34801561082a57600080fd5b5061027a610839366004614f80565b6001600160a01b0391821660009081526101606020908152604080832093909416825291909152205460ff1690565b34801561087457600080fd5b50610302610883366004614fae565b61270c565b34801561089457600080fd5b506103026108a3366004615016565b61273e565b60006001600160a01b0383166109185760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b50600081815261015f602090815260408083206001600160a01b03861684529091529020545b92915050565b600061094f82612793565b8061096a5750636cdb3d1360e11b6001600160e01b03198316145b8061093e5750506001600160e01b03191663152a902d60e11b1490565b6060600061099483611bbc565b116109c55760405162461bcd60e51b81526020600482015260016024820152605560f81b604482015260640161090f565b61021b54604051633bb3a24d60e01b8152600481018490526001600160a01b0390911690633bb3a24d90602401600060405180830381865afa158015610a0f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261093e91908101906150a3565b6000610a42816127c8565b610a4d60008361124e565b610a695760405162461bcd60e51b815260040161090f906150d7565b61021a80546001600160a01b038481166001600160a01b03198316179092556040519116907f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d7690610abd90839086906150f2565b60405180910390a1505050565b600090815260fb602052604090206001015490565b60008281526101f6602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610b565750604080518082019091526101f5546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090610b75906001600160601b031687615122565b610b7f9190615141565b91519350909150505b9250929050565b610b9885611c5d565b610bb45760405162461bcd60e51b815260040161090f90615163565b610bc185858585856127dc565b5050505050565b610bdf600080516020615f68833981519152611b88565b610be857600080fd5b610bf28282612833565b5050565b61021b54604051632f745c5960e01b81526000916001600160a01b031690632f745c5990610c2a90869086906004016142f2565b602060405180830381865afa158015610c47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c6b919061517e565b9392505050565b610c7a612856565b6001600160a01b0316816001600160a01b031614610cf25760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b606482015260840161090f565b610bf28282612865565b61021b546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610d2e9085906004016148dc565b602060405180830381865afa158015610d4b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061093e919061517e565b60608151835114610dd45760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b606482015260840161090f565b600083516001600160401b03811115610def57610def61430b565b604051908082528060200260200182016040528015610e18578160200160208202803683370190505b50905060005b8451811015610e9057610e63858281518110610e3c57610e3c615197565b6020026020010151858381518110610e5657610e56615197565b60200260200101516108a8565b828281518110610e7557610e75615197565b6020908102919091010152610e89816151ad565b9050610e1e565b509392505050565b600080610ea483611bbc565b1192915050565b6001600160a01b031660009081526097602052604090205460ff1690565b61021b546001600160a01b0316610ede612856565b6001600160a01b031614610f045760405162461bcd60e51b815260040161090f906150d7565b610f0f838383612888565b505050565b610f6860405180610120016040528060008019168152602001600015158152602001606081526020016060815260200160008152602001600081526020016000815260200160008152602001600081525090565b600082815261021f602090815260409182902082516101208101845281548152600182015460ff161515928101929092526002810180549293919291840191610fb0906151c6565b80601f0160208091040260200160405190810160405280929190818152602001828054610fdc906151c6565b80156110295780601f10610ffe57610100808354040283529160200191611029565b820191906000526020600020905b81548152906001019060200180831161100c57829003601f168201915b50505050508152602001600382018054611042906151c6565b80601f016020809104026020016040519081016040528092919081815260200182805461106e906151c6565b80156110bb5780601f10611090576101008083540402835291602001916110bb565b820191906000526020600020905b81548152906001019060200180831161109e57829003601f168201915b50505050508152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815250509050919050565b611114600080516020615f48833981519152611b88565b61111d57600080fd5b600081815261021f6020526040902082906111388282615352565b50505050565b611146612856565b6001600160a01b0316836001600160a01b0316148061116c575061116c83610839612856565b6111885760405162461bcd60e51b815260040161090f906153ef565b610f0f838383612995565b60006101f860006111a2612856565b6001600160a01b03166001600160a01b031681526020019081526020016000206000838152602001908152602001600020549050919050565b6111f2600080516020615f48833981519152611b88565b6111fb57600080fd5b61021e54600090815261021f60205260409020819061121a8282615352565b505061021e805490600061122d836151ad565b919050555050565b600082815261012d60205260408120610c6b9083612b2b565b600091825260fb602090815260408084206001600160a01b0393909316845291905290205460ff1690565b611290600080516020615f68833981519152611b88565b61129957600080fd5b610f0f610219838361407d565b6112ae612b37565b6112b6612b90565b61021b546001600160a01b031663ed9907a46112d0612856565b84846040518463ffffffff1660e01b81526004016112f09392919061543d565b602060405180830381865afa15801561130d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611331919061548a565b61133a57600080fd5b611342614101565b60005b888110156117f35789898281811061135f5761135f615197565b9050602002013582602001818151019150818152505060006040518060c0016040528061021d600201600088888781811061139c5761139c615197565b90506020020135815260200190815260200160002060405180610120016040529081600082015481526020016001820160009054906101000a900460ff161515151581526020016002820180546113f2906151c6565b80601f016020809104026020016040519081016040528092919081815260200182805461141e906151c6565b801561146b5780601f106114405761010080835404028352916020019161146b565b820191906000526020600020905b81548152906001019060200180831161144e57829003601f168201915b50505050508152602001600382018054611484906151c6565b80601f01602080910402602001604051908101604052809291908181526020018280546114b0906151c6565b80156114fd5780601f106114d2576101008083540402835291602001916114fd565b820191906000526020600020905b8154815290600101906020018083116114e057829003601f168201915b50505050508152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815250508152602001611545612856565b6001600160a01b031681526020016101f86000611560612856565b6001600160a01b03166001600160a01b03168152602001908152602001600020600088888781811061159457611594615197565b9050602002013581526020019081526020016000205481526020018c8c858181106115c1576115c1615197565b9050602002013581526020018888858181106115df576115df615197565b9050602002013581526020018a8a858181106115fd576115fd615197565b905060200281019061160f91906154a7565b80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250505091525061021b54604051634f9ff26160e01b81529192506001600160a01b031690634f9ff261906116749084906004016154f0565b60006040518083038186803b15801561168c57600080fd5b505afa1580156116a0573d6000803e3d6000fd5b5050505060008b8b848181106116b8576116b8615197565b9050602002013561021d60020160008888878181106116d9576116d9615197565b6020908102929092013583525081019190915260400160009081206004015486519202918201865261021b549192506001600160a01b039091169063e4b50cb89061021f9089898881811061173057611730615197565b905060200201358152602001908152602001600020600601546040518263ffffffff1660e01b815260040161176791815260200190565b600060405180830381865afa158015611784573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526117ac9190810190615599565b60a001516001600160a01b03166108fc829081150290604051600060405180830381858888f193505050501580156117e8573d6000803e3d6000fd5b505050600101611345565b5080513410156118165760405163356680b760e01b815260040160405180910390fd5b60005b888110156119725789898281811061183357611833615197565b905060200201356101f86000611847612856565b6001600160a01b03166001600160a01b03168152602001908152602001600020600086868581811061187b5761187b615197565b9050602002013581526020019081526020016000206000828254019250508190555081604001516118dd61021d60020160008787868181106118bf576118bf615197565b90506020020135815260200190815260200160002060060154612bd8565b6040516020016118ee929190615670565b60408051601f1981840301815291815283015261196a61190c612856565b61021f600087878681811061192357611923615197565b905060200201358152602001908152602001600020600601548c8c8581811061194e5761194e615197565b9050602002013560405180602001604052806000815250612c6a565b600101611819565b5061197b612856565b6001600160a01b0316600080516020615f2883398151915282604001516040516119a59190614287565b60405180910390a2506119b760018055565b5050505050505050565b600054610100900460ff16158080156119e15750600054600160ff909116105b80611a0257506119f030612d9d565b158015611a02575060005460ff166001145b611a655760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161090f565b6000805460ff191660011790558015611a88576000805461ff0019166101001790555b611a90612dac565b611a9982612ddb565b611ab160405180602001604052806000815250612e13565b61021a80546001600160a01b0319166001600160a01b038516179055611ad8600084610be8565b611af1600080516020615f688339815191526000612e43565b611b17600080516020615f48833981519152600080516020615f68833981519152612e43565b8015610f0f576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602001610abd565b611b6282611c5d565b611b7e5760405162461bcd60e51b815260040161090f90615163565b610bf28282612e96565b6000611b9682610639612856565b15611ba357506001919050565b81611bb057506000919050565b61093e6106fd83610aca565b6000908152610191602052604090205490565b611be6600080516020615f68833981519152611b88565b611bef57600080fd5b61021b80546001600160a01b0319166001600160a01b038416179055808015611c1b575060655460ff16155b15611c2857611c28612ea8565b80158015611c38575060655460ff165b15610bf257610bf2612efd565b600081815261012d6020526040812061093e90612f38565b60006daaeb6d7670e522a718067333cd4e3b15611d0757604051633185c44d60e21b81526daaeb6d7670e522a718067333cd4e9063c617113490611ca790309086906004016150f2565b602060405180830381865afa158015611cc4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ce8919061548a565b611d075781604051633b79c77360e21b815260040161090f91906148dc565b506001919050565b611d17612b37565b611d1f612b90565b61021b546001600160a01b031663df592f7d611d39612856565b6040518263ffffffff1660e01b8152600401611d5591906148dc565b602060405180830381865afa158015611d72573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d96919061548a565b15611db35760405162461bcd60e51b815260040161090f906156ab565b611dbb614101565b611ddf60405180606001604052806000815260200160008152602001600081525090565b60015b600a8111611e0657611df381611bbc565b6020830180519091019052600101611de2565b5060005b8651811015611e4657838181518110611e2557611e25615197565b60209081029190910181015101516040830180519091019052600101611e0a565b506103e881604001518260200151011115611e885760405162461bcd60e51b8152602060048201526002602482015261513160f01b604482015260640161090f565b5060005b855181101561261857610220838281518110611eaa57611eaa615197565b602002602001015160600151604051611ec391906156c6565b9081526040519081900360200190205460ff1615611f075760405162461bcd60e51b81526020600482015260016024820152602760f91b604482015260640161090f565b6001610220848381518110611f1e57611f1e615197565b602002602001015160600151604051611f3791906156c6565b908152602001604051809103902060006101000a81548160ff0219169083151502179055506000838281518110611f7057611f70615197565b602002602001015160200151848381518110611f8e57611f8e615197565b60209081029190910101516040015184519102908101808552909150341015611fca5760405163356680b760e01b815260040160405180910390fd5b61021b548751606091829182916001600160a01b031690633bcf5cce908c9088908110611ff957611ff9615197565b60200260200101518b888151811061201357612013615197565b60200260200101518b898151811061202d5761202d615197565b60200260200101516040518463ffffffff1660e01b81526004016120539392919061580d565b600060405180830381865afa158015612070573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526120989190810190615846565b80935081945082955050505060006040518061012001604052808581526020018481526020018381526020018988815181106120d6576120d6615197565b60200260200101516000015181526020018988815181106120f9576120f9615197565b602002602001015160200151815260200189888151811061211c5761211c615197565b602002602001015160400151815260200189888151811061213f5761213f615197565b602002602001015160600151815260200189888151811061216257612162615197565b602002602001015160a00151815260200189888151811061218557612185615197565b602090810291909101015160800151905261021b54604051631fd08af360e31b81529192506001600160a01b03169063fe845798906121c89084906004016158c3565b60006040518083038186803b1580156121e057600080fd5b505afa1580156121f4573d6000803e3d6000fd5b50505050600061022189888151811061220f5761220f615197565b60200260200101516000015160405161222891906156c6565b90815260405190819003602001902054905080156122d45761021b54604051631c96a19760e31b8152600481018390526001600160a01b039091169063e4b50cb890602401600060405180830381865afa15801561228a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526122b29190810190615599565b8c88815181106122c4576122c4615197565b602002602001018190525061241c565b61021b548c516001600160a01b03909116906368f3af50908e908a9081106122fe576122fe615197565b60200260200101518d8a8151811061231857612318615197565b60200260200101518d8b8151811061233257612332615197565b602002602001015160016040518563ffffffff1660e01b815260040161235b9493929190615995565b6000604051808303816000875af115801561237a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526123a29190810190615599565b8c88815181106123b4576123b4615197565b60200260200101819052508b87815181106123d1576123d1615197565b6020026020010151602001516102218a89815181106123f2576123f2615197565b60200260200101516000015160405161240b91906156c6565b908152604051908190036020019020555b61021b548c516001600160a01b039091169063e4b50cb8908e908a90811061244657612446615197565b6020026020010151602001516040518263ffffffff1660e01b815260040161247091815260200190565b600060405180830381865afa15801561248d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526124b59190810190615599565b60a001516001600160a01b03166108fc879081150290604051600060405180830381858888f193505050501580156124f1573d6000803e3d6000fd5b50876040015161251d8d898151811061250c5761250c615197565b602002602001015160200151612bd8565b8a898151811061252f5761252f615197565b6020026020010151600001516000841161256557604051806040016040528060048152602001637472756560e01b815250612584565b6040518060400160405280600581526020016466616c736560d81b8152505b60405160200161259794939291906159e2565b60408051601f198184030181529181528901526126066125b5612856565b8d89815181106125c7576125c7615197565b6020026020010151602001518b8a815181106125e5576125e5615197565b60200260200101516020015160405180602001604052806000815250612c6a565b505060019094019350611e8c92505050565b50612621612856565b6001600160a01b0316600080516020615f28833981519152826040015160405161264b9190614287565b60405180910390a25061113860018055565b612674600080516020615f68833981519152611b88565b610cf257600080fd5b610219805461268b906151c6565b80601f01602080910402602001604051908101604052809291908181526020018280546126b7906151c6565b80156127045780601f106126d957610100808354040283529160200191612704565b820191906000526020600020905b8154815290600101906020018083116126e757829003601f168201915b505050505081565b61271585611c5d565b6127315760405162461bcd60e51b815260040161090f90615163565b610bc18585858585612f42565b612746612856565b6001600160a01b0316836001600160a01b0316148061276c575061276c83610839612856565b6127885760405162461bcd60e51b815260040161090f906153ef565b610f0f838383612f99565b60006001600160e01b0319821663152a902d60e11b148061093e57506301ffc9a760e01b6001600160e01b031983161461093e565b6127d9816127d4612856565b6130b3565b50565b6127e4612856565b6001600160a01b0316856001600160a01b0316148061280a575061280a85610839612856565b6128265760405162461bcd60e51b815260040161090f906153ef565b610bc1858585858561310c565b61283d82826132b4565b600082815261012d60205260409020610f0f908261333b565b6000612860613350565b905090565b61286f8282613375565b600082815261012d60205260409020610f0f90826133fa565b6127106001600160601b03821611156128f65760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b606482015260840161090f565b6001600160a01b03821661294a5760405162461bcd60e51b815260206004820152601b60248201527a455243323938313a20496e76616c696420706172616d657465727360281b604482015260640161090f565b6040805180820182526001600160a01b0393841681526001600160601b03928316602080830191825260009687526101f690529190942093519051909116600160a01b029116179055565b6001600160a01b0383166129bb5760405162461bcd60e51b815260040161090f90615a64565b80518251146129dc5760405162461bcd60e51b815260040161090f90615aa7565b60006129e6612856565b9050612a068185600086866040518060200160405280600081525061340f565b60005b8351811015612ad0576000848281518110612a2657612a26615197565b602002602001015190506000848381518110612a4457612a44615197565b602090810291909101810151600084815261015f835260408082206001600160a01b038c168352909352919091205490915081811015612a965760405162461bcd60e51b815260040161090f90615aef565b600092835261015f602090815260408085206001600160a01b038b1686529091529092209103905580612ac8816151ad565b915050612a09565b5060006001600160a01b0316846001600160a01b0316826001600160a01b0316600080516020615ee88339815191528686604051612b0f929190615b33565b60405180910390a4604080516020810190915260009052611138565b6000610c6b8383613515565b600260015403612b895760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161090f565b6002600155565b60655460ff1615612bd65760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640161090f565b565b60606000612be58361353f565b60010190506000816001600160401b03811115612c0457612c0461430b565b6040519080825280601f01601f191660200182016040528015612c2e576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084612c3857509392505050565b6001600160a01b038416612cca5760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b606482015260840161090f565b6000612cd4612856565b90506000612ce185613615565b90506000612cee85613615565b9050612cff8360008985858961340f565b600086815261015f602090815260408083206001600160a01b038b16845290915281208054879290612d32908490615b58565b92505081905550866001600160a01b031660006001600160a01b0316846001600160a01b0316600080516020615f088339815191528989604051612d779291906147c0565b60405180910390a4612d8e83600089898989613660565b50505050505050565b60018055565b6001600160a01b03163b151590565b600054610100900460ff16612dd35760405162461bcd60e51b815260040161090f90615b70565b612bd66137c2565b600054610100900460ff16612e025760405162461bcd60e51b815260040161090f90615b70565b612e0a6137e9565b6127d981613810565b600054610100900460ff16612e3a5760405162461bcd60e51b815260040161090f90615b70565b6127d98161389f565b6000612e4e83610aca565b600084815260fb6020526040808220600101859055519192508391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b610bf2612ea1612856565b83836138cf565b612eb0612b90565b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612ee6612856565b604051612ef391906148dc565b60405180910390a1565b612f056139b0565b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa612ee6612856565b600061093e825490565b612f4a612856565b6001600160a01b0316856001600160a01b03161480612f705750612f7085610839612856565b612f8c5760405162461bcd60e51b815260040161090f906153ef565b610bc185858585856139f9565b6001600160a01b038316612fbf5760405162461bcd60e51b815260040161090f90615a64565b6000612fc9612856565b90506000612fd684613615565b90506000612fe384613615565b90506130038387600085856040518060200160405280600081525061340f565b600085815261015f602090815260408083206001600160a01b038a168452909152902054848110156130475760405162461bcd60e51b815260040161090f90615aef565b600086815261015f602090815260408083206001600160a01b03808c1680865291909352818420898603905590519091871690600080516020615f0883398151915290613097908b908b906147c0565b60405180910390a4604080516020810190915260009052612d8e565b6130bd828261124e565b610bf2576130ca81613b3c565b6130d5836020613b4e565b6040516020016130e6929190615bbb565b60408051601f198184030181529082905262461bcd60e51b825261090f91600401614287565b815183511461312d5760405162461bcd60e51b815260040161090f90615aa7565b6001600160a01b0384166131535760405162461bcd60e51b815260040161090f90615c2a565b600061315d612856565b905061316d81878787878761340f565b60005b845181101561325857600085828151811061318d5761318d615197565b6020026020010151905060008583815181106131ab576131ab615197565b602090810291909101810151600084815261015f835260408082206001600160a01b038e1683529093529190912054909150818110156131fd5760405162461bcd60e51b815260040161090f90615c6f565b600083815261015f602090815260408083206001600160a01b038e8116855292528083208585039055908b1682528120805484929061323d908490615b58565b9250508190555050505080613251906151ad565b9050613170565b50846001600160a01b0316866001600160a01b0316826001600160a01b0316600080516020615ee88339815191528787604051613296929190615b33565b60405180910390a46132ac818787878787613ce9565b505050505050565b6132be828261124e565b610bf257600082815260fb602090815260408083206001600160a01b03851684529091529020805460ff191660011790556132f7612856565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610c6b836001600160a01b038416613dab565b600061335b33610eab565b1561336d575060131936013560601c90565b503390565b90565b61337f828261124e565b15610bf257600082815260fb602090815260408083206001600160a01b03851684529091529020805460ff191690556133b6612856565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b6000610c6b836001600160a01b038416613dfa565b61021b5460405163df592f7d60e01b81526001600160a01b039091169063df592f7d906134409087906004016148dc565b602060405180830381865afa15801561345d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613481919061548a565b1561349e5760405162461bcd60e51b815260040161090f906156ab565b61021b54604051637fbd487360e01b81526001600160a01b0390911690637fbd4873906134d5908890889088908890600401615cb9565b600060405180830381600087803b1580156134ef57600080fd5b505af1158015613503573d6000803e3d6000fd5b505050506132ac868686868686613eed565b600082600001828154811061352c5761352c615197565b9060005260206000200154905092915050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b831061357e5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6904ee2d6d415b85acef8160201b83106135a8576904ee2d6d415b85acef8160201b830492506020015b662386f26fc1000083106135c657662386f26fc10000830492506010015b6305f5e10083106135de576305f5e100830492506008015b61271083106135f257612710830492506004015b60648310613604576064830492506002015b600a831061093e5760010192915050565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061364f5761364f615197565b602090810291909101015292915050565b613672846001600160a01b0316612d9d565b156132ac5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906136ab9089908990889088908890600401615d02565b6020604051808303816000875af19250505080156136e6575060408051601f3d908101601f191682019092526136e391810190615d3c565b60015b613792576136f2615d59565b806308c379a00361372b5750613706615d74565b80613711575061372d565b8060405162461bcd60e51b815260040161090f9190614287565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b606482015260840161090f565b6001600160e01b0319811663f23a6e6160e01b14612d8e5760405162461bcd60e51b815260040161090f90615dfd565b600054610100900460ff16612d975760405162461bcd60e51b815260040161090f90615b70565b600054610100900460ff16612bd65760405162461bcd60e51b815260040161090f90615b70565b600054610100900460ff166138375760405162461bcd60e51b815260040161090f90615b70565b60005b8151811015610bf25760016097600084848151811061385b5761385b615197565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905580613897816151ad565b91505061383a565b600054610100900460ff166138c65760405162461bcd60e51b815260040161090f90615b70565b6127d981614069565b816001600160a01b0316836001600160a01b0316036139425760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b606482015260840161090f565b6001600160a01b0383811660008181526101606020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60655460ff16612bd65760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161090f565b6001600160a01b038416613a1f5760405162461bcd60e51b815260040161090f90615c2a565b6000613a29612856565b90506000613a3685613615565b90506000613a4385613615565b9050613a5383898985858961340f565b600086815261015f602090815260408083206001600160a01b038c16845290915290205485811015613a975760405162461bcd60e51b815260040161090f90615c6f565b600087815261015f602090815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290613ad7908490615b58565b92505081905550876001600160a01b0316896001600160a01b0316856001600160a01b0316600080516020615f088339815191528a8a604051613b1b9291906147c0565b60405180910390a4613b31848a8a8a8a8a613660565b505050505050505050565b606061093e6001600160a01b03831660145b60606000613b5d836002615122565b613b68906002615b58565b6001600160401b03811115613b7f57613b7f61430b565b6040519080825280601f01601f191660200182016040528015613ba9576020820181803683370190505b509050600360fc1b81600081518110613bc457613bc4615197565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613bf357613bf3615197565b60200101906001600160f81b031916908160001a9053506000613c17846002615122565b613c22906001615b58565b90505b6001811115613c9a576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110613c5657613c56615197565b1a60f81b828281518110613c6c57613c6c615197565b60200101906001600160f81b031916908160001a90535060049490941c93613c9381615e45565b9050613c25565b508315610c6b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161090f565b613cfb846001600160a01b0316612d9d565b156132ac5760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190613d349089908990889088908890600401615e5c565b6020604051808303816000875af1925050508015613d6f575060408051601f3d908101601f19168201909252613d6c91810190615d3c565b60015b613d7b576136f2615d59565b6001600160e01b0319811663bc197c8160e01b14612d8e5760405162461bcd60e51b815260040161090f90615dfd565b6000818152600183016020526040812054613df25750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561093e565b50600061093e565b60008181526001830160205260408120548015613ee3576000613e1e600183615eba565b8554909150600090613e3290600190615eba565b9050818114613e97576000866000018281548110613e5257613e52615197565b9060005260206000200154905080876000018481548110613e7557613e75615197565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613ea857613ea8615ed1565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061093e565b600091505061093e565b6001600160a01b038516613f755760005b8351811015613f7357828181518110613f1957613f19615197565b60200260200101516101916000868481518110613f3857613f38615197565b602002602001015181526020019081526020016000206000828254613f5d9190615b58565b90915550613f6c9050816151ad565b9050613efe565b505b6001600160a01b0384166132ac5760005b8351811015612d8e576000848281518110613fa357613fa3615197565b602002602001015190506000848381518110613fc157613fc1615197565b6020026020010151905060006101916000848152602001908152602001600020549050818110156140455760405162461bcd60e51b815260206004820152602860248201527f455243313135353a206275726e20616d6f756e74206578636565647320746f74604482015267616c537570706c7960c01b606482015260840161090f565b6000928352610191602052604090922091039055614062816151ad565b9050613f86565b8051610bf290610161906020840190614122565b828054614089906151c6565b90600052602060002090601f0160209004810192826140ab57600085556140f1565b82601f106140c45782800160ff198235161785556140f1565b828001600101855582156140f1579182015b828111156140f15782358255916020019190600101906140d6565b506140fd929150614196565b5090565b60405180606001604052806000815260200160008152602001606081525090565b82805461412e906151c6565b90600052602060002090601f01602090048101928261415057600085556140f1565b82601f1061416957805160ff19168380011785556140f1565b828001600101855582156140f1579182015b828111156140f157825182559160200191906001019061417b565b5b808211156140fd5760008155600101614197565b6001600160a01b03811681146127d957600080fd5b80356141cb816141ab565b919050565b600080604083850312156141e357600080fd5b82356141ee816141ab565b946020939093013593505050565b6001600160e01b0319811681146127d957600080fd5b60006020828403121561422457600080fd5b8135610c6b816141fc565b60005b8381101561424a578181015183820152602001614232565b838111156111385750506000910152565b6000815180845261427381602086016020860161422f565b601f01601f19169290920160200192915050565b602081526000610c6b602083018461425b565b6000602082840312156142ac57600080fd5b5035919050565b6000602082840312156142c557600080fd5b8135610c6b816141ab565b600080604083850312156142e357600080fd5b50508035926020909101359150565b6001600160a01b03929092168252602082015260400190565b634e487b7160e01b600052604160045260246000fd5b606081016001600160401b03811182821017156143405761434061430b565b60405250565b601f8201601f191681016001600160401b038111828210171561436b5761436b61430b565b6040525050565b60405160c081016001600160401b03811182821017156143945761439461430b565b60405290565b60405160e081016001600160401b03811182821017156143945761439461430b565b60006001600160401b038211156143d5576143d561430b565b5060051b60200190565b600082601f8301126143f057600080fd5b813560206143fd826143bc565b60405161440a8282614346565b83815260059390931b850182019282810191508684111561442a57600080fd5b8286015b84811015614445578035835291830191830161442e565b509695505050505050565b60006001600160401b038211156144695761446961430b565b50601f01601f191660200190565b600082601f83011261448857600080fd5b813561449381614450565b6040516144a08282614346565b8281528560208487010111156144b557600080fd5b82602086016020830137600092810160200192909252509392505050565b600080600080600060a086880312156144eb57600080fd5b85356144f6816141ab565b94506020860135614506816141ab565b935060408601356001600160401b038082111561452257600080fd5b61452e89838a016143df565b9450606088013591508082111561454457600080fd5b61455089838a016143df565b9350608088013591508082111561456657600080fd5b5061457388828901614477565b9150509295509295909350565b6000806040838503121561459357600080fd5b8235915060208301356145a5816141ab565b809150509250929050565b600082601f8301126145c157600080fd5b813560206145ce826143bc565b6040516145db8282614346565b83815260059390931b85018201928281019150868411156145fb57600080fd5b8286015b84811015614445578035614612816141ab565b83529183019183016145ff565b6000806040838503121561463257600080fd5b82356001600160401b038082111561464957600080fd5b614655868387016145b0565b9350602085013591508082111561466b57600080fd5b50614678858286016143df565b9150509250929050565b600081518084526020808501945080840160005b838110156146b257815187529582019590820190600101614696565b509495945050505050565b602081526000610c6b6020830184614682565b6000806000606084860312156146e557600080fd5b8335925060208401356146f7816141ab565b915060408401356001600160601b038116811461471357600080fd5b809150509250925092565b600061012082518452602083015161473a602086018215159052565b5060408301518160408601526147528286018261425b565b9150506060830151848203606086015261476c828261425b565b9150506080830151608085015260a083015160a085015260c083015160c085015260e083015160e08501526101008084015181860152508091505092915050565b602081526000610c6b602083018461471e565b918252602082015260400190565b600061012082840312156147e157600080fd5b50919050565b600080604083850312156147fa57600080fd5b82356001600160401b0381111561481057600080fd5b61481c858286016147ce565b95602094909401359450505050565b60008060006060848603121561484057600080fd5b833561484b816141ab565b925060208401356001600160401b038082111561486757600080fd5b614873878388016143df565b9350604086013591508082111561488957600080fd5b50614896868287016143df565b9150509250925092565b6000602082840312156148b257600080fd5b81356001600160401b038111156148c857600080fd5b6148d4848285016147ce565b949350505050565b6001600160a01b0391909116815260200190565b6000806020838503121561490357600080fd5b82356001600160401b038082111561491a57600080fd5b818501915085601f83011261492e57600080fd5b81358181111561493d57600080fd5b86602082850101111561494f57600080fd5b60209290920196919550909350505050565b60008083601f84011261497357600080fd5b5081356001600160401b0381111561498a57600080fd5b6020830191508360208260051b8501011115610b8857600080fd5b6000806000806000806000806080898b0312156149c157600080fd5b88356001600160401b03808211156149d857600080fd5b6149e48c838d01614961565b909a50985060208b01359150808211156149fd57600080fd5b614a098c838d01614961565b909850965060408b0135915080821115614a2257600080fd5b614a2e8c838d01614961565b909650945060608b0135915080821115614a4757600080fd5b50614a548b828c01614961565b999c989b5096995094979396929594505050565b60008060408385031215614a7b57600080fd5b8235614a86816141ab565b915060208301356001600160401b03811115614aa157600080fd5b614678858286016145b0565b80151581146127d957600080fd5b60008060408385031215614ace57600080fd5b8235614ad9816141ab565b915060208301356145a581614aad565b60ff811681146127d957600080fd5b80356141cb81614ae9565b803563ffffffff811681146141cb57600080fd5b600082601f830112614b2857600080fd5b81356020614b35826143bc565b60408051614b438382614346565b84815260059490941b8601830193838101925087851115614b6357600080fd5b8387015b85811015614c7a5780356001600160401b0380821115614b875760008081fd5b908901906060828c03601f1901811315614ba15760008081fd5b8551614bac81614321565b8884013583811115614bbe5760008081fd5b614bcc8e8b838801016145b0565b8252508684013583811115614be15760008081fd5b84019250603f83018d13614bf55760008081fd5b88830135614c02816143bc565b8851614c0e8282614346565b82815260059290921b85018901918b810191508f831115614c2f5760008081fd5b948901945b82861015614c5457614c4586614b03565b8252948b0194908b0190614c34565b838c015250614c669050848301614b03565b818801528752505050928401928401614b67565b50979650505050505050565b600082601f830112614c9757600080fd5b81356020614ca4826143bc565b604051614cb18282614346565b83815260059390931b8501820192828101915086841115614cd157600080fd5b8286015b848110156144455780356001600160401b0380821115614cf55760008081fd5b9088019060c0828b03601f1901811315614d0f5760008081fd5b614d17614372565b8784013583811115614d295760008081fd5b614d378d8a83880101614477565b825250604084013588820152606080850135604083015260808086013585811115614d625760008081fd5b614d708f8c838a0101614477565b838501525060a091508186013585811115614d8b5760008081fd5b614d998f8c838a0101614477565b9184019190915250919093013590830152508352918301918301614cd5565b60008060008060808587031215614dce57600080fd5b6001600160401b038535811015614de457600080fd5b8535860187601f820112614df757600080fd5b614e0181356143bc565b604051614e0e8282614346565b82358082526020808301935060059190911b8401018a811115614e3057600080fd5b602084015b81811015614f0c578581351115614e4b57600080fd5b8035850160e0818e03601f19011215614e6357600080fd5b614e6b61439a565b602082013588811115614e7d57600080fd5b614e8c8f602083860101614477565b82525060408201356020820152606082013588811115614eab57600080fd5b614eba8f602083860101614477565b60408301525060808201356060820152614ed660a083016141c0565b6080820152614ee760c083016141c0565b60a0820152614ef860e08301614af8565b60c082015285525060209384019301614e35565b50909750505050602086013581811115614f2557600080fd5b614f3188828901614b17565b945050604086013581811115614f4657600080fd5b614f5288828901614b17565b935050606086013581811115614f6757600080fd5b614f7388828901614c86565b9250505092959194509250565b60008060408385031215614f9357600080fd5b8235614f9e816141ab565b915060208301356145a5816141ab565b600080600080600060a08688031215614fc657600080fd5b8535614fd1816141ab565b94506020860135614fe1816141ab565b9350604086013592506060860135915060808601356001600160401b0381111561500a57600080fd5b61457388828901614477565b60008060006060848603121561502b57600080fd5b8335615036816141ab565b95602085013595506040909401359392505050565b600082601f83011261505c57600080fd5b815161506781614450565b6040516150748282614346565b82815285602084870101111561508957600080fd5b61509a83602083016020880161422f565b95945050505050565b6000602082840312156150b557600080fd5b81516001600160401b038111156150cb57600080fd5b6148d48482850161504b565b6020808252600190820152604160f81b604082015260600190565b6001600160a01b0392831681529116602082015260400190565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561513c5761513c61510c565b500290565b60008261515e57634e487b7160e01b600052601260045260246000fd5b500490565b6020808252600190820152604f60f81b604082015260600190565b60006020828403121561519057600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b6000600182016151bf576151bf61510c565b5060010190565b600181811c908216806151da57607f821691505b6020821081036147e157634e487b7160e01b600052602260045260246000fd5b6000813561093e81614aad565b6000808335601e1984360301811261521e57600080fd5b8301803591506001600160401b0382111561523857600080fd5b602001915036819003821315610b8857600080fd5b601f821115610f0f57600081815260208120601f850160051c810160208610156152745750805b601f850160051c820191505b818110156132ac57828155600101615280565b6001600160401b038311156152aa576152aa61430b565b6152be836152b883546151c6565b8361524d565b6000601f8411600181146152f257600085156152da5750838201355b600019600387901b1c1916600186901b178355610bc1565b600083815260209020601f19861690835b828110156153235786850135825560209485019460019092019101615303565b50868210156153405760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b8135815561537e615365602084016151fa565b6001830160ff1981541660ff8315151681178255505050565b61538b6040830183615207565b615399818360028601615293565b50506153a86060830183615207565b6153b6818360038601615293565b50506080820135600482015560a0820135600582015560c0820135600682015560e0820135600782015561010082013560088201555050565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b6001600160a01b0384168152604060208201819052810182905260006001600160fb1b0383111561546d57600080fd5b8260051b8085606085013760009201606001918252509392505050565b60006020828403121561549c57600080fd5b8151610c6b81614aad565b6000808335601e198436030181126154be57600080fd5b8301803591506001600160401b038211156154d857600080fd5b6020019150600581901b3603821315610b8857600080fd5b60006020808352835160c08285015261550c60e085018261471e565b905060018060a01b03828601511660408501526040850151606085015260608501516080850152608085015160a085015260a0850151601f198583030160c086015281815180845284840191508483019350600092505b808310156144455783518252928401926001929092019190840190615563565b80516141cb816141ab565b80516141cb81614ae9565b6000602082840312156155ab57600080fd5b81516001600160401b03808211156155c257600080fd5b9083019060e082860312156155d657600080fd5b6155de61439a565b8251828111156155ed57600080fd5b6155f98782860161504b565b8252506020830151602082015260408301518281111561561857600080fd5b6156248782860161504b565b6040830152506060830151606082015261564060808401615583565b608082015261565160a08401615583565b60a082015261566260c0840161558e565b60c082015295945050505050565b6000835161568281846020880161422f565b83519083019061569681836020880161422f565b600b60fa1b9101908152600101949350505050565b6020808252600190820152605360f81b604082015260600190565b600082516156d881846020870161422f565b9190910192915050565b6000815160e084526156f760e085018261425b565b9050602083015160208501526040830151848203604086015261571a828261425b565b91505060608301516060850152608083015160018060a01b0380821660808701528060a08601511660a0870152505060ff60c08401511660c08501528091505092915050565b805160608084528151908401819052600091602091908201906080860190845b818110156157a55783516001600160a01b031683529284019291840191600101615780565b50508483015186820387850152805180835290840192506000918401905b808310156157e957835163ffffffff1682529284019260019290920191908401906157c3565b5060408601519350615803604088018563ffffffff169052565b9695505050505050565b60608152600061582060608301866156e2565b82810360208401526158328186615760565b905082810360408401526158038185615760565b60008060006060848603121561585b57600080fd5b83516001600160401b038082111561587257600080fd5b61587e8783880161504b565b9450602086015191508082111561589457600080fd5b6158a08783880161504b565b935060408601519150808211156158b657600080fd5b506148968682870161504b565b60208152600082516101208060208501526158e261014085018361425b565b91506020850151601f1980868503016040870152615900848361425b565b9350604087015191508086850301606087015261591d848361425b565b9350606087015191508086850301608087015261593a848361425b565b9350608087015160a087015260a087015160c087015260c08701519150808685030160e087015261596b848361425b565b60e0880151610100888101919091528801518782039092018488015293509050615803838261425b565b6080815260006159a860808301876156e2565b82810360208401526159ba8187615760565b905082810360408401526159ce8186615760565b915050821515606083015295945050505050565b600085516159f4818460208a0161422f565b855190830190615a08818360208a0161422f565b621f0a9f60ea1b91018181528551909190615a2a816003850160208a0161422f565b60039201918201528351615a4581600684016020880161422f565b631f0a8a9f60e21b60069290910191820152600a019695505050505050565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b604081526000615b466040830185614682565b828103602084015261509a8185614682565b60008219821115615b6b57615b6b61510c565b500190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b815260008351615bed81601785016020880161422f565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351615c1e81602884016020880161422f565b01602801949350505050565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6001600160a01b03858116825284166020820152608060408201819052600090615ce590830185614682565b8281036060840152615cf78185614682565b979650505050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090615cf79083018461425b565b600060208284031215615d4e57600080fd5b8151610c6b816141fc565b600060033d11156133725760046000803e5060005160e01c90565b600060443d1015615d825790565b6040516003193d81016004833e81513d6001600160401b038083116024840183101715615db157505050505090565b8285019150815181811115615dc95750505050505090565b843d8701016020828501011115615de35750505050505090565b615df260208286010187614346565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b600081615e5457615e5461510c565b506000190190565b6001600160a01b0386811682528516602082015260a060408201819052600090615e8890830186614682565b8281036060840152615e9a8186614682565b90508281036080840152615eae818561425b565b98975050505050505050565b600082821015615ecc57615ecc61510c565b500390565b634e487b7160e01b600052603160045260246000fdfe4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fbc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f620c1b180fbb60448c5491c5ddc7c3a923854214b9ff70f90a7821333338971f928eb467f061ca67f42a2d2ca4a346fc9fb645efc0ba75056ee9f71c3a0ccc10a82ce8d04a9c35987429af538825cd2438cc5c5bb5dc427955f84daaa3ea105016a164736f6c634300080d000a
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.