Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
Bueno1155Drop
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155SupplyUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/common/ERC2981Upgradeable.sol"; import "operator-filter-registry/src/upgradeable/OperatorFiltererUpgradeable.sol"; import "./ICommon.sol"; struct TokenSettings { /// @dev total number of tokens that can be minted uint32 maxSupply; /// @dev total number of tokens that can be minted per wallet uint32 maxPerWallet; /// @dev tracks the total amount that have been minted uint32 amountMinted; /// @dev merkle root associated with claiming the token, otherwise bytes32(0) bytes32 merkleRoot; /// @dev timestamp of when the token can be minted uint32 mintStart; /// @dev timestamp of when the token can no longer be minted uint32 mintEnd; /// @dev price for the phase uint256 price; /// @dev uuid of the token within the Bueno ecosystem string uuid; /// @dev optional revenue splitting settings PaymentSplitterSettings paymentSplitterSettings; } struct TokenData { TokenSettings settings; uint256 index; } error TokenSettingsLocked(); error TokenAlreadyExists(); error InvalidPaymentSplitterSettings(); error TooManyTokens(); error InvalidToken(); error MintNotActive(); error InvalidMintDates(); /// @author Bueno.art /// @title ERC-1155 "Drops" contract contract Bueno1155Drop is ERC1155SupplyUpgradeable, OwnableUpgradeable, ERC2981Upgradeable, OperatorFiltererUpgradeable { string public name; string public symbol; uint256 private _currentTokenId; bool private allowBurning; /// @dev maps the token ID (eg 1, 2 ...n) to the token's minting settings mapping(uint256 => TokenSettings) private _tokens; /// @dev track how many mints a particular wallet has made for a given token mapping(uint256 => mapping(address => uint64)) private _mintBalanceByTokenId; /// @dev track how much revenue each payee has earned mapping(address => uint256) private _revenueByAddress; /// @dev track how much revenue has been released to each address mapping(address => uint256) private _released; /// @dev track how much revenue has been released in total uint256 private _totalReleased; /// @dev "fallback" payment splitter settings in case token-level settings aren't specified PaymentSplitterSettings private _fallbackPaymentSplitterSettings; event RoyaltyUpdated(address royaltyAddress, uint96 royaltyAmount); event TokenRoyaltyUpdated( uint256 tokenId, address royaltyAddress, uint96 royaltyAmount ); event TokenCreated(string indexed uuid, uint256 indexed tokenId); event BurnStatusChanged(bool burnActive); event TokensAirdropped(uint256 numRecipients, uint256 numTokens); event TokenBurned(address indexed owner, uint256 tokenId, uint256 amount); event PaymentReleased(address to, uint256 amount); event TokenSettingsUpdated(uint256 tokenId); event RevenueSettingsUpdated(uint256 tokenId); event FallbackRevenueSettingsUpdated(); event TokensMinted(address indexed to, uint256 tokenId, uint256 quantity); /// @custom:oz-upgrades-unsafe-allow constructor constructor() { _disableInitializers(); } function initialize( string memory _name, string memory _symbol, string memory _baseUri, TokenSettings[] calldata _tokenSettings, RoyaltySettings calldata _royaltySettings, PaymentSplitterSettings calldata _paymentSplitterSettings, bool _allowBurning, address _deployer, address _operatorFilter ) public initializer { __ERC1155_init(_baseUri); __Ownable_init(); uint256 numTokens = _tokenSettings.length; // set a reasonable maximum here so we don't run out of gas if (numTokens > 100) { revert TooManyTokens(); } // verify fallback (contract-level) payment splitter settings _verifyPaymentSplitterSettings(_paymentSplitterSettings); for (uint256 i = 0; i < numTokens; ) { // verify token-level payment splitter settings, if present if (_tokenSettings[i].paymentSplitterSettings.payees.length > 0) { _verifyPaymentSplitterSettings( _tokenSettings[i].paymentSplitterSettings ); } _verifyMintingTime( _tokenSettings[i].mintStart, _tokenSettings[i].mintEnd ); _tokens[i] = _tokenSettings[i]; // this value should always be 0 for new tokens _tokens[i].amountMinted = 0; emit TokenCreated(_tokenSettings[i].uuid, i); // numTokens has a maximum value of 2^256 - 1 unchecked { ++i; } } _currentTokenId = numTokens; _fallbackPaymentSplitterSettings = _paymentSplitterSettings; name = _name; symbol = _symbol; allowBurning = _allowBurning; _setDefaultRoyalty( _royaltySettings.royaltyAddress, _royaltySettings.royaltyAmount ); _transferOwnership(_deployer); OperatorFiltererUpgradeable.__OperatorFilterer_init( _operatorFilter, _operatorFilter == address(0) ? false : true // only subscribe if a filter is provided ); } /*////////////////////////////////////////////////////////////// CREATOR FUNCTIONS //////////////////////////////////////////////////////////////*/ /** * @notice Create a new token to be minted with the provided settings. */ function createDropToken( TokenSettings calldata settings ) external onlyOwner { if (settings.paymentSplitterSettings.payees.length > 0) { _verifyPaymentSplitterSettings(settings.paymentSplitterSettings); } _verifyMintingTime(settings.mintStart, settings.mintEnd); uint256 id = _currentTokenId; _tokens[id] = settings; // this value should always be 0 for new tokens _tokens[id].amountMinted = 0; ++_currentTokenId; emit TokenCreated(settings.uuid, id); } /** * @notice Create multiple tokens to be minted with the provided settings. */ function createDropTokens( TokenSettings[] calldata tokenSettings ) external onlyOwner { uint256 numTokens = tokenSettings.length; uint256 currentTokenId = _currentTokenId; for (uint256 i = 0; i < numTokens; ) { if (tokenSettings[i].paymentSplitterSettings.payees.length > 0) { _verifyPaymentSplitterSettings( tokenSettings[i].paymentSplitterSettings ); } TokenSettings memory settings = tokenSettings[i]; _verifyMintingTime(settings.mintStart, settings.mintEnd); uint256 id = currentTokenId; // this value should always be 0 for new tokens settings.amountMinted = 0; _tokens[id] = settings; ++currentTokenId; // numTokens has a maximum value of 2^256 - 1 unchecked { ++i; } emit TokenCreated(settings.uuid, id); } _currentTokenId = currentTokenId; } /** * @notice Update the settings for a token. Certain settings cannot be changed once a token has been minted. */ function updateTokenSettingsByIndex( uint256 id, TokenSettings calldata settings ) external onlyOwner { // cannot edit a token larger than the current token ID if (id >= _currentTokenId) { revert InvalidToken(); } TokenSettings memory token = _tokens[id]; uint32 existingAmountMinted = token.amountMinted; PaymentSplitterSettings memory existingPaymentSplitterSettings = token .paymentSplitterSettings; // Once a token has been minted, it's not possible to change the supply & start/end times if ( existingAmountMinted > 0 && (settings.maxSupply != token.maxSupply || settings.mintStart != token.mintStart || settings.mintEnd != token.mintEnd) ) { revert TokenSettingsLocked(); } _verifyMintingTime(settings.mintStart, settings.mintEnd); _tokens[id] = settings; // it's not possible to update how many have been claimed, but it's part of the TokenSettings struct // ignore any value that is passed in and use the existing value _tokens[id].amountMinted = existingAmountMinted; // payment splitter settings can only be updated via `updatePaymentSplitterSettingsByIndex` _tokens[id].paymentSplitterSettings = existingPaymentSplitterSettings; emit TokenSettingsUpdated(id); } function updatePaymentSplitterSettingsByIndex( uint256 id, PaymentSplitterSettings calldata settings ) external onlyOwner { // cannot edit a token larger than the current token ID if (id >= _currentTokenId) { revert InvalidToken(); } // revenue split cannot be changed once a token is minted if (_tokens[id].amountMinted > 0) { revert TokenSettingsLocked(); } _verifyPaymentSplitterSettings(settings); _tokens[id].paymentSplitterSettings = settings; emit RevenueSettingsUpdated(id); } function updateFallbackPaymentSplitterSettings( PaymentSplitterSettings calldata settings ) external onlyOwner { _verifyPaymentSplitterSettings(settings); _fallbackPaymentSplitterSettings = settings; emit FallbackRevenueSettingsUpdated(); } function _verifyMintingTime(uint32 mintStart, uint32 mintEnd) private view { if (mintEnd > 0) { // mint end must be after mint start if (mintEnd < mintStart) { revert InvalidMintDates(); } // mint end must be in the future if (mintEnd < block.timestamp) { revert InvalidMintDates(); } } } function _verifyPaymentSplitterSettings( PaymentSplitterSettings calldata settings ) private pure { uint256 shareTotal; uint256 numPayees = settings.payees.length; // we discourage using the payment splitter for more than 4 payees, as it's not gas efficient for minting // more advanced use-cases should consider a multi-sig payee if (numPayees != settings.shares.length || numPayees > 4) { revert InvalidPaymentSplitterSettings(); } for (uint256 i = 0; i < numPayees; ) { uint256 shares = settings.shares[i]; if (shares == 0) { revert InvalidPaymentSplitterSettings(); } shareTotal += shares; // this can't overflow as numPayees is capped at 4 unchecked { ++i; } } if (shareTotal != 100) { revert InvalidPaymentSplitterSettings(); } } /** * @notice Perform a batch airdrop of tokens to a list of recipients */ function airdropToken( uint256 id, uint32[] calldata quantities, address[] calldata recipients ) external onlyOwner { if (id >= _currentTokenId) { revert InvalidToken(); } uint256 numRecipients = recipients.length; uint256 totalAirdropped; if (numRecipients != quantities.length) revert InvalidAirdrop(); TokenSettings storage token = _tokens[id]; for (uint256 i = 0; i < numRecipients; ) { uint32 updatedAmountMinted = token.amountMinted + quantities[i]; if (token.maxSupply > 0 && updatedAmountMinted > token.maxSupply) { revert SoldOut(); } // airdrops are not subject to the per-wallet mint limits, // but we track how much is minted token.amountMinted = updatedAmountMinted; totalAirdropped += quantities[i]; _mint(recipients[i], id, quantities[i], ""); // numRecipients has a maximum value of 2^256 - 1 unchecked { ++i; } } emit TokensAirdropped(numRecipients, totalAirdropped); } /** * @notice Release funds for a particular payee */ function release(address payee) public { uint256 amount = releasable(payee); if (amount > 0) { _totalReleased += amount; // If "_totalReleased += amount" does not overflow, then "_released[payee] += amount" cannot overflow. unchecked { _released[payee] += amount; } AddressUpgradeable.sendValue(payable(payee), amount); emit PaymentReleased(payee, amount); } } /** * @notice Release funds for specified payees * @dev This is a convenience method to calling release() for each payee */ function releaseBatch(address[] calldata payees) external { uint256 numPayees = payees.length; for (uint256 i = 0; i < numPayees; ) { release(payees[i]); // this can't overflow as numPayees is capped at 4 unchecked { ++i; } } } /** * @notice Update the default royalty settings (EIP-2981) for the contract. */ function setRoyaltyInfo( address receiver, uint96 feeBasisPoints ) external onlyOwner { _setDefaultRoyalty(receiver, feeBasisPoints); emit RoyaltyUpdated(receiver, feeBasisPoints); } /** * @notice Update the royalty settings (EIP-2981) for the token. */ function setTokenRoyaltyInfo( uint256 tokenId, address receiver, uint96 feeBasisPoints ) external onlyOwner { _setTokenRoyalty(tokenId, receiver, feeBasisPoints); emit TokenRoyaltyUpdated(tokenId, receiver, feeBasisPoints); } /** * @notice If enabled, the token can be burned, for approved operators. * @dev The burn method will revert unless this is enabled */ function toggleBurning() external onlyOwner { allowBurning = !allowBurning; emit BurnStatusChanged(allowBurning); } /** * @dev See {ERC1155Upgradeable-_setURI} */ function setUri(string calldata uri) external onlyOwner { _setURI(uri); } /*////////////////////////////////////////////////////////////// MINTING FUNCTIONS //////////////////////////////////////////////////////////////*/ /** * @notice Mint a token to the sender */ function mintToken(uint256 id, uint32 quantity) external payable { TokenSettings memory token = _tokens[id]; if (token.merkleRoot != bytes32(0)) { revert InvalidMintFunction(); } _mintAfterChecks( msg.sender, msg.value, id, quantity, token.maxPerWallet ); } /** * @notice Mint a token to a specific address * @dev Useful in case the recipient of the tokens is not the sender (gifting, fiat checkout, etc) */ function mintTokenTo( address account, uint256 id, uint32 quantity ) external payable { TokenSettings memory token = _tokens[id]; if (token.merkleRoot != bytes32(0)) { revert InvalidMintFunction(); } _mintAfterChecks(account, msg.value, id, quantity, token.maxPerWallet); } /** * @notice Mint a token that has an allowlist associated with it. * @dev maxQuantity is encoded as part of the proof, and is a way to associate variable quantities with each allowlisted wallet */ function mintTokenAllowlist( uint256 id, uint32 quantity, uint32 maxQuantity, bytes32[] calldata proof ) external payable { bytes32 merkleRoot = _tokens[id].merkleRoot; if (merkleRoot == bytes32(0)) { revert InvalidMintFunction(); } if ( !MerkleProof.verify( proof, merkleRoot, keccak256(abi.encodePacked(msg.sender, maxQuantity)) ) ) { revert InvalidProof(); } _mintAfterChecks(msg.sender, msg.value, id, quantity, maxQuantity); } function _mintAfterChecks( address account, uint256 balance, uint256 id, uint32 quantity, uint32 maxQuantity ) private { if (id >= _currentTokenId) { revert InvalidToken(); } TokenSettings storage token = _tokens[id]; if (balance != token.price * quantity) { revert InvalidPrice(); } if ( token.maxSupply > 0 && token.amountMinted + quantity > token.maxSupply ) { revert SoldOut(); } if ( maxQuantity > 0 && // maxQuantity is either the token-level maxPerWallet, or the maxQuantity passed in from the allowlist mint function // if the latter, the value is provided by the user, but is first checked against the merkle tree _mintBalanceByTokenId[id][account] + quantity > maxQuantity ) { revert ExceedMaxPerWallet(); } if (token.mintStart > 0 && block.timestamp < token.mintStart) { revert MintNotActive(); } if (token.mintEnd > 0 && block.timestamp > token.mintEnd) { revert MintNotActive(); } // we only need to proceed if this is a revenue generating mint if (balance > 0) { uint256 numPayees = token.paymentSplitterSettings.payees.length; if (numPayees > 0) { // if we have token-level payment splitter settings, use those calculateRevenueSplit(balance, token.paymentSplitterSettings); } else { // otherwise, fallback to the contract-level payment splitter settings calculateRevenueSplit( balance, _fallbackPaymentSplitterSettings ); } } token.amountMinted += quantity; _mintBalanceByTokenId[id][account] += quantity; _mint(account, id, quantity, ""); emit TokensMinted(account, id, quantity); } function calculateRevenueSplit( uint256 value, PaymentSplitterSettings storage paymentSplitterSettings ) private { uint256 numPayees = paymentSplitterSettings.payees.length; // each token can have different payment splitter settings, and price can change while mint is occurring // therefore we need to do some revenue accounting at the time of mint based on the price paid for (uint256 i = 0; i < numPayees; ) { address payee = paymentSplitterSettings.payees[i]; uint256 amount = ((value * paymentSplitterSettings.shares[i]) / 100); _revenueByAddress[payee] += amount; // this can't overflow as numPayees is capped at 4 unchecked { ++i; } } } /** * @notice Burn a token, if the contract allows for it */ function burn(uint256 id, uint256 amount) external { if (!allowBurning) { revert BurningNotAllowed(); } _burn(msg.sender, id, amount); emit TokenBurned(msg.sender, id, amount); } /*////////////////////////////////////////////////////////////// VIEW FUNCTIONS //////////////////////////////////////////////////////////////*/ /** * @notice Get the token data based on it's ID (1, 2, etc) */ function getTokenSettingsByTokenId( uint256 id ) external view returns (TokenSettings memory) { return _tokens[id]; } /** * @notice Retrieve the fallback payment splitter config (used if a token doesn't have it's own payment splitter settings) */ function getFallbackPaymentSplitterSettings() external view returns (PaymentSplitterSettings memory) { return _fallbackPaymentSplitterSettings; } /** * @notice Get the token data for all tokens associated with the contract */ function getAllTokenData() external view returns (TokenData[] memory) { uint256 numTokens = _currentTokenId; TokenData[] memory tokens = new TokenData[](numTokens); for (uint256 i = 0; i < numTokens; i++) { tokens[i].settings = _tokens[i]; tokens[i].index = i; } return tokens; } /** * @dev Getter for the amount of Ether already released to a payee. */ function released(address account) public view returns (uint256) { return _released[account]; } /** * @dev Getter for the total amount of Ether already released. */ function totalReleased() external view returns (uint256) { return _totalReleased; } /** * @dev Getter for the amount of payee's releasable Ether. */ function releasable(address account) public view returns (uint256) { return _revenueByAddress[account] - released(account); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface( bytes4 interfaceId ) public view virtual override(ERC1155Upgradeable, ERC2981Upgradeable) returns (bool) { return super.supportsInterface(interfaceId); } /*////////////////////////////////////////////////////////////// OPERATOR REGISTRY OVERRIDES //////////////////////////////////////////////////////////////*/ function setApprovalForAll( address operator, bool approved ) public override onlyAllowedOperatorApproval(operator) { super.setApprovalForAll(operator, approved); } /** * @dev See {IERC1155-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, uint256 amount, bytes memory data ) public override onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId, amount, data); } /** * @dev See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override onlyAllowedOperator(from) { super.safeBatchTransferFrom(from, to, ids, amounts, data); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal onlyInitializing { __Ownable_init_unchained(); } function __Ownable_init_unchained() internal onlyInitializing { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } /** * @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.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.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 (last updated v4.7.0) (token/common/ERC2981.sol) pragma solidity ^0.8.0; import "../../interfaces/IERC2981Upgradeable.sol"; import "../../utils/introspection/ERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.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 ERC2981Upgradeable is Initializable, IERC2981Upgradeable, ERC165Upgradeable { function __ERC2981_init() internal onlyInitializing { } function __ERC2981_init_unchained() internal onlyInitializing { } 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(IERC165Upgradeable, ERC165Upgradeable) returns (bool) { return interfaceId == type(IERC2981Upgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @inheritdoc IERC2981Upgradeable */ 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: * * - `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]; } /** * @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[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.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 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.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 (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.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 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 (last updated v4.8.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The tree and the proofs can be generated using our * https://github.com/OpenZeppelin/merkle-tree[JavaScript library]. * You will find a quickstart guide in the readme. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. * OpenZeppelin's JavaScript library generates merkle trees that are safe * against this attack out of the box. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Calldata version of {verify} * * _Available since v4.7._ */ function verifyCalldata( bytes32[] calldata proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} * * _Available since v4.7._ */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false * respectively. * * CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer). * * _Available since v4.7._ */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof}. * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; error InvalidPrice(); error SoldOut(); error ExceedMaxPerWallet(); error InvalidProof(); error InvalidMintFunction(); error InvalidAirdrop(); error BurningNotAllowed(); struct PaymentSplitterSettings { address[] payees; uint256[] shares; } struct RoyaltySettings { address royaltyAddress; uint96 royaltyAmount; }
// 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); }
// 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); } } _; } modifier onlyAllowedOperatorApproval(address operator) virtual { // 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); } } _; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"BurningNotAllowed","type":"error"},{"inputs":[],"name":"ExceedMaxPerWallet","type":"error"},{"inputs":[],"name":"InvalidAirdrop","type":"error"},{"inputs":[],"name":"InvalidMintDates","type":"error"},{"inputs":[],"name":"InvalidMintFunction","type":"error"},{"inputs":[],"name":"InvalidPaymentSplitterSettings","type":"error"},{"inputs":[],"name":"InvalidPrice","type":"error"},{"inputs":[],"name":"InvalidProof","type":"error"},{"inputs":[],"name":"InvalidToken","type":"error"},{"inputs":[],"name":"MintNotActive","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"inputs":[],"name":"SoldOut","type":"error"},{"inputs":[],"name":"TokenSettingsLocked","type":"error"},{"inputs":[],"name":"TooManyTokens","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":"bool","name":"burnActive","type":"bool"}],"name":"BurnStatusChanged","type":"event"},{"anonymous":false,"inputs":[],"name":"FallbackRevenueSettingsUpdated","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":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"RevenueSettingsUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"royaltyAddress","type":"address"},{"indexed":false,"internalType":"uint96","name":"royaltyAmount","type":"uint96"}],"name":"RoyaltyUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokenBurned","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"string","name":"uuid","type":"string"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"TokenCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"royaltyAddress","type":"address"},{"indexed":false,"internalType":"uint96","name":"royaltyAmount","type":"uint96"}],"name":"TokenRoyaltyUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"TokenSettingsUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"numRecipients","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"numTokens","type":"uint256"}],"name":"TokensAirdropped","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"TokensMinted","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"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint32[]","name":"quantities","type":"uint32[]"},{"internalType":"address[]","name":"recipients","type":"address[]"}],"name":"airdropToken","outputs":[],"stateMutability":"nonpayable","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":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"maxSupply","type":"uint32"},{"internalType":"uint32","name":"maxPerWallet","type":"uint32"},{"internalType":"uint32","name":"amountMinted","type":"uint32"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"},{"internalType":"uint32","name":"mintStart","type":"uint32"},{"internalType":"uint32","name":"mintEnd","type":"uint32"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"string","name":"uuid","type":"string"},{"components":[{"internalType":"address[]","name":"payees","type":"address[]"},{"internalType":"uint256[]","name":"shares","type":"uint256[]"}],"internalType":"struct PaymentSplitterSettings","name":"paymentSplitterSettings","type":"tuple"}],"internalType":"struct TokenSettings","name":"settings","type":"tuple"}],"name":"createDropToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"maxSupply","type":"uint32"},{"internalType":"uint32","name":"maxPerWallet","type":"uint32"},{"internalType":"uint32","name":"amountMinted","type":"uint32"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"},{"internalType":"uint32","name":"mintStart","type":"uint32"},{"internalType":"uint32","name":"mintEnd","type":"uint32"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"string","name":"uuid","type":"string"},{"components":[{"internalType":"address[]","name":"payees","type":"address[]"},{"internalType":"uint256[]","name":"shares","type":"uint256[]"}],"internalType":"struct PaymentSplitterSettings","name":"paymentSplitterSettings","type":"tuple"}],"internalType":"struct TokenSettings[]","name":"tokenSettings","type":"tuple[]"}],"name":"createDropTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllTokenData","outputs":[{"components":[{"components":[{"internalType":"uint32","name":"maxSupply","type":"uint32"},{"internalType":"uint32","name":"maxPerWallet","type":"uint32"},{"internalType":"uint32","name":"amountMinted","type":"uint32"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"},{"internalType":"uint32","name":"mintStart","type":"uint32"},{"internalType":"uint32","name":"mintEnd","type":"uint32"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"string","name":"uuid","type":"string"},{"components":[{"internalType":"address[]","name":"payees","type":"address[]"},{"internalType":"uint256[]","name":"shares","type":"uint256[]"}],"internalType":"struct PaymentSplitterSettings","name":"paymentSplitterSettings","type":"tuple"}],"internalType":"struct TokenSettings","name":"settings","type":"tuple"},{"internalType":"uint256","name":"index","type":"uint256"}],"internalType":"struct TokenData[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFallbackPaymentSplitterSettings","outputs":[{"components":[{"internalType":"address[]","name":"payees","type":"address[]"},{"internalType":"uint256[]","name":"shares","type":"uint256[]"}],"internalType":"struct PaymentSplitterSettings","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getTokenSettingsByTokenId","outputs":[{"components":[{"internalType":"uint32","name":"maxSupply","type":"uint32"},{"internalType":"uint32","name":"maxPerWallet","type":"uint32"},{"internalType":"uint32","name":"amountMinted","type":"uint32"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"},{"internalType":"uint32","name":"mintStart","type":"uint32"},{"internalType":"uint32","name":"mintEnd","type":"uint32"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"string","name":"uuid","type":"string"},{"components":[{"internalType":"address[]","name":"payees","type":"address[]"},{"internalType":"uint256[]","name":"shares","type":"uint256[]"}],"internalType":"struct PaymentSplitterSettings","name":"paymentSplitterSettings","type":"tuple"}],"internalType":"struct TokenSettings","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"_baseUri","type":"string"},{"components":[{"internalType":"uint32","name":"maxSupply","type":"uint32"},{"internalType":"uint32","name":"maxPerWallet","type":"uint32"},{"internalType":"uint32","name":"amountMinted","type":"uint32"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"},{"internalType":"uint32","name":"mintStart","type":"uint32"},{"internalType":"uint32","name":"mintEnd","type":"uint32"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"string","name":"uuid","type":"string"},{"components":[{"internalType":"address[]","name":"payees","type":"address[]"},{"internalType":"uint256[]","name":"shares","type":"uint256[]"}],"internalType":"struct PaymentSplitterSettings","name":"paymentSplitterSettings","type":"tuple"}],"internalType":"struct TokenSettings[]","name":"_tokenSettings","type":"tuple[]"},{"components":[{"internalType":"address","name":"royaltyAddress","type":"address"},{"internalType":"uint96","name":"royaltyAmount","type":"uint96"}],"internalType":"struct RoyaltySettings","name":"_royaltySettings","type":"tuple"},{"components":[{"internalType":"address[]","name":"payees","type":"address[]"},{"internalType":"uint256[]","name":"shares","type":"uint256[]"}],"internalType":"struct PaymentSplitterSettings","name":"_paymentSplitterSettings","type":"tuple"},{"internalType":"bool","name":"_allowBurning","type":"bool"},{"internalType":"address","name":"_deployer","type":"address"},{"internalType":"address","name":"_operatorFilter","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":"uint256","name":"id","type":"uint256"},{"internalType":"uint32","name":"quantity","type":"uint32"}],"name":"mintToken","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint32","name":"quantity","type":"uint32"},{"internalType":"uint32","name":"maxQuantity","type":"uint32"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"mintTokenAllowlist","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint32","name":"quantity","type":"uint32"}],"name":"mintTokenTo","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"releasable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"payee","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"payees","type":"address[]"}],"name":"releaseBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","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":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeBasisPoints","type":"uint96"}],"name":"setRoyaltyInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeBasisPoints","type":"uint96"}],"name":"setTokenRoyaltyInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"name":"setUri","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":[],"name":"toggleBurning","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalReleased","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":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address[]","name":"payees","type":"address[]"},{"internalType":"uint256[]","name":"shares","type":"uint256[]"}],"internalType":"struct PaymentSplitterSettings","name":"settings","type":"tuple"}],"name":"updateFallbackPaymentSplitterSettings","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"components":[{"internalType":"address[]","name":"payees","type":"address[]"},{"internalType":"uint256[]","name":"shares","type":"uint256[]"}],"internalType":"struct PaymentSplitterSettings","name":"settings","type":"tuple"}],"name":"updatePaymentSplitterSettingsByIndex","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"components":[{"internalType":"uint32","name":"maxSupply","type":"uint32"},{"internalType":"uint32","name":"maxPerWallet","type":"uint32"},{"internalType":"uint32","name":"amountMinted","type":"uint32"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"},{"internalType":"uint32","name":"mintStart","type":"uint32"},{"internalType":"uint32","name":"mintEnd","type":"uint32"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"string","name":"uuid","type":"string"},{"components":[{"internalType":"address[]","name":"payees","type":"address[]"},{"internalType":"uint256[]","name":"shares","type":"uint256[]"}],"internalType":"struct PaymentSplitterSettings","name":"paymentSplitterSettings","type":"tuple"}],"internalType":"struct TokenSettings","name":"settings","type":"tuple"}],"name":"updateTokenSettingsByIndex","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b506200001c62000022565b620000e4565b600054610100900460ff16156200008f5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161015620000e2576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6158ee80620000f46000396000f3fe60806040526004361061022f5760003560e01c806382f57d271161012e578063aeb61fea116100ab578063e33b7de31161006f578063e33b7de3146106be578063e985e9c5146106d4578063ef8d10f51461071d578063f242432a1461074a578063f2fde38b1461076a57600080fd5b8063aeb61fea14610611578063b390c0ab14610631578063b8f7300314610651578063bd85b03914610671578063df745d281461069e57600080fd5b80639b642de1116100f25780639b642de11461056f5780639ebeef591461058f578063a22cb465146105b1578063a3f8eace146105d1578063aada600b146105f157600080fd5b806382f57d27146104c85780638da5cb5b146104db5780639351f4ed1461050357806395d89b41146105235780639852595c1461053857600080fd5b80632eb2c2d6116101bc57806365e909d61161018057806365e909d61461044d5780636b915fe31461046d57806371130b3314610480578063715018a6146104935780637e608e91146104a857600080fd5b80632eb2c2d61461038f57806347df1fdf146103af5780634e1273f4146103d15780634f558e79146103fe5780635f4530501461042d57600080fd5b80630a7e2ac9116102035780630a7e2ac9146102db5780630e89341c146102fb578063191655871461031b57806322dcb0a71461033b5780632a55205a1461035057600080fd5b8062fdd58e1461023457806301ffc9a71461026757806302fa7c471461029757806306fdde03146102b9575b600080fd5b34801561024057600080fd5b5061025461024f36600461411a565b61078a565b6040519081526020015b60405180910390f35b34801561027357600080fd5b5061028761028236600461415c565b610825565b604051901515815260200161025e565b3480156102a357600080fd5b506102b76102b2366004614190565b610830565b005b3480156102c557600080fd5b506102ce610891565b60405161025e9190614215565b3480156102e757600080fd5b506102b76102f636600461426c565b610920565b34801561030757600080fd5b506102ce6103163660046142ad565b610b4f565b34801561032757600080fd5b506102b76103363660046142c6565b610be3565b34801561034757600080fd5b506102b7610c7a565b34801561035c57600080fd5b5061037061036b3660046142e3565b610cd0565b604080516001600160a01b03909316835260208301919091520161025e565b34801561039b57600080fd5b506102b76103aa366004614477565b610d7e565b3480156103bb57600080fd5b506103c4610e5d565b60405161025e91906145c7565b3480156103dd57600080fd5b506103f16103ec366004614649565b610f35565b60405161025e91906146ac565b34801561040a57600080fd5b506102876104193660046142ad565b600090815260976020526040902054151590565b34801561043957600080fd5b506102b76104483660046146d8565b61105e565b34801561045957600080fd5b506102b7610468366004614714565b611164565b6102b761047b3660046147aa565b61135d565b6102b761048e3660046147ec565b611575565b34801561049f57600080fd5b506102b7611656565b3480156104b457600080fd5b506102b76104c336600461485f565b61166a565b6102b76104d6366004614893565b6116b7565b3480156104e757600080fd5b5060c9546040516001600160a01b03909116815260200161025e565b34801561050f57600080fd5b506102b761051e3660046148dc565b6118ce565b34801561052f57600080fd5b506102ce611c5a565b34801561054457600080fd5b506102546105533660046142c6565b6001600160a01b03166000908152610134602052604090205490565b34801561057b57600080fd5b506102b761058a3660046149fb565b611c68565b34801561059b57600080fd5b506105a4611caf565b60405161025e9190614b21565b3480156105bd57600080fd5b506102b76105cc366004614b97565b611f51565b3480156105dd57600080fd5b506102546105ec3660046142c6565b612015565b3480156105fd57600080fd5b506102b761060c366004614bc5565b612045565b34801561061d57600080fd5b506102b761062c366004614c01565b6123dd565b34801561063d57600080fd5b506102b761064c3660046142e3565b61249c565b34801561065d57600080fd5b506102b761066c366004614c3d565b61250a565b34801561067d57600080fd5b5061025461068c3660046142ad565b60009081526097602052604090205490565b3480156106aa57600080fd5b506102b76106b936600461426c565b612572565b3480156106ca57600080fd5b5061013554610254565b3480156106e057600080fd5b506102876106ef366004614c7b565b6001600160a01b03918216600090815260666020908152604080832093909416825291909152205460ff1690565b34801561072957600080fd5b5061073d6107383660046142ad565b6125b0565b60405161025e9190614ca9565b34801561075657600080fd5b506102b7610765366004614cbc565b61279d565b34801561077657600080fd5b506102b76107853660046142c6565b61286f565b60006001600160a01b0383166107fa5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b5060008181526065602090815260408083206001600160a01b03861684529091529020545b92915050565b600061081f826128e8565b61083861290d565b6108428282612967565b604080516001600160a01b03841681526001600160601b03831660208201527f8039bd6e4e7dba001c8840eb2e118d9d131246faa7d0d04335f7305127ec0b1091015b60405180910390a15050565b61012d805461089f90614d24565b80601f01602080910402602001604051908101604052809291908181526020018280546108cb90614d24565b80156109185780601f106108ed57610100808354040283529160200191610918565b820191906000526020600020905b8154815290600101906020018083116108fb57829003601f168201915b505050505081565b61092861290d565b61012f54819060005b82811015610b4557600085858381811061094d5761094d614d58565b905060200281019061095f9190614d6e565b61096e90610100810190614d8f565b6109789080614da5565b905011156109bb576109bb85858381811061099557610995614d58565b90506020028101906109a79190614d6e565b6109b690610100810190614d8f565b612a21565b60008585838181106109cf576109cf614d58565b90506020028101906109e19190614d6e565b6109ea90614e77565b90506109fe81608001518260a00151612af8565b600060408281018281528583526101316020908152919092208351815492850151935163ffffffff91821667ffffffffffffffff1994851617600160201b95831686021763ffffffff60401b1916600160401b9183169190910217825560608501516001830155608085015160028301805460a0880151928416951694909417911690930292909217905560c0820151600382015560e0820151849183916004820190610aab9082614fa0565b50610100820151805180516005840191610aca91839160200190613fc5565b506020828101518051610ae3926001850192019061402a565b50505090505083610af390615075565b9350826001019250808260e00151604051610b0e919061508e565b604051908190038120907f2031bb75fe7acfeb75a155106919ca62ef2e240732a3bf6035ce09f71698833e90600090a35050610931565b5061012f55505050565b606060678054610b5e90614d24565b80601f0160208091040260200160405190810160405280929190818152602001828054610b8a90614d24565b8015610bd75780601f10610bac57610100808354040283529160200191610bd7565b820191906000526020600020905b815481529060010190602001808311610bba57829003601f168201915b50505050509050919050565b6000610bee82612015565b90508015610c7657806101356000828254610c0991906150a0565b90915550506001600160a01b038216600090815261013460205260409020805482019055610c378282612b58565b604080516001600160a01b0384168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b0569101610885565b5050565b610c8261290d565b610130805460ff8082161560ff1990921682179092556040519116151581527f1509137b40df48e8ef9596f9db16b632b15353d0e0688d9f23221953eb0328dd9060200160405180910390a1565b600082815260fc602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610d4557506040805180820190915260fb546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090610d64906001600160601b0316876150b3565b610d6e91906150ca565b91519350909150505b9250929050565b846daaeb6d7670e522a718067333cd4e3b15610e4857336001600160a01b03821603610db657610db18686868686612c71565b610e55565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015610e05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e2991906150ec565b610e4857604051633b79c77360e21b81523360048201526024016107f1565b610e558686868686612c71565b505050505050565b604080518082019091526060808252602082015260408051610136805460606020820284018101855293830181815292939192849290918491840182828015610ecf57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610eb1575b5050505050815260200160018201805480602002602001604051908101604052809291908181526020018280548015610f2757602002820191906000526020600020905b815481526020019060010190808311610f13575b505050505081525050905090565b60608151835114610f9a5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016107f1565b600083516001600160401b03811115610fb557610fb5614305565b604051908082528060200260200182016040528015610fde578160200160208202803683370190505b50905060005b84518110156110565761102985828151811061100257611002614d58565b602002602001015185838151811061101c5761101c614d58565b602002602001015161078a565b82828151811061103b5761103b614d58565b602090810291909101015261104f81615075565b9050610fe4565b509392505050565b61106661290d565b6000611076610100830183614d8f565b6110809080614da5565b90501115611099576110996109b6610100830183614d8f565b6110c16110ac60a0830160808401615109565b6110bc60c0840160a08501615109565b612af8565b61012f5460008181526101316020526040902082906110e082826153c8565b5050600081815261013160205260408120805463ffffffff60401b1916905561012f805490919061111090615075565b909155508061112260e0840184615133565b6040516111309291906154f0565b604051908190038120907f2031bb75fe7acfeb75a155106919ca62ef2e240732a3bf6035ce09f71698833e90600090a35050565b61116c61290d565b61012f54851061118f5760405163c1ab6dc160e01b815260040160405180910390fd5b8060008482146111b25760405163e6dcad7760e01b815260040160405180910390fd5b600087815261013160205260408120905b838110156113195760008888838181106111df576111df614d58565b90506020020160208101906111f49190615109565b835461120d9190600160401b900463ffffffff16615500565b835490915063ffffffff16158015906112305750825463ffffffff908116908216115b1561124e576040516352df9fe560e01b815260040160405180910390fd5b825463ffffffff60401b1916600160401b63ffffffff83160217835588888381811061127c5761127c614d58565b90506020020160208101906112919190615109565b6112a19063ffffffff16856150a0565b93506113108787848181106112b8576112b8614d58565b90506020020160208101906112cd91906142c6565b8b8b8b868181106112e0576112e0614d58565b90506020020160208101906112f59190615109565b63ffffffff1660405180602001604052806000815250612cbd565b506001016111c3565b5060408051848152602081018490527f71cc7095cc35ed4701c217a8efb440732eb0737da67f6548c008ac26fba95464910160405180910390a15050505050505050565b600082815261013160209081526040808320815161012081018352815463ffffffff8082168352600160201b808304821696840196909652600160401b90910481169382019390935260018201546060820152600282015480841660808301529390930490911660a0830152600381015460c083015260048101805460e0840191906113e890614d24565b80601f016020809104026020016040519081016040528092919081815260200182805461141490614d24565b80156114615780601f1061143657610100808354040283529160200191611461565b820191906000526020600020905b81548152906001019060200180831161144457829003601f168201915b5050505050815260200160058201604051806040016040529081600082018054806020026020016040519081016040528092919081815260200182805480156114d357602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116114b5575b505050505081526020016001820180548060200260200160405190810160405280929190818152602001828054801561152b57602002820191906000526020600020905b815481526020019060010190808311611517575b5050509190925250505090525060608101519091501561155e57604051634d0ee1f560e11b815260040160405180910390fd5b61156f843485858560200151612de2565b50505050565b60008581526101316020526040902060010154806115a657604051634d0ee1f560e11b815260040160405180910390fd5b61162c838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506040516bffffffffffffffffffffffff193360601b1660208201526001600160e01b031960e08a901b1660348201528592506038019050604051602081830303815290604052805190602001206130eb565b611649576040516309bde33960e01b815260040160405180910390fd5b610e553334888888612de2565b61165e61290d565b6116686000613101565b565b61167261290d565b61167b81612a21565b806101366116898282615351565b50506040517fb855aa79dff5fe918a28a8a1d8101db624120176786f8e2658f354b0e68654d090600090a150565b600082815261013160209081526040808320815161012081018352815463ffffffff8082168352600160201b808304821696840196909652600160401b90910481169382019390935260018201546060820152600282015480841660808301529390930490911660a0830152600381015460c083015260048101805460e08401919061174290614d24565b80601f016020809104026020016040519081016040528092919081815260200182805461176e90614d24565b80156117bb5780601f10611790576101008083540402835291602001916117bb565b820191906000526020600020905b81548152906001019060200180831161179e57829003601f168201915b50505050508152602001600582016040518060400160405290816000820180548060200260200160405190810160405280929190818152602001828054801561182d57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161180f575b505050505081526020016001820180548060200260200160405190810160405280929190818152602001828054801561188557602002820191906000526020600020905b815481526020019060010190808311611871575b505050919092525050509052506060810151909150156118b857604051634d0ee1f560e11b815260040160405180910390fd5b6118c9333485858560200151612de2565b505050565b600054610100900460ff16158080156118ee5750600054600160ff909116105b806119085750303b158015611908575060005460ff166001145b61196b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016107f1565b6000805460ff19166001179055801561198e576000805461ff0019166101001790555b61199789613153565b61199f613183565b8660648111156119c257604051633a4733d960e11b815260040160405180910390fd5b6119cb86612a21565b60005b81811015611b745760008a8a838181106119ea576119ea614d58565b90506020028101906119fc9190614d6e565b611a0b90610100810190614d8f565b611a159080614da5565b90501115611a3257611a328a8a8381811061099557610995614d58565b611a9f8a8a83818110611a4757611a47614d58565b9050602002810190611a599190614d6e565b611a6a9060a0810190608001615109565b8b8b84818110611a7c57611a7c614d58565b9050602002810190611a8e9190614d6e565b6110bc9060c081019060a001615109565b898982818110611ab157611ab1614d58565b9050602002810190611ac39190614d6e565b600082815261013160205260409020611adc82826153c8565b5050600081815261013160205260409020805463ffffffff60401b19169055808a8a82818110611b0e57611b0e614d58565b9050602002810190611b209190614d6e565b611b2e9060e0810190615133565b604051611b3c9291906154f0565b604051908190038120907f2031bb75fe7acfeb75a155106919ca62ef2e240732a3bf6035ce09f71698833e90600090a36001016119ce565b5061012f81905585610136611b898282615351565b5061012d9050611b998d82614fa0565b5061012e611ba78c82614fa0565b50610130805460ff1916861515179055611bdc611bc760208901896142c6565b611bd760408a0160208b0161551d565b612967565b611be584613101565b611c06836001600160a01b03811615611bff5760016131b2565b60006131b2565b508015611c4d576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b61012e805461089f90614d24565b611c7061290d565b610c7682828080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061335192505050565b61012f546060906000816001600160401b03811115611cd057611cd0614305565b604051908082528060200260200182016040528015611d0957816020015b611cf6614065565b815260200190600190039081611cee5790505b50905060005b82811015611f4a5760008181526101316020908152604091829020825161012081018452815463ffffffff8082168352600160201b808304821695840195909552600160401b90910481169482019490945260018201546060820152600282015480851660808301529290920490921660a0820152600382015460c082015260048201805491929160e084019190611da690614d24565b80601f0160208091040260200160405190810160405280929190818152602001828054611dd290614d24565b8015611e1f5780601f10611df457610100808354040283529160200191611e1f565b820191906000526020600020905b815481529060010190602001808311611e0257829003601f168201915b505050505081526020016005820160405180604001604052908160008201805480602002602001604051908101604052809291908181526020018280548015611e9157602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611e73575b5050505050815260200160018201805480602002602001604051908101604052809291908181526020018280548015611ee957602002820191906000526020600020905b815481526020019060010190808311611ed5575b50505050508152505081525050828281518110611f0857611f08614d58565b60200260200101516000018190525080828281518110611f2a57611f2a614d58565b602090810291909101810151015280611f4281615075565b915050611d0f565b5092915050565b816daaeb6d7670e522a718067333cd4e3b1561200b57604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611fbf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fe391906150ec565b61200b57604051633b79c77360e21b81526001600160a01b03821660048201526024016107f1565b6118c9838361335d565b6001600160a01b0381166000908152610134602090815260408083205461013390925282205461081f9190615538565b61204d61290d565b61012f5482106120705760405163c1ab6dc160e01b815260040160405180910390fd5b600082815261013160209081526040808320815161012081018352815463ffffffff8082168352600160201b808304821696840196909652600160401b90910481169382019390935260018201546060820152600282015480841660808301529390930490911660a0830152600381015460c083015260048101805460e0840191906120fb90614d24565b80601f016020809104026020016040519081016040528092919081815260200182805461212790614d24565b80156121745780601f1061214957610100808354040283529160200191612174565b820191906000526020600020905b81548152906001019060200180831161215757829003601f168201915b5050505050815260200160058201604051806040016040529081600082018054806020026020016040519081016040528092919081815260200182805480156121e657602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116121c8575b505050505081526020016001820180548060200260200160405190810160405280929190818152602001828054801561223e57602002820191906000526020600020905b81548152602001906001019080831161222a575b5050509190925250505090525060408101516101008201519192509063ffffffff8216158015906122e15750825163ffffffff1661227f6020860186615109565b63ffffffff161415806122b45750826080015163ffffffff168460800160208101906122ab9190615109565b63ffffffff1614155b806122e157508260a0015163ffffffff168460a00160208101906122d89190615109565b63ffffffff1614155b156122ff5760405163fa2844a560e01b815260040160405180910390fd5b61232261231260a0860160808701615109565b6110bc60c0870160a08801615109565b600085815261013160205260409020849061233d82826153c8565b5050600085815261013160209081526040909120805463ffffffff60401b1916600160401b63ffffffff861602178155825180518493600590930192612387928492910190613fc5565b5060208281015180516123a0926001850192019061402a565b50506040518681527f4040cd6ff4eef67e86ab078c16c2514c123f7b8782aa574307eaf34c726f3ef5915060200160405180910390a15050505050565b6123e561290d565b61012f5482106124085760405163c1ab6dc160e01b815260040160405180910390fd5b60008281526101316020526040902054600160401b900463ffffffff16156124435760405163fa2844a560e01b815260040160405180910390fd5b61244c81612a21565b600082815261013160205260409020819060050161246a8282615351565b50506040518281527f71c8525fc38b77b64a66d848a818337505e69f1eacce1994cc6ca727e16d78c290602001610885565b6101305460ff166124c05760405163fa32799b60e01b815260040160405180910390fd5b6124cb338383613368565b604080518381526020810183905233917fde3ca466246b0da455138dbea78dacd91d3c40dc98d5846ff0193bf67c24b0e7910160405180910390a25050565b61251261290d565b61251d8383836134fc565b604080518481526001600160a01b03841660208201526001600160601b0383168183015290517fe361b60b9164428d036a601ec08552e653bfe8c44389b8a4ebfd47281eb8741a9181900360600190a1505050565b8060005b8181101561156f576125a884848381811061259357612593614d58565b905060200201602081019061033691906142c6565b600101612576565b6125b8614085565b60008281526101316020908152604091829020825161012081018452815463ffffffff8082168352600160201b808304821695840195909552600160401b90910481169482019490945260018201546060820152600282015480851660808301529290920490921660a0820152600382015460c082015260048201805491929160e08401919061264790614d24565b80601f016020809104026020016040519081016040528092919081815260200182805461267390614d24565b80156126c05780601f10612695576101008083540402835291602001916126c0565b820191906000526020600020905b8154815290600101906020018083116126a357829003601f168201915b50505050508152602001600582016040518060400160405290816000820180548060200260200160405190810160405280929190818152602001828054801561273257602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612714575b505050505081526020016001820180548060200260200160405190810160405280929190818152602001828054801561278a57602002820191906000526020600020905b815481526020019060010190808311612776575b5050509190925250505090525092915050565b846daaeb6d7670e522a718067333cd4e3b1561286257336001600160a01b038216036127d057610db186868686866135c7565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa15801561281f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061284391906150ec565b61286257604051633b79c77360e21b81523360048201526024016107f1565b610e5586868686866135c7565b61287761290d565b6001600160a01b0381166128dc5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107f1565b6128e581613101565b50565b60006001600160e01b0319821663152a902d60e11b148061081f575061081f8261360c565b60c9546001600160a01b031633146116685760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107f1565b6127106001600160601b03821611156129925760405162461bcd60e51b81526004016107f19061554b565b6001600160a01b0382166129e85760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c69642072656365697665720000000000000060448201526064016107f1565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b9091021760fb55565b600080612a2e8380614da5565b9150612a3f90506020840184614da5565b905081141580612a4f5750600481115b15612a6d57604051630d5ca8b560e31b815260040160405180910390fd5b60005b81811015612ad6576000612a876020860186614da5565b83818110612a9757612a97614d58565b90506020020135905080600003612ac157604051630d5ca8b560e31b815260040160405180910390fd5b612acb81856150a0565b935050600101612a70565b50816064146118c957604051630d5ca8b560e31b815260040160405180910390fd5b63ffffffff811615610c76578163ffffffff168163ffffffff161015612b315760405163427f0ccd60e11b815260040160405180910390fd5b428163ffffffff161015610c765760405163427f0ccd60e11b815260040160405180910390fd5b80471015612ba85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016107f1565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612bf5576040519150601f19603f3d011682016040523d82523d6000602084013e612bfa565b606091505b50509050806118c95760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016107f1565b6001600160a01b038516331480612c8d5750612c8d85336106ef565b612ca95760405162461bcd60e51b81526004016107f190615595565b612cb6858585858561365c565b5050505050565b6001600160a01b038416612d1d5760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b60648201526084016107f1565b336000612d2985613842565b90506000612d3685613842565b9050612d478360008985858961388d565b60008681526065602090815260408083206001600160a01b038b16845290915281208054879290612d799084906150a0565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612dd983600089898989613a06565b50505050505050565b61012f548310612e055760405163c1ab6dc160e01b815260040160405180910390fd5b6000838152610131602052604090206003810154612e2a9063ffffffff8516906150b3565b8514612e485760405162bfc92160e01b815260040160405180910390fd5b805463ffffffff1615801590612e7f5750805463ffffffff80821691612e77918691600160401b900416615500565b63ffffffff16115b15612e9d576040516352df9fe560e01b815260040160405180910390fd5b60008263ffffffff16118015612efb57506000848152610132602090815260408083206001600160a01b038a16845290915290205463ffffffff80841691612ef0918616906001600160401b03166155e3565b6001600160401b0316115b15612f1957604051636c80554560e11b815260040160405180910390fd5b600281015463ffffffff1615801590612f3b5750600281015463ffffffff1642105b15612f595760405163914edb0f60e01b815260040160405180910390fd5b6002810154600160201b900463ffffffff1615801590612f8957506002810154600160201b900463ffffffff1642115b15612fa75760405163914edb0f60e01b815260040160405180910390fd5b8415612fd85760058101548015612fca57612fc58683600501613b61565b612fd6565b612fd686610136613b61565b505b805483908290600890612ff9908490600160401b900463ffffffff16615500565b82546101009290920a63ffffffff8181021990931691831602179091556000868152610132602090815260408083206001600160a01b038c168452909152812080549287169350916130559084906001600160401b03166155e3565b92506101000a8154816001600160401b0302191690836001600160401b0316021790555061309a86858563ffffffff1660405180602001604052806000815250612cbd565b6040805185815263ffffffff851660208201526001600160a01b038816917f2e8ac5177a616f2aec08c3048f5021e4e9743ece034e8d83ba5caf76688bb475910160405180910390a2505050505050565b6000826130f88584613c17565b14949350505050565b60c980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff1661317a5760405162461bcd60e51b81526004016107f190615603565b6128e581613c5c565b600054610100900460ff166131aa5760405162461bcd60e51b81526004016107f190615603565b611668613c8c565b600054610100900460ff166131d95760405162461bcd60e51b81526004016107f190615603565b6daaeb6d7670e522a718067333cd4e3b15610c765760405163c3c5a54760e01b81523060048201526daaeb6d7670e522a718067333cd4e9063c3c5a547906024016020604051808303816000875af1158015613239573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061325d91906150ec565b610c765780156132d157604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b1580156132bd57600080fd5b505af1158015610e55573d6000803e3d6000fd5b6001600160a01b038216156133205760405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af2903906044016132a3565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e486906024016132a3565b6067610c768282614fa0565b610c76338383613cbc565b6001600160a01b0383166133ca5760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b60648201526084016107f1565b3360006133d684613842565b905060006133e384613842565b90506134038387600085856040518060200160405280600081525061388d565b60008581526065602090815260408083206001600160a01b038a168452909152902054848110156134825760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b60648201526084016107f1565b60008681526065602090815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4604080516020810190915260009052612dd9565b6127106001600160601b03821611156135275760405162461bcd60e51b81526004016107f19061554b565b6001600160a01b03821661357d5760405162461bcd60e51b815260206004820152601b60248201527f455243323938313a20496e76616c696420706172616d6574657273000000000060448201526064016107f1565b6040805180820182526001600160a01b0393841681526001600160601b039283166020808301918252600096875260fc90529190942093519051909116600160a01b029116179055565b6001600160a01b0385163314806135e357506135e385336106ef565b6135ff5760405162461bcd60e51b81526004016107f190615595565b612cb68585858585613d9c565b60006001600160e01b03198216636cdb3d1360e11b148061363d57506001600160e01b031982166303a24d0760e21b145b8061081f57506301ffc9a760e01b6001600160e01b031983161461081f565b81518351146136be5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b60648201526084016107f1565b6001600160a01b0384166136e45760405162461bcd60e51b81526004016107f19061564e565b336136f381878787878761388d565b60005b84518110156137dc57600085828151811061371357613713614d58565b60200260200101519050600085838151811061373157613731614d58565b60209081029190910181015160008481526065835260408082206001600160a01b038e1683529093529190912054909150818110156137825760405162461bcd60e51b81526004016107f190615693565b60008381526065602090815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906137c19084906150a0565b92505081905550505050806137d590615075565b90506136f6565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161382c9291906156dd565b60405180910390a4610e55818787878787613ed8565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061387c5761387c614d58565b602090810291909101015292915050565b6001600160a01b0385166139145760005b8351811015613912578281815181106138b9576138b9614d58565b6020026020010151609760008684815181106138d7576138d7614d58565b6020026020010151815260200190815260200160002060008282546138fc91906150a0565b9091555061390b905081615075565b905061389e565b505b6001600160a01b038416610e555760005b8351811015612dd957600084828151811061394257613942614d58565b60200260200101519050600084838151811061396057613960614d58565b60200260200101519050600060976000848152602001908152602001600020549050818110156139e35760405162461bcd60e51b815260206004820152602860248201527f455243313135353a206275726e20616d6f756e74206578636565647320746f74604482015267616c537570706c7960c01b60648201526084016107f1565b600092835260976020526040909220910390556139ff81615075565b9050613925565b6001600160a01b0384163b15610e555760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190613a4a908990899088908890889060040161570b565b6020604051808303816000875af1925050508015613a85575060408051601f3d908101601f19168201909252613a8291810190615750565b60015b613b3157613a9161576d565b806308c379a003613aca5750613aa5615789565b80613ab05750613acc565b8060405162461bcd60e51b81526004016107f19190614215565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016107f1565b6001600160e01b0319811663f23a6e6160e01b14612dd95760405162461bcd60e51b81526004016107f190615812565b805460005b8181101561156f576000836000018281548110613b8557613b85614d58565b60009182526020822001546001860180546001600160a01b03909216935060649185908110613bb657613bb6614d58565b906000526020600020015487613bcc91906150b3565b613bd691906150ca565b6001600160a01b03831660009081526101336020526040812080549293508392909190613c049084906150a0565b909155505060019092019150613b669050565b600081815b845181101561105657613c4882868381518110613c3b57613c3b614d58565b6020026020010151613f93565b915080613c5481615075565b915050613c1c565b600054610100900460ff16613c835760405162461bcd60e51b81526004016107f190615603565b6128e581613351565b600054610100900460ff16613cb35760405162461bcd60e51b81526004016107f190615603565b61166833613101565b816001600160a01b0316836001600160a01b031603613d2f5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016107f1565b6001600160a01b03838116600081815260666020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b038416613dc25760405162461bcd60e51b81526004016107f19061564e565b336000613dce85613842565b90506000613ddb85613842565b9050613deb83898985858961388d565b60008681526065602090815260408083206001600160a01b038c16845290915290205485811015613e2e5760405162461bcd60e51b81526004016107f190615693565b60008781526065602090815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290613e6d9084906150a0565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4613ecd848a8a8a8a8a613a06565b505050505050505050565b6001600160a01b0384163b15610e555760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190613f1c908990899088908890889060040161585a565b6020604051808303816000875af1925050508015613f57575060408051601f3d908101601f19168201909252613f5491810190615750565b60015b613f6357613a9161576d565b6001600160e01b0319811663bc197c8160e01b14612dd95760405162461bcd60e51b81526004016107f190615812565b6000818310613faf576000828152602084905260409020613fbe565b60008381526020839052604090205b9392505050565b82805482825590600052602060002090810192821561401a579160200282015b8281111561401a57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190613fe5565b506140269291506140e0565b5090565b82805482825590600052602060002090810192821561401a579160200282015b8281111561401a57825182559160200191906001019061404a565b6040518060400160405280614078614085565b8152602001600081525090565b60408051610120810182526000808252602080830182905282840182905260608084018390526080840183905260a0840183905260c084019290925260e0830182905283518085019094528184528301529061010082015290565b5b8082111561402657600081556001016140e1565b6001600160a01b03811681146128e557600080fd5b8035614115816140f5565b919050565b6000806040838503121561412d57600080fd5b8235614138816140f5565b946020939093013593505050565b6001600160e01b0319811681146128e557600080fd5b60006020828403121561416e57600080fd5b8135613fbe81614146565b80356001600160601b038116811461411557600080fd5b600080604083850312156141a357600080fd5b82356141ae816140f5565b91506141bc60208401614179565b90509250929050565b60005b838110156141e05781810151838201526020016141c8565b50506000910152565b600081518084526142018160208601602086016141c5565b601f01601f19169290920160200192915050565b602081526000613fbe60208301846141e9565b60008083601f84011261423a57600080fd5b5081356001600160401b0381111561425157600080fd5b6020830191508360208260051b8501011115610d7757600080fd5b6000806020838503121561427f57600080fd5b82356001600160401b0381111561429557600080fd5b6142a185828601614228565b90969095509350505050565b6000602082840312156142bf57600080fd5b5035919050565b6000602082840312156142d857600080fd5b8135613fbe816140f5565b600080604083850312156142f657600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b038111828210171561434057614340614305565b6040525050565b60405161012081016001600160401b038111828210171561436a5761436a614305565b60405290565b60006001600160401b0382111561438957614389614305565b5060051b60200190565b600082601f8301126143a457600080fd5b813560206143b182614370565b6040516143be828261431b565b83815260059390931b85018201928281019150868411156143de57600080fd5b8286015b848110156143f957803583529183019183016143e2565b509695505050505050565b600082601f83011261441557600080fd5b81356001600160401b0381111561442e5761442e614305565b604051614445601f8301601f19166020018261431b565b81815284602083860101111561445a57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561448f57600080fd5b853561449a816140f5565b945060208601356144aa816140f5565b935060408601356001600160401b03808211156144c657600080fd5b6144d289838a01614393565b945060608801359150808211156144e857600080fd5b6144f489838a01614393565b9350608088013591508082111561450a57600080fd5b5061451788828901614404565b9150509295509295909350565b600081518084526020808501945080840160005b8381101561455457815187529582019590820190600101614538565b509495945050505050565b805160408084528151908401819052600091602091908201906060860190845b818110156145a45783516001600160a01b03168352928401929184019160010161457f565b5050828501519150858103838701526145bd8183614524565b9695505050505050565b602081526000613fbe602083018461455f565b600082601f8301126145eb57600080fd5b813560206145f882614370565b604051614605828261431b565b83815260059390931b850182019282810191508684111561462557600080fd5b8286015b848110156143f957803561463c816140f5565b8352918301918301614629565b6000806040838503121561465c57600080fd5b82356001600160401b038082111561467357600080fd5b61467f868387016145da565b9350602085013591508082111561469557600080fd5b506146a285828601614393565b9150509250929050565b602081526000613fbe6020830184614524565b600061012082840312156146d257600080fd5b50919050565b6000602082840312156146ea57600080fd5b81356001600160401b0381111561470057600080fd5b61470c848285016146bf565b949350505050565b60008060008060006060868803121561472c57600080fd5b8535945060208601356001600160401b038082111561474a57600080fd5b61475689838a01614228565b9096509450604088013591508082111561476f57600080fd5b5061477c88828901614228565b969995985093965092949392505050565b63ffffffff811681146128e557600080fd5b80356141158161478d565b6000806000606084860312156147bf57600080fd5b83356147ca816140f5565b92506020840135915060408401356147e18161478d565b809150509250925092565b60008060008060006080868803121561480457600080fd5b8535945060208601356148168161478d565b935060408601356148268161478d565b925060608601356001600160401b0381111561484157600080fd5b61477c88828901614228565b6000604082840312156146d257600080fd5b60006020828403121561487157600080fd5b81356001600160401b0381111561488757600080fd5b61470c8482850161484d565b600080604083850312156148a657600080fd5b8235915060208301356148b88161478d565b809150509250929050565b80151581146128e557600080fd5b8035614115816148c3565b6000806000806000806000806000806101408b8d0312156148fc57600080fd5b8a356001600160401b038082111561491357600080fd5b61491f8e838f01614404565b9b5060208d013591508082111561493557600080fd5b6149418e838f01614404565b9a5060408d013591508082111561495757600080fd5b6149638e838f01614404565b995060608d013591508082111561497957600080fd5b6149858e838f01614228565b909950975087915061499a8e60808f0161484d565b965060c08d01359150808211156149b057600080fd5b506149bd8d828e0161484d565b9450506149cc60e08c016148d1565b92506149db6101008c0161410a565b91506149ea6101208c0161410a565b90509295989b9194979a5092959850565b60008060208385031215614a0e57600080fd5b82356001600160401b0380821115614a2557600080fd5b818501915085601f830112614a3957600080fd5b813581811115614a4857600080fd5b866020828501011115614a5a57600080fd5b60209290920196919550909350505050565b805163ffffffff16825260006101206020830151614a92602086018263ffffffff169052565b506040830151614aaa604086018263ffffffff169052565b50606083015160608501526080830151614acc608086018263ffffffff169052565b5060a0830151614ae460a086018263ffffffff169052565b5060c083015160c085015260e08301518160e0860152614b06828601826141e9565b91505061010080840151858303828701526145bd838261455f565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b83811015614b8957888303603f1901855281518051878552614b6c88860182614a6c565b918901519489019490945294870194925090860190600101614b48565b509098975050505050505050565b60008060408385031215614baa57600080fd5b8235614bb5816140f5565b915060208301356148b8816148c3565b60008060408385031215614bd857600080fd5b8235915060208301356001600160401b03811115614bf557600080fd5b6146a2858286016146bf565b60008060408385031215614c1457600080fd5b8235915060208301356001600160401b03811115614c3157600080fd5b6146a28582860161484d565b600080600060608486031215614c5257600080fd5b833592506020840135614c64816140f5565b9150614c7260408501614179565b90509250925092565b60008060408385031215614c8e57600080fd5b8235614c99816140f5565b915060208301356148b8816140f5565b602081526000613fbe6020830184614a6c565b600080600080600060a08688031215614cd457600080fd5b8535614cdf816140f5565b94506020860135614cef816140f5565b9350604086013592506060860135915060808601356001600160401b03811115614d1857600080fd5b61451788828901614404565b600181811c90821680614d3857607f821691505b6020821081036146d257634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000823561011e19833603018112614d8557600080fd5b9190910192915050565b60008235603e19833603018112614d8557600080fd5b6000808335601e19843603018112614dbc57600080fd5b8301803591506001600160401b03821115614dd657600080fd5b6020019150600581901b3603821315610d7757600080fd5b600060408284031215614e0057600080fd5b604051604081016001600160401b038282108183111715614e2357614e23614305565b816040528293508435915080821115614e3b57600080fd5b614e47868387016145da565b83526020850135915080821115614e5d57600080fd5b50614e6a85828601614393565b6020830152505092915050565b60006101208236031215614e8a57600080fd5b614e92614347565b614e9b8361479f565b8152614ea96020840161479f565b6020820152614eba6040840161479f565b604082015260608301356060820152614ed56080840161479f565b6080820152614ee660a0840161479f565b60a082015260c083013560c082015260e08301356001600160401b0380821115614f0f57600080fd5b614f1b36838701614404565b60e084015261010091508185013581811115614f3657600080fd5b614f4236828801614dee565b8385015250505080915050919050565b5b81811015610c765760008155600101614f53565b601f8211156118c957806000526020600020601f840160051c81016020851015614f8e5750805b612cb6601f850160051c830182614f52565b81516001600160401b03811115614fb957614fb9614305565b614fcd81614fc78454614d24565b84614f67565b602080601f8311600181146150025760008415614fea5750858301515b600019600386901b1c1916600185901b178555610e55565b600085815260208120601f198616915b8281101561503157888601518255948401946001909101908401615012565b508582101561504f5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b6000600182016150875761508761505f565b5060010190565b60008251614d858184602087016141c5565b8082018082111561081f5761081f61505f565b808202811582820484141761081f5761081f61505f565b6000826150e757634e487b7160e01b600052601260045260246000fd5b500490565b6000602082840312156150fe57600080fd5b8151613fbe816148c3565b60006020828403121561511b57600080fd5b8135613fbe8161478d565b6000813561081f8161478d565b6000808335601e1984360301811261514a57600080fd5b8301803591506001600160401b0382111561516457600080fd5b602001915036819003821315610d7757600080fd5b6001600160401b0383111561519057615190614305565b6151a48361519e8354614d24565b83614f67565b6000601f8411600181146151d857600085156151c05750838201355b600019600387901b1c1916600186901b178355612cb6565b600083815260209020601f19861690835b8281101561520957868501358255602094850194600190920191016151e9565b50868210156152265760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b818310156118c95780600052602060002061156f838201858301614f52565b6152618283614da5565b6001600160401b038082111561527957615279614305565b600160401b8083111561528e5761528e614305565b845483865561529e848288615238565b5060008581526020808220825b868110156152ce5787356152be816140f5565b82820155968201966001016152ab565b50506001955085870194506152e581890189614da5565b858111156152f5576152f5614305565b8481111561530557615305614305565b86549550808755615317818789615238565b81955086845282842096508394505b8085101561534557853587860181905595830195948801949350615326565b50505050505050505050565b61535b8283614da5565b6001600160401b038082111561537357615373614305565b600160401b8083111561538857615388614305565b8454838655615398848288615238565b5060008581526020808220825b868110156152ce5787356153b8816140f5565b82820155968201966001016153a5565b81356153d38161478d565b815463ffffffff191663ffffffff82161782555060208201356153f58161478d565b815467ffffffff000000001916602082901b67ffffffff00000000161782555061544961542460408401615126565b825463ffffffff60401b191660409190911b6bffffffff000000000000000016178255565b606082013560018201556002810161547d61546660808501615126565b825463ffffffff191663ffffffff91909116178255565b6154ae61548c60a08501615126565b825467ffffffff00000000191660209190911b67ffffffff0000000016178255565b5060c082013560038201556154c660e0830183615133565b6154d4818360048601615179565b5050610c766154e7610100840184614d8f565b60058301615257565b8183823760009101908152919050565b63ffffffff818116838216019080821115611f4a57611f4a61505f565b60006020828403121561552f57600080fd5b613fbe82614179565b8181038181111561081f5761081f61505f565b6020808252602a908201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646040820152692073616c65507269636560b01b606082015260800190565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b6001600160401b03818116838216019080821115611f4a57611f4a61505f565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6040815260006156f06040830185614524565b82810360208401526157028185614524565b95945050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090615745908301846141e9565b979650505050505050565b60006020828403121561576257600080fd5b8151613fbe81614146565b600060033d11156157865760046000803e5060005160e01c5b90565b600060443d10156157975790565b6040516003193d81016004833e81513d6001600160401b0381602484011181841117156157c657505050505090565b82850191508151818111156157de5750505050505090565b843d87010160208285010111156157f85750505050505090565b6158076020828601018761431b565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b0386811682528516602082015260a06040820181905260009061588690830186614524565b82810360608401526158988186614524565b905082810360808401526158ac81856141e9565b9897505050505050505056fea2646970667358221220e7b50519b154fea3e0ad22ebd583bd7e6cbf15552e5546c1e126a8ca72ce0ea764736f6c63430008110033
Deployed Bytecode
0x60806040526004361061022f5760003560e01c806382f57d271161012e578063aeb61fea116100ab578063e33b7de31161006f578063e33b7de3146106be578063e985e9c5146106d4578063ef8d10f51461071d578063f242432a1461074a578063f2fde38b1461076a57600080fd5b8063aeb61fea14610611578063b390c0ab14610631578063b8f7300314610651578063bd85b03914610671578063df745d281461069e57600080fd5b80639b642de1116100f25780639b642de11461056f5780639ebeef591461058f578063a22cb465146105b1578063a3f8eace146105d1578063aada600b146105f157600080fd5b806382f57d27146104c85780638da5cb5b146104db5780639351f4ed1461050357806395d89b41146105235780639852595c1461053857600080fd5b80632eb2c2d6116101bc57806365e909d61161018057806365e909d61461044d5780636b915fe31461046d57806371130b3314610480578063715018a6146104935780637e608e91146104a857600080fd5b80632eb2c2d61461038f57806347df1fdf146103af5780634e1273f4146103d15780634f558e79146103fe5780635f4530501461042d57600080fd5b80630a7e2ac9116102035780630a7e2ac9146102db5780630e89341c146102fb578063191655871461031b57806322dcb0a71461033b5780632a55205a1461035057600080fd5b8062fdd58e1461023457806301ffc9a71461026757806302fa7c471461029757806306fdde03146102b9575b600080fd5b34801561024057600080fd5b5061025461024f36600461411a565b61078a565b6040519081526020015b60405180910390f35b34801561027357600080fd5b5061028761028236600461415c565b610825565b604051901515815260200161025e565b3480156102a357600080fd5b506102b76102b2366004614190565b610830565b005b3480156102c557600080fd5b506102ce610891565b60405161025e9190614215565b3480156102e757600080fd5b506102b76102f636600461426c565b610920565b34801561030757600080fd5b506102ce6103163660046142ad565b610b4f565b34801561032757600080fd5b506102b76103363660046142c6565b610be3565b34801561034757600080fd5b506102b7610c7a565b34801561035c57600080fd5b5061037061036b3660046142e3565b610cd0565b604080516001600160a01b03909316835260208301919091520161025e565b34801561039b57600080fd5b506102b76103aa366004614477565b610d7e565b3480156103bb57600080fd5b506103c4610e5d565b60405161025e91906145c7565b3480156103dd57600080fd5b506103f16103ec366004614649565b610f35565b60405161025e91906146ac565b34801561040a57600080fd5b506102876104193660046142ad565b600090815260976020526040902054151590565b34801561043957600080fd5b506102b76104483660046146d8565b61105e565b34801561045957600080fd5b506102b7610468366004614714565b611164565b6102b761047b3660046147aa565b61135d565b6102b761048e3660046147ec565b611575565b34801561049f57600080fd5b506102b7611656565b3480156104b457600080fd5b506102b76104c336600461485f565b61166a565b6102b76104d6366004614893565b6116b7565b3480156104e757600080fd5b5060c9546040516001600160a01b03909116815260200161025e565b34801561050f57600080fd5b506102b761051e3660046148dc565b6118ce565b34801561052f57600080fd5b506102ce611c5a565b34801561054457600080fd5b506102546105533660046142c6565b6001600160a01b03166000908152610134602052604090205490565b34801561057b57600080fd5b506102b761058a3660046149fb565b611c68565b34801561059b57600080fd5b506105a4611caf565b60405161025e9190614b21565b3480156105bd57600080fd5b506102b76105cc366004614b97565b611f51565b3480156105dd57600080fd5b506102546105ec3660046142c6565b612015565b3480156105fd57600080fd5b506102b761060c366004614bc5565b612045565b34801561061d57600080fd5b506102b761062c366004614c01565b6123dd565b34801561063d57600080fd5b506102b761064c3660046142e3565b61249c565b34801561065d57600080fd5b506102b761066c366004614c3d565b61250a565b34801561067d57600080fd5b5061025461068c3660046142ad565b60009081526097602052604090205490565b3480156106aa57600080fd5b506102b76106b936600461426c565b612572565b3480156106ca57600080fd5b5061013554610254565b3480156106e057600080fd5b506102876106ef366004614c7b565b6001600160a01b03918216600090815260666020908152604080832093909416825291909152205460ff1690565b34801561072957600080fd5b5061073d6107383660046142ad565b6125b0565b60405161025e9190614ca9565b34801561075657600080fd5b506102b7610765366004614cbc565b61279d565b34801561077657600080fd5b506102b76107853660046142c6565b61286f565b60006001600160a01b0383166107fa5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b5060008181526065602090815260408083206001600160a01b03861684529091529020545b92915050565b600061081f826128e8565b61083861290d565b6108428282612967565b604080516001600160a01b03841681526001600160601b03831660208201527f8039bd6e4e7dba001c8840eb2e118d9d131246faa7d0d04335f7305127ec0b1091015b60405180910390a15050565b61012d805461089f90614d24565b80601f01602080910402602001604051908101604052809291908181526020018280546108cb90614d24565b80156109185780601f106108ed57610100808354040283529160200191610918565b820191906000526020600020905b8154815290600101906020018083116108fb57829003601f168201915b505050505081565b61092861290d565b61012f54819060005b82811015610b4557600085858381811061094d5761094d614d58565b905060200281019061095f9190614d6e565b61096e90610100810190614d8f565b6109789080614da5565b905011156109bb576109bb85858381811061099557610995614d58565b90506020028101906109a79190614d6e565b6109b690610100810190614d8f565b612a21565b60008585838181106109cf576109cf614d58565b90506020028101906109e19190614d6e565b6109ea90614e77565b90506109fe81608001518260a00151612af8565b600060408281018281528583526101316020908152919092208351815492850151935163ffffffff91821667ffffffffffffffff1994851617600160201b95831686021763ffffffff60401b1916600160401b9183169190910217825560608501516001830155608085015160028301805460a0880151928416951694909417911690930292909217905560c0820151600382015560e0820151849183916004820190610aab9082614fa0565b50610100820151805180516005840191610aca91839160200190613fc5565b506020828101518051610ae3926001850192019061402a565b50505090505083610af390615075565b9350826001019250808260e00151604051610b0e919061508e565b604051908190038120907f2031bb75fe7acfeb75a155106919ca62ef2e240732a3bf6035ce09f71698833e90600090a35050610931565b5061012f55505050565b606060678054610b5e90614d24565b80601f0160208091040260200160405190810160405280929190818152602001828054610b8a90614d24565b8015610bd75780601f10610bac57610100808354040283529160200191610bd7565b820191906000526020600020905b815481529060010190602001808311610bba57829003601f168201915b50505050509050919050565b6000610bee82612015565b90508015610c7657806101356000828254610c0991906150a0565b90915550506001600160a01b038216600090815261013460205260409020805482019055610c378282612b58565b604080516001600160a01b0384168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b0569101610885565b5050565b610c8261290d565b610130805460ff8082161560ff1990921682179092556040519116151581527f1509137b40df48e8ef9596f9db16b632b15353d0e0688d9f23221953eb0328dd9060200160405180910390a1565b600082815260fc602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610d4557506040805180820190915260fb546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090610d64906001600160601b0316876150b3565b610d6e91906150ca565b91519350909150505b9250929050565b846daaeb6d7670e522a718067333cd4e3b15610e4857336001600160a01b03821603610db657610db18686868686612c71565b610e55565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015610e05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e2991906150ec565b610e4857604051633b79c77360e21b81523360048201526024016107f1565b610e558686868686612c71565b505050505050565b604080518082019091526060808252602082015260408051610136805460606020820284018101855293830181815292939192849290918491840182828015610ecf57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610eb1575b5050505050815260200160018201805480602002602001604051908101604052809291908181526020018280548015610f2757602002820191906000526020600020905b815481526020019060010190808311610f13575b505050505081525050905090565b60608151835114610f9a5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016107f1565b600083516001600160401b03811115610fb557610fb5614305565b604051908082528060200260200182016040528015610fde578160200160208202803683370190505b50905060005b84518110156110565761102985828151811061100257611002614d58565b602002602001015185838151811061101c5761101c614d58565b602002602001015161078a565b82828151811061103b5761103b614d58565b602090810291909101015261104f81615075565b9050610fe4565b509392505050565b61106661290d565b6000611076610100830183614d8f565b6110809080614da5565b90501115611099576110996109b6610100830183614d8f565b6110c16110ac60a0830160808401615109565b6110bc60c0840160a08501615109565b612af8565b61012f5460008181526101316020526040902082906110e082826153c8565b5050600081815261013160205260408120805463ffffffff60401b1916905561012f805490919061111090615075565b909155508061112260e0840184615133565b6040516111309291906154f0565b604051908190038120907f2031bb75fe7acfeb75a155106919ca62ef2e240732a3bf6035ce09f71698833e90600090a35050565b61116c61290d565b61012f54851061118f5760405163c1ab6dc160e01b815260040160405180910390fd5b8060008482146111b25760405163e6dcad7760e01b815260040160405180910390fd5b600087815261013160205260408120905b838110156113195760008888838181106111df576111df614d58565b90506020020160208101906111f49190615109565b835461120d9190600160401b900463ffffffff16615500565b835490915063ffffffff16158015906112305750825463ffffffff908116908216115b1561124e576040516352df9fe560e01b815260040160405180910390fd5b825463ffffffff60401b1916600160401b63ffffffff83160217835588888381811061127c5761127c614d58565b90506020020160208101906112919190615109565b6112a19063ffffffff16856150a0565b93506113108787848181106112b8576112b8614d58565b90506020020160208101906112cd91906142c6565b8b8b8b868181106112e0576112e0614d58565b90506020020160208101906112f59190615109565b63ffffffff1660405180602001604052806000815250612cbd565b506001016111c3565b5060408051848152602081018490527f71cc7095cc35ed4701c217a8efb440732eb0737da67f6548c008ac26fba95464910160405180910390a15050505050505050565b600082815261013160209081526040808320815161012081018352815463ffffffff8082168352600160201b808304821696840196909652600160401b90910481169382019390935260018201546060820152600282015480841660808301529390930490911660a0830152600381015460c083015260048101805460e0840191906113e890614d24565b80601f016020809104026020016040519081016040528092919081815260200182805461141490614d24565b80156114615780601f1061143657610100808354040283529160200191611461565b820191906000526020600020905b81548152906001019060200180831161144457829003601f168201915b5050505050815260200160058201604051806040016040529081600082018054806020026020016040519081016040528092919081815260200182805480156114d357602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116114b5575b505050505081526020016001820180548060200260200160405190810160405280929190818152602001828054801561152b57602002820191906000526020600020905b815481526020019060010190808311611517575b5050509190925250505090525060608101519091501561155e57604051634d0ee1f560e11b815260040160405180910390fd5b61156f843485858560200151612de2565b50505050565b60008581526101316020526040902060010154806115a657604051634d0ee1f560e11b815260040160405180910390fd5b61162c838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506040516bffffffffffffffffffffffff193360601b1660208201526001600160e01b031960e08a901b1660348201528592506038019050604051602081830303815290604052805190602001206130eb565b611649576040516309bde33960e01b815260040160405180910390fd5b610e553334888888612de2565b61165e61290d565b6116686000613101565b565b61167261290d565b61167b81612a21565b806101366116898282615351565b50506040517fb855aa79dff5fe918a28a8a1d8101db624120176786f8e2658f354b0e68654d090600090a150565b600082815261013160209081526040808320815161012081018352815463ffffffff8082168352600160201b808304821696840196909652600160401b90910481169382019390935260018201546060820152600282015480841660808301529390930490911660a0830152600381015460c083015260048101805460e08401919061174290614d24565b80601f016020809104026020016040519081016040528092919081815260200182805461176e90614d24565b80156117bb5780601f10611790576101008083540402835291602001916117bb565b820191906000526020600020905b81548152906001019060200180831161179e57829003601f168201915b50505050508152602001600582016040518060400160405290816000820180548060200260200160405190810160405280929190818152602001828054801561182d57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161180f575b505050505081526020016001820180548060200260200160405190810160405280929190818152602001828054801561188557602002820191906000526020600020905b815481526020019060010190808311611871575b505050919092525050509052506060810151909150156118b857604051634d0ee1f560e11b815260040160405180910390fd5b6118c9333485858560200151612de2565b505050565b600054610100900460ff16158080156118ee5750600054600160ff909116105b806119085750303b158015611908575060005460ff166001145b61196b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016107f1565b6000805460ff19166001179055801561198e576000805461ff0019166101001790555b61199789613153565b61199f613183565b8660648111156119c257604051633a4733d960e11b815260040160405180910390fd5b6119cb86612a21565b60005b81811015611b745760008a8a838181106119ea576119ea614d58565b90506020028101906119fc9190614d6e565b611a0b90610100810190614d8f565b611a159080614da5565b90501115611a3257611a328a8a8381811061099557610995614d58565b611a9f8a8a83818110611a4757611a47614d58565b9050602002810190611a599190614d6e565b611a6a9060a0810190608001615109565b8b8b84818110611a7c57611a7c614d58565b9050602002810190611a8e9190614d6e565b6110bc9060c081019060a001615109565b898982818110611ab157611ab1614d58565b9050602002810190611ac39190614d6e565b600082815261013160205260409020611adc82826153c8565b5050600081815261013160205260409020805463ffffffff60401b19169055808a8a82818110611b0e57611b0e614d58565b9050602002810190611b209190614d6e565b611b2e9060e0810190615133565b604051611b3c9291906154f0565b604051908190038120907f2031bb75fe7acfeb75a155106919ca62ef2e240732a3bf6035ce09f71698833e90600090a36001016119ce565b5061012f81905585610136611b898282615351565b5061012d9050611b998d82614fa0565b5061012e611ba78c82614fa0565b50610130805460ff1916861515179055611bdc611bc760208901896142c6565b611bd760408a0160208b0161551d565b612967565b611be584613101565b611c06836001600160a01b03811615611bff5760016131b2565b60006131b2565b508015611c4d576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b61012e805461089f90614d24565b611c7061290d565b610c7682828080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061335192505050565b61012f546060906000816001600160401b03811115611cd057611cd0614305565b604051908082528060200260200182016040528015611d0957816020015b611cf6614065565b815260200190600190039081611cee5790505b50905060005b82811015611f4a5760008181526101316020908152604091829020825161012081018452815463ffffffff8082168352600160201b808304821695840195909552600160401b90910481169482019490945260018201546060820152600282015480851660808301529290920490921660a0820152600382015460c082015260048201805491929160e084019190611da690614d24565b80601f0160208091040260200160405190810160405280929190818152602001828054611dd290614d24565b8015611e1f5780601f10611df457610100808354040283529160200191611e1f565b820191906000526020600020905b815481529060010190602001808311611e0257829003601f168201915b505050505081526020016005820160405180604001604052908160008201805480602002602001604051908101604052809291908181526020018280548015611e9157602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611e73575b5050505050815260200160018201805480602002602001604051908101604052809291908181526020018280548015611ee957602002820191906000526020600020905b815481526020019060010190808311611ed5575b50505050508152505081525050828281518110611f0857611f08614d58565b60200260200101516000018190525080828281518110611f2a57611f2a614d58565b602090810291909101810151015280611f4281615075565b915050611d0f565b5092915050565b816daaeb6d7670e522a718067333cd4e3b1561200b57604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611fbf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fe391906150ec565b61200b57604051633b79c77360e21b81526001600160a01b03821660048201526024016107f1565b6118c9838361335d565b6001600160a01b0381166000908152610134602090815260408083205461013390925282205461081f9190615538565b61204d61290d565b61012f5482106120705760405163c1ab6dc160e01b815260040160405180910390fd5b600082815261013160209081526040808320815161012081018352815463ffffffff8082168352600160201b808304821696840196909652600160401b90910481169382019390935260018201546060820152600282015480841660808301529390930490911660a0830152600381015460c083015260048101805460e0840191906120fb90614d24565b80601f016020809104026020016040519081016040528092919081815260200182805461212790614d24565b80156121745780601f1061214957610100808354040283529160200191612174565b820191906000526020600020905b81548152906001019060200180831161215757829003601f168201915b5050505050815260200160058201604051806040016040529081600082018054806020026020016040519081016040528092919081815260200182805480156121e657602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116121c8575b505050505081526020016001820180548060200260200160405190810160405280929190818152602001828054801561223e57602002820191906000526020600020905b81548152602001906001019080831161222a575b5050509190925250505090525060408101516101008201519192509063ffffffff8216158015906122e15750825163ffffffff1661227f6020860186615109565b63ffffffff161415806122b45750826080015163ffffffff168460800160208101906122ab9190615109565b63ffffffff1614155b806122e157508260a0015163ffffffff168460a00160208101906122d89190615109565b63ffffffff1614155b156122ff5760405163fa2844a560e01b815260040160405180910390fd5b61232261231260a0860160808701615109565b6110bc60c0870160a08801615109565b600085815261013160205260409020849061233d82826153c8565b5050600085815261013160209081526040909120805463ffffffff60401b1916600160401b63ffffffff861602178155825180518493600590930192612387928492910190613fc5565b5060208281015180516123a0926001850192019061402a565b50506040518681527f4040cd6ff4eef67e86ab078c16c2514c123f7b8782aa574307eaf34c726f3ef5915060200160405180910390a15050505050565b6123e561290d565b61012f5482106124085760405163c1ab6dc160e01b815260040160405180910390fd5b60008281526101316020526040902054600160401b900463ffffffff16156124435760405163fa2844a560e01b815260040160405180910390fd5b61244c81612a21565b600082815261013160205260409020819060050161246a8282615351565b50506040518281527f71c8525fc38b77b64a66d848a818337505e69f1eacce1994cc6ca727e16d78c290602001610885565b6101305460ff166124c05760405163fa32799b60e01b815260040160405180910390fd5b6124cb338383613368565b604080518381526020810183905233917fde3ca466246b0da455138dbea78dacd91d3c40dc98d5846ff0193bf67c24b0e7910160405180910390a25050565b61251261290d565b61251d8383836134fc565b604080518481526001600160a01b03841660208201526001600160601b0383168183015290517fe361b60b9164428d036a601ec08552e653bfe8c44389b8a4ebfd47281eb8741a9181900360600190a1505050565b8060005b8181101561156f576125a884848381811061259357612593614d58565b905060200201602081019061033691906142c6565b600101612576565b6125b8614085565b60008281526101316020908152604091829020825161012081018452815463ffffffff8082168352600160201b808304821695840195909552600160401b90910481169482019490945260018201546060820152600282015480851660808301529290920490921660a0820152600382015460c082015260048201805491929160e08401919061264790614d24565b80601f016020809104026020016040519081016040528092919081815260200182805461267390614d24565b80156126c05780601f10612695576101008083540402835291602001916126c0565b820191906000526020600020905b8154815290600101906020018083116126a357829003601f168201915b50505050508152602001600582016040518060400160405290816000820180548060200260200160405190810160405280929190818152602001828054801561273257602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612714575b505050505081526020016001820180548060200260200160405190810160405280929190818152602001828054801561278a57602002820191906000526020600020905b815481526020019060010190808311612776575b5050509190925250505090525092915050565b846daaeb6d7670e522a718067333cd4e3b1561286257336001600160a01b038216036127d057610db186868686866135c7565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa15801561281f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061284391906150ec565b61286257604051633b79c77360e21b81523360048201526024016107f1565b610e5586868686866135c7565b61287761290d565b6001600160a01b0381166128dc5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107f1565b6128e581613101565b50565b60006001600160e01b0319821663152a902d60e11b148061081f575061081f8261360c565b60c9546001600160a01b031633146116685760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107f1565b6127106001600160601b03821611156129925760405162461bcd60e51b81526004016107f19061554b565b6001600160a01b0382166129e85760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c69642072656365697665720000000000000060448201526064016107f1565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b9091021760fb55565b600080612a2e8380614da5565b9150612a3f90506020840184614da5565b905081141580612a4f5750600481115b15612a6d57604051630d5ca8b560e31b815260040160405180910390fd5b60005b81811015612ad6576000612a876020860186614da5565b83818110612a9757612a97614d58565b90506020020135905080600003612ac157604051630d5ca8b560e31b815260040160405180910390fd5b612acb81856150a0565b935050600101612a70565b50816064146118c957604051630d5ca8b560e31b815260040160405180910390fd5b63ffffffff811615610c76578163ffffffff168163ffffffff161015612b315760405163427f0ccd60e11b815260040160405180910390fd5b428163ffffffff161015610c765760405163427f0ccd60e11b815260040160405180910390fd5b80471015612ba85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016107f1565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612bf5576040519150601f19603f3d011682016040523d82523d6000602084013e612bfa565b606091505b50509050806118c95760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016107f1565b6001600160a01b038516331480612c8d5750612c8d85336106ef565b612ca95760405162461bcd60e51b81526004016107f190615595565b612cb6858585858561365c565b5050505050565b6001600160a01b038416612d1d5760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b60648201526084016107f1565b336000612d2985613842565b90506000612d3685613842565b9050612d478360008985858961388d565b60008681526065602090815260408083206001600160a01b038b16845290915281208054879290612d799084906150a0565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612dd983600089898989613a06565b50505050505050565b61012f548310612e055760405163c1ab6dc160e01b815260040160405180910390fd5b6000838152610131602052604090206003810154612e2a9063ffffffff8516906150b3565b8514612e485760405162bfc92160e01b815260040160405180910390fd5b805463ffffffff1615801590612e7f5750805463ffffffff80821691612e77918691600160401b900416615500565b63ffffffff16115b15612e9d576040516352df9fe560e01b815260040160405180910390fd5b60008263ffffffff16118015612efb57506000848152610132602090815260408083206001600160a01b038a16845290915290205463ffffffff80841691612ef0918616906001600160401b03166155e3565b6001600160401b0316115b15612f1957604051636c80554560e11b815260040160405180910390fd5b600281015463ffffffff1615801590612f3b5750600281015463ffffffff1642105b15612f595760405163914edb0f60e01b815260040160405180910390fd5b6002810154600160201b900463ffffffff1615801590612f8957506002810154600160201b900463ffffffff1642115b15612fa75760405163914edb0f60e01b815260040160405180910390fd5b8415612fd85760058101548015612fca57612fc58683600501613b61565b612fd6565b612fd686610136613b61565b505b805483908290600890612ff9908490600160401b900463ffffffff16615500565b82546101009290920a63ffffffff8181021990931691831602179091556000868152610132602090815260408083206001600160a01b038c168452909152812080549287169350916130559084906001600160401b03166155e3565b92506101000a8154816001600160401b0302191690836001600160401b0316021790555061309a86858563ffffffff1660405180602001604052806000815250612cbd565b6040805185815263ffffffff851660208201526001600160a01b038816917f2e8ac5177a616f2aec08c3048f5021e4e9743ece034e8d83ba5caf76688bb475910160405180910390a2505050505050565b6000826130f88584613c17565b14949350505050565b60c980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff1661317a5760405162461bcd60e51b81526004016107f190615603565b6128e581613c5c565b600054610100900460ff166131aa5760405162461bcd60e51b81526004016107f190615603565b611668613c8c565b600054610100900460ff166131d95760405162461bcd60e51b81526004016107f190615603565b6daaeb6d7670e522a718067333cd4e3b15610c765760405163c3c5a54760e01b81523060048201526daaeb6d7670e522a718067333cd4e9063c3c5a547906024016020604051808303816000875af1158015613239573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061325d91906150ec565b610c765780156132d157604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b1580156132bd57600080fd5b505af1158015610e55573d6000803e3d6000fd5b6001600160a01b038216156133205760405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af2903906044016132a3565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e486906024016132a3565b6067610c768282614fa0565b610c76338383613cbc565b6001600160a01b0383166133ca5760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b60648201526084016107f1565b3360006133d684613842565b905060006133e384613842565b90506134038387600085856040518060200160405280600081525061388d565b60008581526065602090815260408083206001600160a01b038a168452909152902054848110156134825760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b60648201526084016107f1565b60008681526065602090815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4604080516020810190915260009052612dd9565b6127106001600160601b03821611156135275760405162461bcd60e51b81526004016107f19061554b565b6001600160a01b03821661357d5760405162461bcd60e51b815260206004820152601b60248201527f455243323938313a20496e76616c696420706172616d6574657273000000000060448201526064016107f1565b6040805180820182526001600160a01b0393841681526001600160601b039283166020808301918252600096875260fc90529190942093519051909116600160a01b029116179055565b6001600160a01b0385163314806135e357506135e385336106ef565b6135ff5760405162461bcd60e51b81526004016107f190615595565b612cb68585858585613d9c565b60006001600160e01b03198216636cdb3d1360e11b148061363d57506001600160e01b031982166303a24d0760e21b145b8061081f57506301ffc9a760e01b6001600160e01b031983161461081f565b81518351146136be5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b60648201526084016107f1565b6001600160a01b0384166136e45760405162461bcd60e51b81526004016107f19061564e565b336136f381878787878761388d565b60005b84518110156137dc57600085828151811061371357613713614d58565b60200260200101519050600085838151811061373157613731614d58565b60209081029190910181015160008481526065835260408082206001600160a01b038e1683529093529190912054909150818110156137825760405162461bcd60e51b81526004016107f190615693565b60008381526065602090815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906137c19084906150a0565b92505081905550505050806137d590615075565b90506136f6565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161382c9291906156dd565b60405180910390a4610e55818787878787613ed8565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061387c5761387c614d58565b602090810291909101015292915050565b6001600160a01b0385166139145760005b8351811015613912578281815181106138b9576138b9614d58565b6020026020010151609760008684815181106138d7576138d7614d58565b6020026020010151815260200190815260200160002060008282546138fc91906150a0565b9091555061390b905081615075565b905061389e565b505b6001600160a01b038416610e555760005b8351811015612dd957600084828151811061394257613942614d58565b60200260200101519050600084838151811061396057613960614d58565b60200260200101519050600060976000848152602001908152602001600020549050818110156139e35760405162461bcd60e51b815260206004820152602860248201527f455243313135353a206275726e20616d6f756e74206578636565647320746f74604482015267616c537570706c7960c01b60648201526084016107f1565b600092835260976020526040909220910390556139ff81615075565b9050613925565b6001600160a01b0384163b15610e555760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190613a4a908990899088908890889060040161570b565b6020604051808303816000875af1925050508015613a85575060408051601f3d908101601f19168201909252613a8291810190615750565b60015b613b3157613a9161576d565b806308c379a003613aca5750613aa5615789565b80613ab05750613acc565b8060405162461bcd60e51b81526004016107f19190614215565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016107f1565b6001600160e01b0319811663f23a6e6160e01b14612dd95760405162461bcd60e51b81526004016107f190615812565b805460005b8181101561156f576000836000018281548110613b8557613b85614d58565b60009182526020822001546001860180546001600160a01b03909216935060649185908110613bb657613bb6614d58565b906000526020600020015487613bcc91906150b3565b613bd691906150ca565b6001600160a01b03831660009081526101336020526040812080549293508392909190613c049084906150a0565b909155505060019092019150613b669050565b600081815b845181101561105657613c4882868381518110613c3b57613c3b614d58565b6020026020010151613f93565b915080613c5481615075565b915050613c1c565b600054610100900460ff16613c835760405162461bcd60e51b81526004016107f190615603565b6128e581613351565b600054610100900460ff16613cb35760405162461bcd60e51b81526004016107f190615603565b61166833613101565b816001600160a01b0316836001600160a01b031603613d2f5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016107f1565b6001600160a01b03838116600081815260666020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b038416613dc25760405162461bcd60e51b81526004016107f19061564e565b336000613dce85613842565b90506000613ddb85613842565b9050613deb83898985858961388d565b60008681526065602090815260408083206001600160a01b038c16845290915290205485811015613e2e5760405162461bcd60e51b81526004016107f190615693565b60008781526065602090815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290613e6d9084906150a0565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4613ecd848a8a8a8a8a613a06565b505050505050505050565b6001600160a01b0384163b15610e555760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190613f1c908990899088908890889060040161585a565b6020604051808303816000875af1925050508015613f57575060408051601f3d908101601f19168201909252613f5491810190615750565b60015b613f6357613a9161576d565b6001600160e01b0319811663bc197c8160e01b14612dd95760405162461bcd60e51b81526004016107f190615812565b6000818310613faf576000828152602084905260409020613fbe565b60008381526020839052604090205b9392505050565b82805482825590600052602060002090810192821561401a579160200282015b8281111561401a57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190613fe5565b506140269291506140e0565b5090565b82805482825590600052602060002090810192821561401a579160200282015b8281111561401a57825182559160200191906001019061404a565b6040518060400160405280614078614085565b8152602001600081525090565b60408051610120810182526000808252602080830182905282840182905260608084018390526080840183905260a0840183905260c084019290925260e0830182905283518085019094528184528301529061010082015290565b5b8082111561402657600081556001016140e1565b6001600160a01b03811681146128e557600080fd5b8035614115816140f5565b919050565b6000806040838503121561412d57600080fd5b8235614138816140f5565b946020939093013593505050565b6001600160e01b0319811681146128e557600080fd5b60006020828403121561416e57600080fd5b8135613fbe81614146565b80356001600160601b038116811461411557600080fd5b600080604083850312156141a357600080fd5b82356141ae816140f5565b91506141bc60208401614179565b90509250929050565b60005b838110156141e05781810151838201526020016141c8565b50506000910152565b600081518084526142018160208601602086016141c5565b601f01601f19169290920160200192915050565b602081526000613fbe60208301846141e9565b60008083601f84011261423a57600080fd5b5081356001600160401b0381111561425157600080fd5b6020830191508360208260051b8501011115610d7757600080fd5b6000806020838503121561427f57600080fd5b82356001600160401b0381111561429557600080fd5b6142a185828601614228565b90969095509350505050565b6000602082840312156142bf57600080fd5b5035919050565b6000602082840312156142d857600080fd5b8135613fbe816140f5565b600080604083850312156142f657600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b038111828210171561434057614340614305565b6040525050565b60405161012081016001600160401b038111828210171561436a5761436a614305565b60405290565b60006001600160401b0382111561438957614389614305565b5060051b60200190565b600082601f8301126143a457600080fd5b813560206143b182614370565b6040516143be828261431b565b83815260059390931b85018201928281019150868411156143de57600080fd5b8286015b848110156143f957803583529183019183016143e2565b509695505050505050565b600082601f83011261441557600080fd5b81356001600160401b0381111561442e5761442e614305565b604051614445601f8301601f19166020018261431b565b81815284602083860101111561445a57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561448f57600080fd5b853561449a816140f5565b945060208601356144aa816140f5565b935060408601356001600160401b03808211156144c657600080fd5b6144d289838a01614393565b945060608801359150808211156144e857600080fd5b6144f489838a01614393565b9350608088013591508082111561450a57600080fd5b5061451788828901614404565b9150509295509295909350565b600081518084526020808501945080840160005b8381101561455457815187529582019590820190600101614538565b509495945050505050565b805160408084528151908401819052600091602091908201906060860190845b818110156145a45783516001600160a01b03168352928401929184019160010161457f565b5050828501519150858103838701526145bd8183614524565b9695505050505050565b602081526000613fbe602083018461455f565b600082601f8301126145eb57600080fd5b813560206145f882614370565b604051614605828261431b565b83815260059390931b850182019282810191508684111561462557600080fd5b8286015b848110156143f957803561463c816140f5565b8352918301918301614629565b6000806040838503121561465c57600080fd5b82356001600160401b038082111561467357600080fd5b61467f868387016145da565b9350602085013591508082111561469557600080fd5b506146a285828601614393565b9150509250929050565b602081526000613fbe6020830184614524565b600061012082840312156146d257600080fd5b50919050565b6000602082840312156146ea57600080fd5b81356001600160401b0381111561470057600080fd5b61470c848285016146bf565b949350505050565b60008060008060006060868803121561472c57600080fd5b8535945060208601356001600160401b038082111561474a57600080fd5b61475689838a01614228565b9096509450604088013591508082111561476f57600080fd5b5061477c88828901614228565b969995985093965092949392505050565b63ffffffff811681146128e557600080fd5b80356141158161478d565b6000806000606084860312156147bf57600080fd5b83356147ca816140f5565b92506020840135915060408401356147e18161478d565b809150509250925092565b60008060008060006080868803121561480457600080fd5b8535945060208601356148168161478d565b935060408601356148268161478d565b925060608601356001600160401b0381111561484157600080fd5b61477c88828901614228565b6000604082840312156146d257600080fd5b60006020828403121561487157600080fd5b81356001600160401b0381111561488757600080fd5b61470c8482850161484d565b600080604083850312156148a657600080fd5b8235915060208301356148b88161478d565b809150509250929050565b80151581146128e557600080fd5b8035614115816148c3565b6000806000806000806000806000806101408b8d0312156148fc57600080fd5b8a356001600160401b038082111561491357600080fd5b61491f8e838f01614404565b9b5060208d013591508082111561493557600080fd5b6149418e838f01614404565b9a5060408d013591508082111561495757600080fd5b6149638e838f01614404565b995060608d013591508082111561497957600080fd5b6149858e838f01614228565b909950975087915061499a8e60808f0161484d565b965060c08d01359150808211156149b057600080fd5b506149bd8d828e0161484d565b9450506149cc60e08c016148d1565b92506149db6101008c0161410a565b91506149ea6101208c0161410a565b90509295989b9194979a5092959850565b60008060208385031215614a0e57600080fd5b82356001600160401b0380821115614a2557600080fd5b818501915085601f830112614a3957600080fd5b813581811115614a4857600080fd5b866020828501011115614a5a57600080fd5b60209290920196919550909350505050565b805163ffffffff16825260006101206020830151614a92602086018263ffffffff169052565b506040830151614aaa604086018263ffffffff169052565b50606083015160608501526080830151614acc608086018263ffffffff169052565b5060a0830151614ae460a086018263ffffffff169052565b5060c083015160c085015260e08301518160e0860152614b06828601826141e9565b91505061010080840151858303828701526145bd838261455f565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b83811015614b8957888303603f1901855281518051878552614b6c88860182614a6c565b918901519489019490945294870194925090860190600101614b48565b509098975050505050505050565b60008060408385031215614baa57600080fd5b8235614bb5816140f5565b915060208301356148b8816148c3565b60008060408385031215614bd857600080fd5b8235915060208301356001600160401b03811115614bf557600080fd5b6146a2858286016146bf565b60008060408385031215614c1457600080fd5b8235915060208301356001600160401b03811115614c3157600080fd5b6146a28582860161484d565b600080600060608486031215614c5257600080fd5b833592506020840135614c64816140f5565b9150614c7260408501614179565b90509250925092565b60008060408385031215614c8e57600080fd5b8235614c99816140f5565b915060208301356148b8816140f5565b602081526000613fbe6020830184614a6c565b600080600080600060a08688031215614cd457600080fd5b8535614cdf816140f5565b94506020860135614cef816140f5565b9350604086013592506060860135915060808601356001600160401b03811115614d1857600080fd5b61451788828901614404565b600181811c90821680614d3857607f821691505b6020821081036146d257634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000823561011e19833603018112614d8557600080fd5b9190910192915050565b60008235603e19833603018112614d8557600080fd5b6000808335601e19843603018112614dbc57600080fd5b8301803591506001600160401b03821115614dd657600080fd5b6020019150600581901b3603821315610d7757600080fd5b600060408284031215614e0057600080fd5b604051604081016001600160401b038282108183111715614e2357614e23614305565b816040528293508435915080821115614e3b57600080fd5b614e47868387016145da565b83526020850135915080821115614e5d57600080fd5b50614e6a85828601614393565b6020830152505092915050565b60006101208236031215614e8a57600080fd5b614e92614347565b614e9b8361479f565b8152614ea96020840161479f565b6020820152614eba6040840161479f565b604082015260608301356060820152614ed56080840161479f565b6080820152614ee660a0840161479f565b60a082015260c083013560c082015260e08301356001600160401b0380821115614f0f57600080fd5b614f1b36838701614404565b60e084015261010091508185013581811115614f3657600080fd5b614f4236828801614dee565b8385015250505080915050919050565b5b81811015610c765760008155600101614f53565b601f8211156118c957806000526020600020601f840160051c81016020851015614f8e5750805b612cb6601f850160051c830182614f52565b81516001600160401b03811115614fb957614fb9614305565b614fcd81614fc78454614d24565b84614f67565b602080601f8311600181146150025760008415614fea5750858301515b600019600386901b1c1916600185901b178555610e55565b600085815260208120601f198616915b8281101561503157888601518255948401946001909101908401615012565b508582101561504f5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b6000600182016150875761508761505f565b5060010190565b60008251614d858184602087016141c5565b8082018082111561081f5761081f61505f565b808202811582820484141761081f5761081f61505f565b6000826150e757634e487b7160e01b600052601260045260246000fd5b500490565b6000602082840312156150fe57600080fd5b8151613fbe816148c3565b60006020828403121561511b57600080fd5b8135613fbe8161478d565b6000813561081f8161478d565b6000808335601e1984360301811261514a57600080fd5b8301803591506001600160401b0382111561516457600080fd5b602001915036819003821315610d7757600080fd5b6001600160401b0383111561519057615190614305565b6151a48361519e8354614d24565b83614f67565b6000601f8411600181146151d857600085156151c05750838201355b600019600387901b1c1916600186901b178355612cb6565b600083815260209020601f19861690835b8281101561520957868501358255602094850194600190920191016151e9565b50868210156152265760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b818310156118c95780600052602060002061156f838201858301614f52565b6152618283614da5565b6001600160401b038082111561527957615279614305565b600160401b8083111561528e5761528e614305565b845483865561529e848288615238565b5060008581526020808220825b868110156152ce5787356152be816140f5565b82820155968201966001016152ab565b50506001955085870194506152e581890189614da5565b858111156152f5576152f5614305565b8481111561530557615305614305565b86549550808755615317818789615238565b81955086845282842096508394505b8085101561534557853587860181905595830195948801949350615326565b50505050505050505050565b61535b8283614da5565b6001600160401b038082111561537357615373614305565b600160401b8083111561538857615388614305565b8454838655615398848288615238565b5060008581526020808220825b868110156152ce5787356153b8816140f5565b82820155968201966001016153a5565b81356153d38161478d565b815463ffffffff191663ffffffff82161782555060208201356153f58161478d565b815467ffffffff000000001916602082901b67ffffffff00000000161782555061544961542460408401615126565b825463ffffffff60401b191660409190911b6bffffffff000000000000000016178255565b606082013560018201556002810161547d61546660808501615126565b825463ffffffff191663ffffffff91909116178255565b6154ae61548c60a08501615126565b825467ffffffff00000000191660209190911b67ffffffff0000000016178255565b5060c082013560038201556154c660e0830183615133565b6154d4818360048601615179565b5050610c766154e7610100840184614d8f565b60058301615257565b8183823760009101908152919050565b63ffffffff818116838216019080821115611f4a57611f4a61505f565b60006020828403121561552f57600080fd5b613fbe82614179565b8181038181111561081f5761081f61505f565b6020808252602a908201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646040820152692073616c65507269636560b01b606082015260800190565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b6001600160401b03818116838216019080821115611f4a57611f4a61505f565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6040815260006156f06040830185614524565b82810360208401526157028185614524565b95945050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090615745908301846141e9565b979650505050505050565b60006020828403121561576257600080fd5b8151613fbe81614146565b600060033d11156157865760046000803e5060005160e01c5b90565b600060443d10156157975790565b6040516003193d81016004833e81513d6001600160401b0381602484011181841117156157c657505050505090565b82850191508151818111156157de5750505050505090565b843d87010160208285010111156157f85750505050505090565b6158076020828601018761431b565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b0386811682528516602082015260a06040820181905260009061588690830186614524565b82810360608401526158988186614524565b905082810360808401526158ac81856141e9565b9897505050505050505056fea2646970667358221220e7b50519b154fea3e0ad22ebd583bd7e6cbf15552e5546c1e126a8ca72ce0ea764736f6c63430008110033
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.