More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 84 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Mint | 19738135 | 249 days ago | IN | 0.185 ETH | 0.00165524 | ||||
Mint | 19737655 | 249 days ago | IN | 0.185 ETH | 0.0009805 | ||||
Mint | 19723072 | 251 days ago | IN | 0.185 ETH | 0.00199267 | ||||
Mint | 19721153 | 252 days ago | IN | 0.185 ETH | 0.00195701 | ||||
Mint | 19718922 | 252 days ago | IN | 0.185 ETH | 0.0039799 | ||||
Mint | 19718854 | 252 days ago | IN | 0.185 ETH | 0.00386116 | ||||
Mint | 19718192 | 252 days ago | IN | 0.185 ETH | 0.00203788 | ||||
Mint | 19681857 | 257 days ago | IN | 0.185 ETH | 0.00299011 | ||||
Mint | 19681465 | 257 days ago | IN | 0.185 ETH | 0.00206442 | ||||
Mint | 19677370 | 258 days ago | IN | 0.185 ETH | 0.00210813 | ||||
Mint | 19676852 | 258 days ago | IN | 0.185 ETH | 0.0034784 | ||||
Mint | 19676753 | 258 days ago | IN | 0.555 ETH | 0.00428937 | ||||
Mint | 19676322 | 258 days ago | IN | 0.185 ETH | 0.0056813 | ||||
Mint | 19675951 | 258 days ago | IN | 0.185 ETH | 0.00654381 | ||||
Mint | 19675183 | 258 days ago | IN | 0.185 ETH | 0.01017349 | ||||
Mint | 19675073 | 258 days ago | IN | 0.185 ETH | 0.01168934 | ||||
Mint | 19675003 | 258 days ago | IN | 0.185 ETH | 0.01076738 | ||||
Mint | 19674824 | 258 days ago | IN | 0.185 ETH | 0.00368298 | ||||
Mint | 19674720 | 258 days ago | IN | 0.185 ETH | 0.00280076 | ||||
Mint | 19674022 | 258 days ago | IN | 0.185 ETH | 0.00256776 | ||||
Mint | 19673815 | 258 days ago | IN | 0.185 ETH | 0.00228901 | ||||
Mint | 19673664 | 258 days ago | IN | 0.185 ETH | 0.00300607 | ||||
Mint | 19673635 | 258 days ago | IN | 0.185 ETH | 0.00195014 | ||||
Mint | 19673494 | 258 days ago | IN | 0.185 ETH | 0.00252991 | ||||
Mint | 19673239 | 258 days ago | IN | 0.185 ETH | 0.00254802 |
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
19669566 | 259 days ago | 6.095 ETH |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
MaisonMargielaVaultManager
Compiler Version
v0.8.23+commit.f704f362
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// Vault Manager contract for Maison Margiela. // Used to transfer MM NFTs from the vault to the recipient and relay data to FE. // A 'dummy' NFT must be minted in order to integrate with Crossmint payments. // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "lib/openzeppelin-contracts/contracts/access/Ownable.sol"; import "lib/openzeppelin-contracts/contracts/security/ReentrancyGuard.sol"; import "lib/openzeppelin-contracts/contracts/security/Pausable.sol"; import "lib/openzeppelin-contracts/contracts/utils/Strings.sol"; import "lib/openzeppelin-contracts/contracts/token/common/ERC2981.sol"; import "../../lib/token/ERC721A.sol"; import "../../lib/token/metadata/TFMetadata.sol"; import "../../lib/interfaces/AuraInterface.sol"; /// @title MaisonMargielaVaultManager /// @author The Fabricant ([email protected], [email protected]) /// @notice MaisonMargielaVaultManager contract MaisonMargielaVaultManager is Ownable, Pausable, ERC721A, ERC2981, ReentrancyGuard, TFMetadata { using Strings for uint32; /*////////////////////////////////////////////////////////////// EVENTS //////////////////////////////////////////////////////////////*/ /// @notice Event emitted when the access list is updated /// @param addresses Array of addresses to update /// @param allowed Array of booleans indicating if the address is allowed to mint event AccessListUpdated(address[] addresses, bool[] allowed); /// @notice Event emitted when the base URI is updated /// @param baseURI New base URI event BaseURIUpdated(string baseURI); /// @notice Event emitted when the default royalty receiver and fee are updated /// @param receiver Address to receive royalties /// @param feeNumerator Numerator of the royalty fee event DefaultRoyaltyUpdated(address receiver, uint96 feeNumerator); /// @notice Event emitted when the sale is opened or closed /// @param isOpen Boolean indicating if the sale is open or closed event SaleIsOpenUpdated(bool isOpen); /// @notice Event emitted when the dev minting phase is opened or closed /// @param isOpen Boolean indicating if the dev minting phase is open or closed event DevMintIsOpenUpdated(bool isOpen); /// @notice Event emitted when a payment is withdrawn /// @param receiver Address to receive mint royalties /// @param amount Amount withdrawn event PaymentWithdrawn(address receiver, uint256 amount); /// @notice Event emitted when the price of a variant is updated /// @param variantId Variant ID of the variant to set the price for /// @param price Price to set for the variant event VariantPriceUpdated(uint32 indexed variantId, uint256 price); /// @notice Event emitted when an NFT is minted /// @param tokenId Token ID of the NFT minted /// @param variantId Variant ID of the NFT minted /// @param receiver Address that received the NFT event NftMinted(uint256 indexed tokenId, uint32 indexed variantId, address indexed receiver); /*////////////////////////////////////////////////////////////// DATA STRUCTURES //////////////////////////////////////////////////////////////*/ /// @notice Used by contract to keep track of sale struct SaleConfig { bool isOpen; // Minting is open/closed bool devMintIsOpen; // Dev minting is open/closed uint16 maxBatchSize; // Max number of tokens that can be minted in a single transaction } /// @notice Used to get Sale data off-chain struct SaleData { bool isOpen; // Minting is open/closed uint16 maxBatchSize; // max number of nfts that can be minted in a single batch uint32 totalSupply; // total number sold uint32[] allowedVariants; // Array of variant IDs that are allowed to be minted uint16[] unitsSold; // Number sold of each variant uint256[] variantPrices; // Prices of each variant } /// @notice Used by contract to get variant data struct VariantData { bool isSet; // Indicates if variantData is set for this position in the _variantData mapping uint32 variantId; // id of the variant uint16 unitsSold; // number of nfts minted for this variant uint256 maxSupply; // max number of nfts that can be minted for this variant uint256 price; // price of the variant in wei string variantName; // name of the variant string description; // desc of the variant } /*////////////////////////////////////////////////////////////// STATE VARIABLES //////////////////////////////////////////////////////////////*/ /// @notice Configuration settings for the sale SaleConfig public saleConfig; /// @notice Used internally to track settings for each variant and check if a variant can be minted /// @dev Maps variant IDs to their respective VariantData mapping(uint32 => VariantData) internal _variantData; /// @notice Access list for addresses allowed to mint in dev minting phase /// @dev Used exclusively for dev minting, mapping an address to a bool indicating allowed access mapping(address => bool) public accessList; /// @notice Address designated to receive minting royalties /// @dev Public address that is set to receive royalties from minting address public mintRoyaltyReceiver; AuraInterface public auraContract; /// @notice This is the address where all the MM NFTs were minted to address public mmVaultAddress; /// @notice Used during minting to determine where the variant2 tokenIds start in the Aura contract uint256 public immutable VARIANT_1_MAX_SUPPLY; /*////////////////////////////////////////////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////*/ /// @notice Constructor for MaisonMargielaVaultManager /// @param _baseURIString Base URI for token metadata /// @param _royaltyBasisPoints Royalty basis points for minting constructor( string memory _baseURIString, uint96 _royaltyBasisPoints, address _auraContractAddress, address _mmVaultAddress ) ERC721A("MintToken", "MT") { // Set VariantData // Variant 1 VariantData memory v1 = VariantData({ isSet: true, price: 2.37 ether, variantId: 1, unitsSold: 0, maxSupply: 15, variantName: "Tier 1", description: "T1 D" }); _variantData[1] = v1; // Variant 2 VariantData memory v2 = VariantData({ isSet: true, price: 0.18 ether, variantId: 2, unitsSold: 0, maxSupply: 1500, variantName: "Tier 2", description: "T2 D" }); _variantData[2] = v2; // Set SaleConfig SaleConfig memory saleConf = SaleConfig({isOpen: false, devMintIsOpen: false, maxBatchSize: 5}); saleConfig = saleConf; // Set marketplace royalty _setDefaultRoyalty(0xf5f916a3E4C449Ac8Ae39fDAEF7ac3D169faa87A, uint96(_royaltyBasisPoints)); // Set mint royalty receiver mintRoyaltyReceiver = 0x14A497f025EE0cF56de15409d8Aec885cC220839; // Set collection name and baseURI _setCollectionName("MintToken"); setBaseURI(_baseURIString); // Set Aura contract auraContract = AuraInterface(_auraContractAddress); mmVaultAddress = _mmVaultAddress; // Set variant 1 max supply constant VARIANT_1_MAX_SUPPLY = _variantData[1].maxSupply; } /*////////////////////////////////////////////////////////////// INTERNAL FUNCTIONS //////////////////////////////////////////////////////////////*/ /// @notice Internal function that returns the baseURI function _baseURI() internal view virtual override returns (string memory) { return _baseTokenURI; } // @notice Internal override function that defines the starting tokenId function _startTokenId() internal pure override returns (uint256) { return 1; } /*////////////////////////////////////////////////////////////// EXTERNAL/PUBLIC STATE-CHANGING FUNCTIONS //////////////////////////////////////////////////////////////*/ /// @notice External function to mint tokens /// @param _to Address to mint tokens to /// @param _quantity Number of tokens to mint /// @param _variantId Variant ID of the token to mint /// @dev Users can only mint if the sale is open, the batchSize (quantity) is less than 5 but not 0, and the variantId is between 1 and 7. They must also send the correct payment amount. function mint(address _to, uint256 _quantity, uint32 _variantId) external payable nonReentrant whenNotPaused { SaleConfig storage saleC = saleConfig; VariantData storage variant = _variantData[_variantId]; require(_to != address(0), "MaisonMargielaVaultManager::mint:Cannot mint to 0 address"); require(saleC.isOpen, "MaisonMargielaVaultManager::mint:Mint closed"); require( _quantity <= saleC.maxBatchSize && _quantity != 0, "MaisonMargielaVaultManager::mint:Unsupported quantity" ); require(variant.isSet, "MaisonMargielaVaultManager::mint:Variant ID not set"); require( msg.value >= _quantity * variant.price, ("MaisonMargielaVaultManager::mint:Ether value sent is incorrect") ); require( variant.unitsSold + _quantity <= variant.maxSupply, "MaisonMargielaVaultManager::mint:Max supply reached" ); // keeps track of the MM NFT to transfer from the aura contract uint256 startingNftToTransfer; // Calculate which NFT to transfer if (_variantId == 1) { // If variantId is 1, then the starting NFT to transfer is the number of units sold + 1 startingNftToTransfer = variant.unitsSold + 1; } else { uint256 variant1MaxSupply = VARIANT_1_MAX_SUPPLY; // If variantId is 2, then the starting NFT to transfer is variant1 maxSupply (15) + 1, then add the number of v2 units sold startingNftToTransfer = variant1MaxSupply + 1 + variant.unitsSold; } for (uint256 j = startingNftToTransfer; j < (_quantity + startingNftToTransfer); j++) { // Transfer MM NFTs from the vault address to the _to address auraContract.safeTransferFrom(mmVaultAddress, _to, j); // Emit NFTMinted event for Aura NFT transfer // This event tracks the Aura NFT tokenId and the associated variantId emit NftMinted(j, _variantId, _to); } // Increment the number of units sold for the variant variant.unitsSold += uint16(_quantity); // Mint the dummy NFT to satisfy Crossmint payment requirements _safeMint(_to, _quantity); } /// @notice External admin function to mint tokens /// @param _to Address to mint tokens to /// @param _quantity Number of tokens to mint /// @param _variantId Variant ID of the token to mint /// @dev Users can only mint if isOpen or devMintIsOpen is true, the batchSize (quantity) is less than 5 but not 0, and the variantId is between 1 and 7. The caller must not send payment function adminMint(address _to, uint256 _quantity, uint32 _variantId) external payable nonReentrant whenNotPaused onlyOwner { SaleConfig memory saleC = saleConfig; VariantData storage variant = _variantData[_variantId]; require(_to != address(0), "MaisonMargielaVaultManager::adminMint:Cannot mint to 0 address"); require(saleC.isOpen || saleC.devMintIsOpen, "MaisonMargielaVaultManager::adminMint:Mint closed"); require( _quantity <= saleC.maxBatchSize && _quantity != 0, "MaisonMargielaVaultManager::adminMint:Unsupported quantity" ); require(variant.isSet, "MaisonMargielaVaultManager::adminMint:Variant ID not set"); require(msg.value == 0, ("MaisonMargielaVaultManager::adminMint:Cannot accept payment")); require( variant.unitsSold + _quantity <= variant.maxSupply, "MaisonMargielaVaultManager::adminMint:Max supply reached" ); // keeps track of the MM NFT to transfer from the aura contract uint256 startingNftToTransfer; // Calculate which NFT to transfer if (_variantId == 1) { // If variantId is 1, then the starting NFT to transfer is the number of units sold + 1 startingNftToTransfer = variant.unitsSold + 1; } else { uint256 variant1MaxSupply = VARIANT_1_MAX_SUPPLY; // If variantId is 2, then the starting NFT to transfer is variant1 maxSupply (15) + 1, then add the number of v2 units sold startingNftToTransfer = variant1MaxSupply + 1 + variant.unitsSold; } for (uint256 j = startingNftToTransfer; j < (_quantity + startingNftToTransfer); j++) { // Transfer MM NFTs from the admin address to the _to address auraContract.safeTransferFrom(mmVaultAddress, _to, j); emit NftMinted(j, _variantId, _to); } variant.unitsSold += uint16(_quantity); _safeMint(_to, _quantity); } /// @notice External function to mint tokens using the access list. Only address on the access list can mint /// @param _to Address to mint tokens to /// @param _quantity Number of tokens to mint /// @param _variantId Variant ID of the token to mint /// @dev Users can only mint if the dev mint sale is open, the batchSize (quantity) is less than 5 but not 0, and the variantId is between 1 and 7. Used for treasury minting, so there is no associated payment fee. function accessListMint(address _to, uint256 _quantity, uint32 _variantId) external payable nonReentrant whenNotPaused { require(accessList[msg.sender], "MaisonMargielaVaultManager::accessListMint:Sender not on access list"); SaleConfig memory saleC = saleConfig; VariantData storage variant = _variantData[_variantId]; require(_to != address(0), "MaisonMargielaVaultManager::accessListMint:Cannot mint to 0 address"); require(saleC.devMintIsOpen, "MaisonMargielaVaultManager::accessListMint:Dev mint closed"); require( _quantity <= saleC.maxBatchSize && _quantity != 0, "MaisonMargielaVaultManager::accessListMint:Unsupported quantity" ); require(variant.isSet, "MaisonMargielaVaultManager::accessListMint:Variant ID not set"); require( variant.unitsSold + _quantity <= variant.maxSupply, "MaisonMargielaVaultManager::mint:Max supply reached" ); // keeps track of the MM NFT to transfer from the aura contract uint256 startingNftToTransfer; // Calculate which NFT to transfer if (_variantId == 1) { // If variantId is 1, then the starting NFT to transfer is the number of units sold + 1 startingNftToTransfer = variant.unitsSold + 1; } else { uint256 variant1MaxSupply = VARIANT_1_MAX_SUPPLY; // If variantId is 2, then the starting NFT to transfer is variant1 maxSupply (15) + 1, then add the number of v2 units sold startingNftToTransfer = variant1MaxSupply + 1 + variant.unitsSold; } for (uint256 j = startingNftToTransfer; j < (_quantity + startingNftToTransfer); j++) { // Transfer MM NFTs from the admin address to the _to address auraContract.safeTransferFrom(mmVaultAddress, _to, j); emit NftMinted(j, _variantId, _to); } variant.unitsSold += uint16(_quantity); _safeMint(_to, _quantity); } /// @notice Sets the maximum supply for a specific variant. /// @dev Can only be called by the contract owner. /// @param _variantId The ID of the variant for which to set the maximum supply. /// @param _maxSupply The new maximum supply to set for the specified variant. function setVariantMaxSupply(uint32 _variantId, uint16 _maxSupply) external onlyOwner { _variantData[_variantId].maxSupply = _maxSupply; } /// @notice Updates the address of the Aura contract. /// @dev Sets the `_auraContractAddress` as the new address for the Aura contract interface /// @param _auraContractAddress The new address of the Aura contract. function setAuraContractAddress(address _auraContractAddress) external onlyOwner { auraContract = AuraInterface(_auraContractAddress); } /// @notice Updates the address of the Market Making (MM) Vault. /// @dev Sets the `_mmVaultAddress` as the new address for the Market Making Vault. /// @param _mmVaultAddress The new address for the Market Making Vault. function setMMVaultAddress(address _mmVaultAddress) external onlyOwner { mmVaultAddress = _mmVaultAddress; } /// @notice External function to set the default royalty receiver and fee /// @param _receiver Address to receive royalties /// @param _feeNumerator Numerator of the royalty fee function setDefaultRoyalty(address _receiver, uint96 _feeNumerator) external onlyOwner whenNotPaused { _setDefaultRoyalty(_receiver, _feeNumerator); emit DefaultRoyaltyUpdated(_receiver, _feeNumerator); } /// @notice External function to set the mint royalty receiver /// @param _receiver Address to receive royalties function setMintRoyaltyReceiver(address _receiver) external onlyOwner whenNotPaused { require( _receiver != address(0), "MaisonMargielaVaultManager::setMintRoyaltyReceiver:Receiver cannot be 0 address" ); mintRoyaltyReceiver = _receiver; } /// @notice External function to set the sale to open or closed /// @param _isOpen Boolean indicating if the sale is open or closed function setIsOpen(bool _isOpen) external onlyOwner whenNotPaused { saleConfig.isOpen = _isOpen; emit SaleIsOpenUpdated(_isOpen); } /// @notice External function to set the dev minting to open or closed /// @param _isOpen Boolean indicating if the dev minting is open or closed function setDevMintIsOpen(bool _isOpen) external onlyOwner whenNotPaused { saleConfig.devMintIsOpen = _isOpen; emit DevMintIsOpenUpdated(_isOpen); } /// @notice External function to set the price of a single variant /// @param _variantId Variant ID of the variant to set the price for /// @param _price Price to set for the variant function setVariantPrice(uint32 _variantId, uint256 _price) external onlyOwner whenNotPaused { require(_variantData[_variantId].isSet, "MaisonMargielaVaultManager::setVariantPrice:Variant ID not set"); _variantData[_variantId].price = _price; emit VariantPriceUpdated(_variantId, _price); } /// @notice External function to update the access list /// @param _addresses Array of addresses to update /// @param _allowed Array of booleans indicating if the address is allowed to mint /// @dev Access list for dev/treasury minting should be small to keep gas costs low when calling. 5 addresses or less is ideal function updateAccessList(address[] memory _addresses, bool[] memory _allowed) external onlyOwner whenNotPaused { require( _addresses.length == _allowed.length, "MaisonMargielaVaultManager::updateAccessList:Array lengths do not match" ); for (uint256 i = 0; i < _addresses.length; i++) { accessList[_addresses[i]] = _allowed[i]; } emit AccessListUpdated(_addresses, _allowed); } /// @notice External function to update the base URI /// @param _uri New base URI function setBaseURI(string memory _uri) public onlyOwner whenNotPaused { _baseTokenURI = _uri; emit BaseURIUpdated(_uri); } /// @notice External function to pause the contract function pause() external onlyOwner { _pause(); } /// @notice External function to unpause the contract function unpause() external onlyOwner { _unpause(); } /// @notice External function to withdraw payments function withdrawPayment() external onlyOwner nonReentrant whenNotPaused { uint256 contractBalance = address(this).balance; (bool success,) = mintRoyaltyReceiver.call{value: address(this).balance}(""); require(success, "MaisonMargielaVaultManager::withdrawPayment:Transfer failed."); emit PaymentWithdrawn(mintRoyaltyReceiver, contractBalance); } /*////////////////////////////////////////////////////////////// EXTERNAL/PUBLIC VIEW FUNCTIONS //////////////////////////////////////////////////////////////*/ /// @notice External function to get the owner of a MM NFT, NOT the dummy NFT function ownerOf(uint256 tokenId) public view override returns (address) { return auraContract.ownerOf(tokenId); } /// @notice External function to get the base URI function baseURI() external view returns (string memory) { return _baseURI(); } /// @notice External function to get the current saleData /// @dev Returns a SaleData struct /// @dev Number of variants is 7 function saleData() external view returns (SaleData memory) { // Calculate variantData mapping length // i = 1: variantIds always start from 1 // .isSet indicates if variantData is set for that variantId. Break if it isn't. uint32 variantDataLength; for (uint8 i = 1; i < type(uint8).max; i++) { if (_variantData[i].isSet) { variantDataLength++; } else { break; } } SaleData memory _saleData; _saleData.isOpen = saleConfig.isOpen; _saleData.maxBatchSize = maxBatchSize(); _saleData.totalSupply = uint32(totalSupply()); // Set array lengths for _saleData _saleData.allowedVariants = new uint32[](variantDataLength); _saleData.variantPrices = new uint256[](variantDataLength); _saleData.unitsSold = new uint16[](variantDataLength); for (uint8 i = 0; i < variantDataLength; i++) { // variantData starts at index 1 as the variantId matches the key in the mapping uint8 variantKey = i + 1; VariantData memory variant = _variantData[variantKey]; if (!variant.isSet) break; _saleData.allowedVariants[i] = variant.variantId; _saleData.variantPrices[i] = variant.price; _saleData.unitsSold[i] = variant.unitsSold; } return _saleData; } /// @notice External function to get the tokenURI for a given variantId /// @param _tokenId Token ID to get the uri for /// @dev returns an empty string as the dummy NFTs are not used! /// @dev use the tokenURI() on aura contract to get aura NFT URI! function tokenURI(uint256 _tokenId) public view override returns (string memory) { // A dummy NFT has to have been minted to get the MM NFT tokenURI require(_exists(_tokenId), "MaisonMargielaVaultManager::tokeURI:ERC721Metadata:URI query for nonexistent token"); return ""; } /// @notice External function to get the number of tokens minted for a given address /// @param _owner Address to get the number of tokens minted for function numberMinted(address _owner) public view returns (uint256) { return _numberMinted(_owner); } /// @notice External function to get the maxBatchSize function maxBatchSize() public view returns (uint16) { return saleConfig.maxBatchSize; } /// @notice External function to get the variantData for a given variantId /// @param _variantId Variant ID to get the variantData for function variantData(uint32 _variantId) public view returns (VariantData memory) { require(_variantData[_variantId].isSet, "MaisonMargielaVaultManager::variantData:Variant ID not set"); return _variantData[_variantId]; } /// @notice External function to indicate which interfaces are supported /// @param interfaceId Interface ID to check if supported function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, ERC2981) returns (bool) { // Supports the following `interfaceId`s: // - IERC165: 0x01ffc9a7 // - IERC721: 0x80ac58cd // - IERC721Metadata: 0x5b5e139f // - IERC2981: 0x2a55205a return ERC721A.supportsInterface(interfaceId) || ERC2981.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == _ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { require(paused(), "Pausable: not paused"); } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; import "./math/SignedMath.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toString(int256 value) internal pure returns (string memory) { return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value)))); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return keccak256(bytes(a)) == keccak256(bytes(b)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/common/ERC2981.sol) pragma solidity ^0.8.0; import "../../interfaces/IERC2981.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information. * * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first. * * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the * fee is specified in basis points by default. * * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. * * _Available since v4.5._ */ abstract contract ERC2981 is IERC2981, ERC165 { struct RoyaltyInfo { address receiver; uint96 royaltyFraction; } RoyaltyInfo private _defaultRoyaltyInfo; mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } /** * @inheritdoc IERC2981 */ function royaltyInfo(uint256 tokenId, uint256 salePrice) public view virtual override returns (address, uint256) { RoyaltyInfo memory royalty = _tokenRoyaltyInfo[tokenId]; if (royalty.receiver == address(0)) { royalty = _defaultRoyaltyInfo; } uint256 royaltyAmount = (salePrice * royalty.royaltyFraction) / _feeDenominator(); return (royalty.receiver, royaltyAmount); } /** * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an * override. */ function _feeDenominator() internal pure virtual returns (uint96) { return 10000; } /** * @dev Sets the royalty information that all ids in this contract will default to. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: invalid receiver"); _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Removes default royalty information. */ function _deleteDefaultRoyalty() internal virtual { delete _defaultRoyaltyInfo; } /** * @dev Sets the royalty information for a specific token id, overriding the global default. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: Invalid parameters"); _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Resets royalty information for the token id back to the global default. */ function _resetTokenRoyalty(uint256 tokenId) internal virtual { delete _tokenRoyaltyInfo[tokenId]; } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import "../interfaces/IERC721A.sol"; /** * @dev Interface of ERC721 token receiver. */ interface ERC721A__IERC721Receiver { function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4); } /** * @title ERC721A * * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721) * Non-Fungible Token Standard, including the Metadata extension. * Optimized for lower gas during batch mints. * * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...) * starting from `_startTokenId()`. * * Assumptions: * * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is IERC721A { // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364). struct TokenApprovalRef { address value; } // ============================================================= // CONSTANTS // ============================================================= // Mask of an entry in packed address data. uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant _BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant _BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant _BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant _BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant _BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant _BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225; // The bit position of `extraData` in packed ownership. uint256 private constant _BITPOS_EXTRA_DATA = 232; // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`. uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1; // The mask of the lower 160 bits for addresses. uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1; // The maximum `quantity` that can be minted with {_mintERC2309}. // This limit is to prevent overflows on the address data entries. // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309} // is required to cause an overflow, which is unrealistic. uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000; // The `Transfer` event signature is given by: // `keccak256(bytes("Transfer(address,address,uint256)"))`. bytes32 private constant _TRANSFER_EVENT_SIGNATURE = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; // ============================================================= // STORAGE // ============================================================= // The next token ID to be minted. uint256 private _currentIndex; // The number of tokens burned. uint256 private _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. // See {_packedOwnershipOf} implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` // - [232..255] `extraData` mapping(uint256 => uint256) private _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) private _packedAddressData; // Mapping from token ID to approved address. mapping(uint256 => TokenApprovalRef) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // ============================================================= // CONSTRUCTOR // ============================================================= constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } // ============================================================= // TOKEN COUNTING OPERATIONS // ============================================================= /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view virtual returns (uint256) { return _currentIndex; } /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() public view virtual override returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than `_currentIndex - _startTokenId()` times. unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view virtual returns (uint256) { // Counter underflow is impossible as `_currentIndex` does not decrement, // and it is initialized to `_startTokenId()`. unchecked { return _currentIndex - _startTokenId(); } } /** * @dev Returns the total number of tokens burned. */ function _totalBurned() internal view virtual returns (uint256) { return _burnCounter; } // ============================================================= // ADDRESS DATA OPERATIONS // ============================================================= /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) public view virtual override returns (uint256) { if (owner == address(0)) _revert(BalanceQueryForZeroAddress.selector); return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return uint64(_packedAddressData[owner] >> _BITPOS_AUX); } /** * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal virtual { uint256 packed = _packedAddressData[owner]; uint256 auxCasted; // Cast `aux` with assembly to avoid redundant masking. assembly { auxCasted := aux } packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX); _packedAddressData[owner] = packed; } // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { // The interface IDs are constants representing the first 4 bytes // of the XOR of all function selectors in the interface. // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165) // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`) return interfaceId == 0x01ffc9a7 // ERC165 interface ID for ERC165. || interfaceId == 0x80ac58cd // ERC165 interface ID for ERC721. || interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata. } // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the token collection symbol. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) _revert(URIQueryForNonexistentToken.selector); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, it can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } // ============================================================= // OWNERSHIPS OPERATIONS // ============================================================= /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { return address(uint160(_packedOwnershipOf(tokenId))); } /** * @dev Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around over time. */ function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnershipOf(tokenId)); } /** * @dev Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnerships[index]); } /** * @dev Returns whether the ownership slot at `index` is initialized. * An uninitialized slot does not necessarily mean that the slot has no owner. */ function _ownershipIsInitialized(uint256 index) internal view virtual returns (bool) { return _packedOwnerships[index] != 0; } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal virtual { if (_packedOwnerships[index] == 0) { _packedOwnerships[index] = _packedOwnershipOf(index); } } /** * Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf(uint256 tokenId) private view returns (uint256 packed) { if (_startTokenId() <= tokenId) { packed = _packedOwnerships[tokenId]; // If the data at the starting slot does not exist, start the scan. if (packed == 0) { if (tokenId >= _currentIndex) _revert(OwnerQueryForNonexistentToken.selector); // Invariant: // There will always be an initialized ownership slot // (i.e. `ownership.addr != address(0) && ownership.burned == false`) // before an unintialized ownership slot // (i.e. `ownership.addr == address(0) && ownership.burned == false`) // Hence, `tokenId` will not underflow. // // We can directly compare the packed value. // If the address is zero, packed will be zero. for (;;) { unchecked { packed = _packedOwnerships[--tokenId]; } if (packed == 0) continue; if (packed & _BITMASK_BURNED == 0) return packed; // Otherwise, the token is burned, and we must revert. // This handles the case of batch burned tokens, where only the burned bit // of the starting slot is set, and remaining slots are left uninitialized. _revert(OwnerQueryForNonexistentToken.selector); } } // Otherwise, the data exists and we can skip the scan. // This is possible because we have already achieved the target condition. // This saves 2143 gas on transfers of initialized tokens. // If the token is not burned, return `packed`. Otherwise, revert. if (packed & _BITMASK_BURNED == 0) return packed; } _revert(OwnerQueryForNonexistentToken.selector); } /** * @dev Returns the unpacked `TokenOwnership` struct from `packed`. */ function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) { ownership.addr = address(uint160(packed)); ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP); ownership.burned = packed & _BITMASK_BURNED != 0; ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA); } /** * @dev Packs ownership data into a single uint256. */ function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`. result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags)) } } /** * @dev Returns the `nextInitialized` flag set if `quantity` equals 1. */ function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) { // For branchless setting of the `nextInitialized` flag. assembly { // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`. result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1)) } } // ============================================================= // APPROVAL OPERATIONS // ============================================================= /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. See {ERC721A-_approve}. * * Requirements: * * - The caller must own the token or be an approved operator. */ function approve(address to, uint256 tokenId) public payable virtual override { _approve(to, tokenId, true); } /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { if (!_exists(tokenId)) _revert(ApprovalQueryForNonexistentToken.selector); return _tokenApprovals[tokenId].value; } /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool approved) public virtual override { _operatorApprovals[_msgSenderERC721A()][operator] = approved; emit ApprovalForAll(_msgSenderERC721A(), operator, approved); } /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted. See {_mint}. */ function _exists(uint256 tokenId) internal view virtual returns (bool result) { if (_startTokenId() <= tokenId) { if (tokenId < _currentIndex) { uint256 packed; while ((packed = _packedOwnerships[tokenId]) == 0) --tokenId; result = packed & _BITMASK_BURNED == 0; } } } /** * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`. */ function _isSenderApprovedOrOwner(address approvedAddress, address owner, address msgSender) private pure returns (bool result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean. msgSender := and(msgSender, _BITMASK_ADDRESS) // `msgSender == owner || msgSender == approvedAddress`. result := or(eq(msgSender, owner), eq(msgSender, approvedAddress)) } } /** * @dev Returns the storage slot and value for the approved address of `tokenId`. */ function _getApprovedSlotAndAddress(uint256 tokenId) private view returns (uint256 approvedAddressSlot, address approvedAddress) { TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId]; // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`. assembly { approvedAddressSlot := tokenApproval.slot approvedAddress := sload(approvedAddressSlot) } } // ============================================================= // TRANSFER OPERATIONS // ============================================================= /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 tokenId) public payable virtual override { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); // Mask `from` to the lower 160 bits, in case the upper bits somehow aren't clean. from = address(uint160(uint256(uint160(from)) & _BITMASK_ADDRESS)); if (address(uint160(prevOwnershipPacked)) != from) _revert(TransferFromIncorrectOwner.selector); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) { if (!isApprovedForAll(from, _msgSenderERC721A())) _revert(TransferCallerNotOwnerNorApproved.selector); } _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // We can directly increment and decrement the balances. --_packedAddressData[from]; // Updates: `balance -= 1`. ++_packedAddressData[to]; // Updates: `balance += 1`. // Updates: // - `address` to the next owner. // - `startTimestamp` to the timestamp of transfering. // - `burned` to `false`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData(to, _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked)); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. uint256 toMasked = uint256(uint160(to)) & _BITMASK_ADDRESS; assembly { // Emit the `Transfer` event. log4( 0, // Start of data (0, since no data). 0, // End of data (0, since no data). _TRANSFER_EVENT_SIGNATURE, // Signature. from, // `from`. toMasked, // `to`. tokenId // `tokenId`. ) } if (toMasked == 0) _revert(TransferToZeroAddress.selector); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom(address from, address to, uint256 tokenId) public payable virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public payable virtual override { transferFrom(from, to, tokenId); if (to.code.length != 0) { if (!_checkContractOnERC721Received(from, to, tokenId, _data)) { _revert(TransferToNonERC721ReceiverImplementer.selector); } } } /** * @dev Hook that is called before a set of serially-ordered token IDs * are about to be transferred. This includes minting. * And also called before burning one token. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers(address from, address to, uint256 startTokenId, uint256 quantity) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token IDs * have been transferred. This includes minting. * And also called after one token has been burned. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers(address from, address to, uint256 startTokenId, uint256 quantity) internal virtual {} /** * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * `from` - Previous owner of the given token ID. * `to` - Target address that will receive the token. * `tokenId` - Token ID to be transferred. * `_data` - Optional data to send along with the call. * * Returns whether the call correctly returned the expected magic value. */ function _checkContractOnERC721Received(address from, address to, uint256 tokenId, bytes memory _data) private returns (bool) { try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns ( bytes4 retval ) { return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { _revert(TransferToNonERC721ReceiverImplementer.selector); } assembly { revert(add(32, reason), mload(reason)) } } } // ============================================================= // MINT OPERATIONS // ============================================================= /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event for each mint. */ function _mint(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (quantity == 0) _revert(MintZeroQuantity.selector); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // `balance` and `numberMinted` have a maximum limit of 2**64. // `tokenId` has a maximum limit of 2**256. unchecked { // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData(to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)); // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. uint256 toMasked = uint256(uint160(to)) & _BITMASK_ADDRESS; if (toMasked == 0) _revert(MintToZeroAddress.selector); uint256 end = startTokenId + quantity; uint256 tokenId = startTokenId; do { assembly { // Emit the `Transfer` event. log4( 0, // Start of data (0, since no data). 0, // End of data (0, since no data). _TRANSFER_EVENT_SIGNATURE, // Signature. 0, // `address(0)`. toMasked, // `to`. tokenId // `tokenId`. ) } // The `!=` check ensures that large values of `quantity` // that overflows uint256 will make the loop run out of gas. } while (++tokenId != end); _currentIndex = end; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * This function is intended for efficient minting only during contract creation. * * It emits only one {ConsecutiveTransfer} as defined in * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309), * instead of a sequence of {Transfer} event(s). * * Calling this function outside of contract creation WILL make your contract * non-compliant with the ERC721 standard. * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309 * {ConsecutiveTransfer} event is only permissible during contract creation. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {ConsecutiveTransfer} event. */ function _mintERC2309(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (to == address(0)) _revert(MintToZeroAddress.selector); if (quantity == 0) _revert(MintZeroQuantity.selector); if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) _revert(MintERC2309QuantityExceedsLimit.selector); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are unrealistic due to the above check for `quantity` to be below the limit. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData(to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)); emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to); _currentIndex = startTokenId + quantity; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * See {_mint}. * * Emits a {Transfer} event for each mint. */ function _safeMint(address to, uint256 quantity, bytes memory _data) internal virtual { _mint(to, quantity); unchecked { if (to.code.length != 0) { uint256 end = _currentIndex; uint256 index = end - quantity; do { if (!_checkContractOnERC721Received(address(0), to, index++, _data)) { _revert(TransferToNonERC721ReceiverImplementer.selector); } } while (index < end); // Reentrancy protection. if (_currentIndex != end) _revert(bytes4(0)); } } } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal virtual { _safeMint(to, quantity, ""); } // ============================================================= // APPROVAL OPERATIONS // ============================================================= /** * @dev Equivalent to `_approve(to, tokenId, false)`. */ function _approve(address to, uint256 tokenId) internal virtual { _approve(to, tokenId, false); } /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - `tokenId` must exist. * * Emits an {Approval} event. */ function _approve(address to, uint256 tokenId, bool approvalCheck) internal virtual { address owner = ownerOf(tokenId); if (approvalCheck && _msgSenderERC721A() != owner) { if (!isApprovedForAll(owner, _msgSenderERC721A())) { _revert(ApprovalCallerNotOwnerNorApproved.selector); } } _tokenApprovals[tokenId].value = to; emit Approval(owner, to, tokenId); } // ============================================================= // BURN OPERATIONS // ============================================================= /** * @dev Equivalent to `_burn(tokenId, false)`. */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); address from = address(uint160(prevOwnershipPacked)); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); if (approvalCheck) { // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) { if (!isApprovedForAll(from, _msgSenderERC721A())) _revert(TransferCallerNotOwnerNorApproved.selector); } } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // Updates: // - `balance -= 1`. // - `numberBurned += 1`. // // We can directly decrement the balance, and increment the number burned. // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`. _packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1; // Updates: // - `address` to the last owner. // - `startTimestamp` to the timestamp of burning. // - `burned` to `true`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( from, (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } // ============================================================= // EXTRA DATA OPERATIONS // ============================================================= /** * @dev Directly sets the extra data for the ownership data `index`. */ function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual { uint256 packed = _packedOwnerships[index]; if (packed == 0) _revert(OwnershipNotInitializedForExtraData.selector); uint256 extraDataCasted; // Cast `extraData` with assembly to avoid redundant masking. assembly { extraDataCasted := extraData } packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA); _packedOwnerships[index] = packed; } /** * @dev Called during each token transfer to set the 24bit `extraData` field. * Intended to be overridden by the cosumer contract. * * `previousExtraData` - the value of `extraData` before transfer. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _extraData(address from, address to, uint24 previousExtraData) internal view virtual returns (uint24) {} /** * @dev Returns the next extra data for the packed ownership data. * The returned result is shifted into position. */ function _nextExtraData(address from, address to, uint256 prevOwnershipPacked) private view returns (uint256) { uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA); return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA; } // ============================================================= // OTHER OPERATIONS // ============================================================= /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { return msg.sender; } /** * @dev Converts a uint256 to its ASCII string decimal representation. */ function _toString(uint256 value) internal pure virtual returns (string memory str) { assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), but // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned. // We will need 1 word for the trailing zeros padding, 1 word for the length, // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0. let m := add(mload(0x40), 0xa0) // Update the free memory pointer to allocate. mstore(0x40, m) // Assign the `str` to the end. str := sub(m, 0x20) // Zeroize the slot after the string. mstore(str, 0) // Cache the end of the memory to calculate the length later. let end := str // We write the string from rightmost digit to leftmost digit. // The following is essentially a do-while loop that also handles the zero case. // prettier-ignore for { let temp := value } 1 {} { str := sub(str, 1) // Write the character to the pointer. // The ASCII index of the '0' character is 48. mstore8(str, add(48, mod(temp, 10))) // Keep dividing `temp` until zero. temp := div(temp, 10) // prettier-ignore if iszero(temp) { break } } let length := sub(end, str) // Move the pointer 32 bytes leftwards to make room for the length. str := sub(str, 0x20) // Store the length. mstore(str, length) } } /** * @dev For more efficient reverts. */ function _revert(bytes4 errorSelector) internal pure { assembly { mstore(0x00, errorSelector) revert(0x00, 0x04) } } }
pragma solidity ^0.8.13; abstract contract TFMetadata { /// @notice Base URI for computing {tokenURI}. string internal _baseTokenURI; /// @notice Name of the collection string internal _collectionName; /// @notice Internal function that sets the collection name for computing {tokenURI}. /// @param _collectionNameString The collection name to set. function _setCollectionName(string memory _collectionNameString) internal { _collectionName = _collectionNameString; } /// @notice Internal function used to create media strings /// @param _variantId The variant id to use in the media string /// @param _fileExtension The file extension to use in the media string function _createMediaString(string memory _variantId, string memory _fileExtension) internal view returns (string memory) { return string.concat(_baseTokenURI, _variantId, _fileExtension); } /// @notice Internal function used to create metadata strings. /// @param _tokenId The token id to use in the metadata string /// @param _variantId The variant id to use in the metadata string /// @param _variantName The variant name to use in the metadata string /// @param _variantDescription The variant description to use in the metadata string function _createMetadataString( string memory _tokenId, string memory _variantId, string memory _variantName, string memory _variantDescription ) internal view returns (string memory) { string memory pngString = _createMediaString(_variantId, ".png"); string memory mp4String = _createMediaString(_variantId, ".mp4"); return string.concat( '{"id":"', _tokenId, '","name":"', _variantName, " #", _tokenId, '","variantId":"', _variantId, '","collection":"', _collectionName, '","description":"', _variantDescription, '","image":"', pngString, '","animation_url":"', mp4String, '", "creator": "The Fabricant', '"}' ); } }
// Interface PoC for Aura contract pragma solidity ^0.8.0; interface AuraInterface{ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); function name() external view returns (string memory); function symbol() external view returns (string memory); function balanceOf(address owner) external view returns (uint256); function owner() external view returns (address); function ownerOf(uint256 tokenId) external view returns (address); function setURI(uint256 _id, string memory _uri) external; function tokenURI(uint256 tokenId) external view returns (string memory); // function mint(address recipient, string memory tokenURIPath, uint256 tokenId) external; function mintBatch(address[] memory _addressArray, string[] memory _tokenURIs, uint256[] memory _ids) external; function transferFrom(address from, address to, uint256 tokenId) external; function safeTransferFrom(address from, address to, uint256 tokenId) external; function setTransferable(bool _transferable) external; function setApprovalForAll(address account, bool _approveForAll) external; function transferOwnership(address newOwner) external; function burn(uint256 tokenId) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1, "Math: mulDiv overflow"); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.0; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo( uint256 tokenId, uint256 salePrice ) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; /** * @dev Interface of ERC721A. */ interface IERC721A { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * The token does not exist. */ error ApprovalQueryForNonexistentToken(); /** * Cannot query the balance for the zero address. */ error BalanceQueryForZeroAddress(); /** * Cannot mint to the zero address. */ error MintToZeroAddress(); /** * The quantity of tokens minted must be more than zero. */ error MintZeroQuantity(); /** * The token does not exist. */ error OwnerQueryForNonexistentToken(); /** * The caller must own the token or be an approved operator. */ error TransferCallerNotOwnerNorApproved(); /** * The token must be owned by `from`. */ error TransferFromIncorrectOwner(); /** * Cannot safely transfer to a contract that does not implement the * ERC721Receiver interface. */ error TransferToNonERC721ReceiverImplementer(); /** * Cannot transfer to the zero address. */ error TransferToZeroAddress(); /** * The token does not exist. */ error URIQueryForNonexistentToken(); /** * The `quantity` minted with ERC2309 exceeds the safety limit. */ error MintERC2309QuantityExceedsLimit(); /** * The `extraData` cannot be set on an unintialized ownership slot. */ error OwnershipNotInitializedForExtraData(); // ============================================================= // STRUCTS // ============================================================= struct TokenOwnership { // The address of the owner. address addr; // Stores the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}. uint24 extraData; } // ============================================================= // TOKEN COUNTERS // ============================================================= /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() external view returns (uint256); // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); // ============================================================= // IERC721 // ============================================================= /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables * (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, * checking first that contract recipients are aware of the ERC721 protocol * to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move * this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external payable; /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom(address from, address to, uint256 tokenId) external payable; /** * @dev Transfers `tokenId` from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} * whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 tokenId) external payable; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external payable; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) external view returns (bool); // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); // ============================================================= // IERC2309 // ============================================================= /** * @dev Emitted when tokens in `fromTokenId` to `toTokenId` * (inclusive) is transferred from `from` to `to`, as defined in the * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard. * * See {_mintERC2309} for more details. */ event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "remappings": [ "ds-test/=lib/forge-std/lib/ds-test/src/", "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/", "forge-std/=lib/forge-std/src/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "openzeppelin/=lib/openzeppelin-contracts/contracts/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "paris", "viaIR": false, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"_baseURIString","type":"string"},{"internalType":"uint96","name":"_royaltyBasisPoints","type":"uint96"},{"internalType":"address","name":"_auraContractAddress","type":"address"},{"internalType":"address","name":"_mmVaultAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"addresses","type":"address[]"},{"indexed":false,"internalType":"bool[]","name":"allowed","type":"bool[]"}],"name":"AccessListUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"baseURI","type":"string"}],"name":"BaseURIUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"DefaultRoyaltyUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"isOpen","type":"bool"}],"name":"DevMintIsOpenUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"uint32","name":"variantId","type":"uint32"},{"indexed":true,"internalType":"address","name":"receiver","type":"address"}],"name":"NftMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"isOpen","type":"bool"}],"name":"SaleIsOpenUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint32","name":"variantId","type":"uint32"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"VariantPriceUpdated","type":"event"},{"inputs":[],"name":"VARIANT_1_MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"accessList","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"uint32","name":"_variantId","type":"uint32"}],"name":"accessListMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"uint32","name":"_variantId","type":"uint32"}],"name":"adminMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"auraContract","outputs":[{"internalType":"contract AuraInterface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxBatchSize","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"uint32","name":"_variantId","type":"uint32"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintRoyaltyReceiver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mmVaultAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"numberMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"saleConfig","outputs":[{"internalType":"bool","name":"isOpen","type":"bool"},{"internalType":"bool","name":"devMintIsOpen","type":"bool"},{"internalType":"uint16","name":"maxBatchSize","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"saleData","outputs":[{"components":[{"internalType":"bool","name":"isOpen","type":"bool"},{"internalType":"uint16","name":"maxBatchSize","type":"uint16"},{"internalType":"uint32","name":"totalSupply","type":"uint32"},{"internalType":"uint32[]","name":"allowedVariants","type":"uint32[]"},{"internalType":"uint16[]","name":"unitsSold","type":"uint16[]"},{"internalType":"uint256[]","name":"variantPrices","type":"uint256[]"}],"internalType":"struct MaisonMargielaVaultManager.SaleData","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_auraContractAddress","type":"address"}],"name":"setAuraContractAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint96","name":"_feeNumerator","type":"uint96"}],"name":"setDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isOpen","type":"bool"}],"name":"setDevMintIsOpen","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isOpen","type":"bool"}],"name":"setIsOpen","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_mmVaultAddress","type":"address"}],"name":"setMMVaultAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"}],"name":"setMintRoyaltyReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_variantId","type":"uint32"},{"internalType":"uint16","name":"_maxSupply","type":"uint16"}],"name":"setVariantMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_variantId","type":"uint32"},{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"setVariantPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_addresses","type":"address[]"},{"internalType":"bool[]","name":"_allowed","type":"bool[]"}],"name":"updateAccessList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_variantId","type":"uint32"}],"name":"variantData","outputs":[{"components":[{"internalType":"bool","name":"isSet","type":"bool"},{"internalType":"uint32","name":"variantId","type":"uint32"},{"internalType":"uint16","name":"unitsSold","type":"uint16"},{"internalType":"uint256","name":"maxSupply","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"string","name":"variantName","type":"string"},{"internalType":"string","name":"description","type":"string"}],"internalType":"struct MaisonMargielaVaultManager.VariantData","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawPayment","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a06040523480156200001157600080fd5b5060405162004550380380620045508339810160408190526200003491620007b6565b6040518060400160405280600981526020016826b4b73a2a37b5b2b760b91b81525060405180604001604052806002815260200161135560f21b8152506200008b62000085620004c760201b60201c565b620004cb565b6000805460ff60a01b191690556003620000a6838262000939565b506004620000b5828262000939565b506001808155600b8190556040805160e08101825282815260208082018481526000838501818152600f606086018181526720e3ee7175ad0000608088019081528851808a018a52600681526554696572203160d01b8189015260a089019081528951808b01909a5260048a5263150c481160e21b8a89015260c08901999099529890935290935283517f169f97de0d9a84d840042b17d3c6b9638b3d6fd9024c9eb0c7a306a17b49f88f80549351945161ffff16650100000000000261ffff60281b1963ffffffff969096166101000264ffffffff00199315159390931664ffffffffff1990951694909417919091179390931691909117825551600080516020620045308339815191525592517f169f97de0d9a84d840042b17d3c6b9638b3d6fd9024c9eb0c7a306a17b49f8915590519093508392507f169f97de0d9a84d840042b17d3c6b9638b3d6fd9024c9eb0c7a306a17b49f892906200021c908262000939565b5060c0820151600482019062000233908262000939565b50506040805160e081018252600181526002602080830182815260008486018181526105dc6060870190815267027f7d0bdb920000608088019081528851808a018a5260068152652a34b2b9101960d11b8188015260a089019081528951808b01909a5260048a5263150c881160e21b8a88015260c089019990995295909252600f90935284517fa74ba3945261e09fde15ba3db55005b205e61eeb4ad811ac0faa2b315bffeead80549351945161ffff16650100000000000261ffff60281b1963ffffffff969096166101000264ffffffff00199315159390931664ffffffffff19909516949094179190911793909316919091178255517fa74ba3945261e09fde15ba3db55005b205e61eeb4ad811ac0faa2b315bffeeae5590517fa74ba3945261e09fde15ba3db55005b205e61eeb4ad811ac0faa2b315bffeeaf5591519092508291907fa74ba3945261e09fde15ba3db55005b205e61eeb4ad811ac0faa2b315bffeeb090620003a8908262000939565b5060c08201516004820190620003bf908262000939565b50506040805160608101825260008082526020820152600591810191909152600e805463ffffffff19166205000017905590506200041273f5f916a3e4c449ac8ae39fdaef7ac3d169faa87a876200051b565b601180546001600160a01b0319167314a497f025ee0cf56de15409d8aec885cc22083917905560408051808201909152600981526826b4b73a2a37b5b2b760b91b6020820152620004639062000620565b6200046e8762000632565b5050601280546001600160a01b039485166001600160a01b03199182161790915560138054939094169216919091179091555050600160005250600f602052600080516020620045308339815191525460805262000a3a565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6127106001600160601b03821611156200058f5760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b60648201526084015b60405180910390fd5b6001600160a01b038216620005e75760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c696420726563656976657200000000000000604482015260640162000586565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600955565b600d6200062e828262000939565b5050565b6200063c62000691565b62000646620006ef565b600c62000654828262000939565b507f6741b2fc379fad678116fe3d4d4b9a1a184ab53ba36b86ad0fa66340b1ab41ad8160405162000686919062000a05565b60405180910390a150565b6000546001600160a01b03163314620006ed5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640162000586565b565b62000703600054600160a01b900460ff1690565b15620006ed5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640162000586565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620007785781810151838201526020016200075e565b50506000910152565b80516001600160601b03811681146200079957600080fd5b919050565b80516001600160a01b03811681146200079957600080fd5b60008060008060808587031215620007cd57600080fd5b84516001600160401b0380821115620007e557600080fd5b818701915087601f830112620007fa57600080fd5b8151818111156200080f576200080f62000745565b604051601f8201601f19908116603f011681019083821181831017156200083a576200083a62000745565b816040528281528a60208487010111156200085457600080fd5b620008678360208301602088016200075b565b80985050505050506200087d6020860162000781565b92506200088d604086016200079e565b91506200089d606086016200079e565b905092959194509250565b600181811c90821680620008bd57607f821691505b602082108103620008de57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111562000934576000816000526020600020601f850160051c810160208610156200090f5750805b601f850160051c820191505b8181101562000930578281556001016200091b565b5050505b505050565b81516001600160401b0381111562000955576200095562000745565b6200096d81620009668454620008a8565b84620008e4565b602080601f831160018114620009a557600084156200098c5750858301515b600019600386901b1c1916600185901b17855562000930565b600085815260208120601f198616915b82811015620009d657888601518255948401946001909101908401620009b5565b5085821015620009f55787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b602081526000825180602084015262000a268160408501602087016200075b565b601f01601f19169190910160400192915050565b608051613ac562000a6b600039600081816106f80152818161141001528181611bd301526124920152613ac56000f3fe60806040526004361061027d5760003560e01c80636d35bfb91161014f57806395d89b41116100c1578063d0047acf1161007a578063d0047acf146107b7578063d3c6f6c7146107ca578063dc33e681146107ea578063e985e9c51461080a578063f2fde38b1461082a578063f6aa4e291461084a57600080fd5b806395d89b411461071a578063a118babd1461072f578063a22cb46514610744578063ad5b882c14610764578063b88d4fde14610784578063c87b56dd1461079757600080fd5b806387a5b67c1161011357806387a5b67c146105fa5780638b12e24b1461062a5780638d784d5e1461064a5780638da5cb5b1461067757806390aa0b0f1461069557806393cb5af8146106e657600080fd5b80636d35bfb91461057d57806370a082311461059d578063715018a6146105bd5780638127d864146105d25780638456cb59146105e557600080fd5b80632913daa0116101f357806355f804b3116101ac57806355f804b3146104c9578063597d1007146104e95780635c975abb146105095780636352211e14610528578063682fb995146105485780636c0360eb1461056857600080fd5b80632913daa0146104025780632a55205a1461042f5780633f4ba83a1461046e57806342842e0e146104835780634e2bbcd81461049657806353b2a7d0146104a957600080fd5b8063085a10cf11610245578063085a10cf14610353578063095ea7b3146103735780630b6d18de1461038657806318160ddd146103a857806323b872dd146103cf578063244f14cb146103e257600080fd5b806301ffc9a71461028257806304634d8d146102b7578063068124f1146102d957806306fdde03146102f9578063081812fc1461031b575b600080fd5b34801561028e57600080fd5b506102a261029d366004612f4e565b61086a565b60405190151581526020015b60405180910390f35b3480156102c357600080fd5b506102d76102d2366004612f87565b61088a565b005b3480156102e557600080fd5b506102d76102f4366004612fcc565b6108f3565b34801561030557600080fd5b5061030e61091d565b6040516102ae919061302f565b34801561032757600080fd5b5061033b610336366004613042565b6109af565b6040516001600160a01b0390911681526020016102ae565b34801561035f57600080fd5b506102d761036e36600461306b565b6109ea565b6102d7610381366004613086565b610a42565b34801561039257600080fd5b5061039b610a52565b6040516102ae9190613123565b3480156103b457600080fd5b5060025460015403600019015b6040519081526020016102ae565b6102d76103dd3660046131e5565b610e7b565b3480156103ee57600080fd5b506102d76103fd366004612fcc565b610fe0565b34801561040e57600080fd5b50600e5462010000900461ffff1660405161ffff90911681526020016102ae565b34801561043b57600080fd5b5061044f61044a366004613226565b61100a565b604080516001600160a01b0390931683526020830191909152016102ae565b34801561047a57600080fd5b506102d76110b6565b6102d76104913660046131e5565b6110c8565b6102d76104a436600461325c565b6110e8565b3480156104b557600080fd5b506102d76104c436600461306b565b61156e565b3480156104d557600080fd5b506102d76104e4366004613339565b6115c7565b3480156104f557600080fd5b506102d7610504366004613382565b611613565b34801561051557600080fd5b50600054600160a01b900460ff166102a2565b34801561053457600080fd5b5061033b610543366004613042565b611707565b34801561055457600080fd5b506102d761056336600461339e565b611775565b34801561057457600080fd5b5061030e6117a1565b34801561058957600080fd5b506102d7610598366004612fcc565b6117b0565b3480156105a957600080fd5b506103c16105b8366004612fcc565b611876565b3480156105c957600080fd5b506102d76118bc565b6102d76105e036600461325c565b6118ce565b3480156105f157600080fd5b506102d7611ce0565b34801561060657600080fd5b506102a2610615366004612fcc565b60106020526000908152604090205460ff1681565b34801561063657600080fd5b5060135461033b906001600160a01b031681565b34801561065657600080fd5b5061066a6106653660046133d1565b611cf0565b6040516102ae91906133ec565b34801561068357600080fd5b506000546001600160a01b031661033b565b3480156106a157600080fd5b50600e546106c59060ff8082169161010081049091169062010000900461ffff1683565b604080519315158452911515602084015261ffff16908201526060016102ae565b3480156106f257600080fd5b506103c17f000000000000000000000000000000000000000000000000000000000000000081565b34801561072657600080fd5b5061030e611f5c565b34801561073b57600080fd5b506102d7611f6b565b34801561075057600080fd5b506102d761075f36600461346d565b6120a2565b34801561077057600080fd5b5060115461033b906001600160a01b031681565b6102d76107923660046134a2565b61210e565b3480156107a357600080fd5b5061030e6107b2366004613042565b61214f565b6102d76107c536600461325c565b6121fb565b3480156107d657600080fd5b506102d76107e53660046135bc565b61259f565b3480156107f657600080fd5b506103c1610805366004612fcc565b6126de565b34801561081657600080fd5b506102a261082536600461367e565b612709565b34801561083657600080fd5b506102d7610845366004612fcc565b612737565b34801561085657600080fd5b5060125461033b906001600160a01b031681565b6000610875826127b0565b806108845750610884826127fe565b92915050565b610892612833565b61089a61288d565b6108a482826128da565b604080516001600160a01b03841681526001600160601b03831660208201527fe12d7d5bdb8218a22277dca8f854dd4573a1cea3d3e4808dc567df9eb1c14bf491015b60405180910390a15050565b6108fb612833565b601280546001600160a01b0319166001600160a01b0392909216919091179055565b60606003805461092c906136ac565b80601f0160208091040260200160405190810160405280929190818152602001828054610958906136ac565b80156109a55780601f1061097a576101008083540402835291602001916109a5565b820191906000526020600020905b81548152906001019060200180831161098857829003601f168201915b5050505050905090565b60006109ba826129d7565b6109ce576109ce6333d1c03960e21b612a25565b506000908152600760205260409020546001600160a01b031690565b6109f2612833565b6109fa61288d565b600e805460ff19168215159081179091556040519081527fe2bc7c34ea2bc57664d5a8700a7476e09714d671ef6a2ef218add7c058e8b2f3906020015b60405180910390a150565b610a4e82826001612a2f565b5050565b6040805160c08101825260008082526020820181905291810182905260608082018190526080820181905260a08201529060015b60ff8181161015610aca5760ff8082166000908152600f60205260409020541615610abd5781610ab5816136fc565b925050610ac2565b610aca565b600101610a86565b506040805160c08101825260009181019190915260608082018190526080820181905260a0820152600e5460ff81161515825262010000900461ffff166020820152600254600154036000190163ffffffff9081166040830152821667ffffffffffffffff811115610b3e57610b3e61329a565b604051908082528060200260200182016040528015610b67578160200160208202803683370190505b50606082015263ffffffff821667ffffffffffffffff811115610b8c57610b8c61329a565b604051908082528060200260200182016040528015610bb5578160200160208202803683370190505b5060a082015263ffffffff821667ffffffffffffffff811115610bda57610bda61329a565b604051908082528060200260200182016040528015610c03578160200160208202803683370190505b50608082015260005b8263ffffffff168160ff161015610e74576000610c2a82600161371f565b60ff8181166000908152600f60209081526040808320815160e08101835281549586161515815263ffffffff61010087041693810193909352600160281b90940461ffff16908201526001830154606082015260028301546080820152600383018054949550919390929160a0840191610ca3906136ac565b80601f0160208091040260200160405190810160405280929190818152602001828054610ccf906136ac565b8015610d1c5780601f10610cf157610100808354040283529160200191610d1c565b820191906000526020600020905b815481529060010190602001808311610cff57829003601f168201915b50505050508152602001600482018054610d35906136ac565b80601f0160208091040260200160405190810160405280929190818152602001828054610d61906136ac565b8015610dae5780601f10610d8357610100808354040283529160200191610dae565b820191906000526020600020905b815481529060010190602001808311610d9157829003601f168201915b50505050508152505090508060000151610dc9575050610e74565b806020015184606001518460ff1681518110610de757610de7613738565b602002602001019063ffffffff16908163ffffffff168152505080608001518460a001518460ff1681518110610e1f57610e1f613738565b602002602001018181525050806040015184608001518460ff1681518110610e4957610e49613738565b602002602001019061ffff16908161ffff168152505050508080610e6c9061374e565b915050610c0c565b5092915050565b6000610e8682612ad2565b6001600160a01b039485169490915081168414610eac57610eac62a1148160e81b612a25565b60008281526007602052604090208054338082146001600160a01b03881690911417610ef057610edc8633612709565b610ef057610ef0632ce44b5f60e11b612a25565b8015610efb57600082555b6001600160a01b038681166000908152600660205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260056020526040812091909155600160e11b84169003610f8d57600184016000818152600560205260408120549003610f8b576001548114610f8b5760008181526005602052604090208490555b505b6001600160a01b0385168481887fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a480600003610fd757610fd7633a954ecd60e21b612a25565b50505050505050565b610fe8612833565b601380546001600160a01b0319166001600160a01b0392909216919091179055565b6000828152600a602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b031692820192909252829161107f5750604080518082019091526009546001600160a01b0381168252600160a01b90046001600160601b031660208201525b60208101516000906127109061109e906001600160601b03168761376d565b6110a89190613784565b915196919550909350505050565b6110be612833565b6110c6612b73565b565b6110e38383836040518060200160405280600081525061210e565b505050565b6110f0612bc8565b6110f861288d565b611100612833565b60408051606081018252600e5460ff8082161515835261010082041615156020808401919091526201000090910461ffff168284015263ffffffff84166000908152600f909152919091206001600160a01b0385166111ba5760405162461bcd60e51b815260206004820152603e6024820152600080516020613a5083398151915260448201527f6e4d696e743a43616e6e6f74206d696e7420746f20302061646472657373000060648201526084015b60405180910390fd5b8151806111c8575081602001515b61121c5760405162461bcd60e51b81526020600482015260316024820152600080516020613a508339815191526044820152701b935a5b9d0e935a5b9d0818db1bdcd959607a1b60648201526084016111b1565b816040015161ffff16841115801561123357508315155b6112935760405162461bcd60e51b815260206004820152603a6024820152600080516020613a5083398151915260448201527f6e4d696e743a556e737570706f72746564207175616e7469747900000000000060648201526084016111b1565b805460ff166112f85760405162461bcd60e51b81526020600482015260386024820152600080516020613a5083398151915260448201527f6e4d696e743a56617269616e74204944206e6f7420736574000000000000000060648201526084016111b1565b341561135a5760405162461bcd60e51b815260206004820152603b6024820152600080516020613a5083398151915260448201527f6e4d696e743a43616e6e6f7420616363657074207061796d656e74000000000060648201526084016111b1565b60018101548154611377908690600160281b900461ffff166137a6565b11156113d95760405162461bcd60e51b81526020600482015260386024820152600080516020613a5083398151915260448201527f6e4d696e743a4d617820737570706c792072656163686564000000000000000060648201526084016111b1565b60008363ffffffff1660010361140c57815461140190600160281b900461ffff1660016137b9565b61ffff169050611454565b81547f000000000000000000000000000000000000000000000000000000000000000090600160281b900461ffff166114468260016137a6565b61145091906137a6565b9150505b805b61146082876137a6565b81101561151d57601254601354604051632142170760e11b81526001600160a01b0391821660048201528982166024820152604481018490529116906342842e0e90606401600060405180830381600087803b1580156114bf57600080fd5b505af11580156114d3573d6000803e3d6000fd5b50505050866001600160a01b03168563ffffffff16827fc5d74e3546027ffb88c35b9482cc5709820a3ca00985c5301614f1af680888fd60405160405180910390a4600101611456565b5081548590839060059061153d908490600160281b900461ffff166137b9565b92506101000a81548161ffff021916908361ffff1602179055506115618686612c21565b5050506110e36001600b55565b611576612833565b61157e61288d565b600e80548215156101000261ff00199091161790556040517f936953bf8d0bde80d770cbcdc11a11bb7543ea7d6810004d3824146d7347b12790610a3790831515815260200190565b6115cf612833565b6115d761288d565b600c6115e38282613824565b507f6741b2fc379fad678116fe3d4d4b9a1a184ab53ba36b86ad0fa66340b1ab41ad81604051610a37919061302f565b61161b612833565b61162361288d565b63ffffffff82166000908152600f602052604090205460ff166116ae5760405162461bcd60e51b815260206004820152603e60248201527f4d6169736f6e4d61726769656c615661756c744d616e616765723a3a7365745660448201527f617269616e7450726963653a56617269616e74204944206e6f7420736574000060648201526084016111b1565b63ffffffff82166000818152600f602052604090819020600201839055517f0b8732d6cc69b09c8eb3f9d4389f842490f8a8c16194ea6d0d9b034ca11cf228906116fb9084815260200190565b60405180910390a25050565b6012546040516331a9108f60e11b8152600481018390526000916001600160a01b031690636352211e90602401602060405180830381865afa158015611751573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061088491906138e4565b61177d612833565b63ffffffff9091166000908152600f6020526040902061ffff909116600190910155565b60606117ab612c3b565b905090565b6117b8612833565b6117c061288d565b6001600160a01b0381166118545760405162461bcd60e51b815260206004820152604f60248201527f4d6169736f6e4d61726769656c615661756c744d616e616765723a3a7365744d60448201527f696e74526f79616c747952656365697665723a52656365697665722063616e6e60648201526e6f742062652030206164647265737360881b608482015260a4016111b1565b601180546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160a01b038216611896576118966323d3ad8160e21b612a25565b506001600160a01b031660009081526006602052604090205467ffffffffffffffff1690565b6118c4612833565b6110c66000612c4a565b6118d6612bc8565b6118de61288d565b3360009081526010602052604090205460ff1661195f5760405162461bcd60e51b815260206004820152604460248201819052600080516020613a30833981519152908201527f73734c6973744d696e743a53656e646572206e6f74206f6e20616363657373206064820152631b1a5cdd60e21b608482015260a4016111b1565b60408051606081018252600e5460ff8082161515835261010082041615156020808401919091526201000090910461ffff168284015263ffffffff84166000908152600f909152919091206001600160a01b038516611a205760405162461bcd60e51b81526020600482015260436024820152600080516020613a3083398151915260448201527f73734c6973744d696e743a43616e6e6f74206d696e7420746f2030206164647260648201526265737360e81b608482015260a4016111b1565b8160200151611a855760405162461bcd60e51b815260206004820152603a6024820152600080516020613a3083398151915260448201527f73734c6973744d696e743a446576206d696e7420636c6f73656400000000000060648201526084016111b1565b816040015161ffff168411158015611a9c57508315155b611afc5760405162461bcd60e51b815260206004820152603f6024820152600080516020613a3083398151915260448201527f73734c6973744d696e743a556e737570706f72746564207175616e746974790060648201526084016111b1565b805460ff16611b615760405162461bcd60e51b815260206004820152603d6024820152600080516020613a3083398151915260448201527f73734c6973744d696e743a56617269616e74204944206e6f742073657400000060648201526084016111b1565b60018101548154611b7e908690600160281b900461ffff166137a6565b1115611b9c5760405162461bcd60e51b81526004016111b190613901565b60008363ffffffff16600103611bcf578154611bc490600160281b900461ffff1660016137b9565b61ffff169050611c17565b81547f000000000000000000000000000000000000000000000000000000000000000090600160281b900461ffff16611c098260016137a6565b611c1391906137a6565b9150505b805b611c2382876137a6565b81101561151d57601254601354604051632142170760e11b81526001600160a01b0391821660048201528982166024820152604481018490529116906342842e0e90606401600060405180830381600087803b158015611c8257600080fd5b505af1158015611c96573d6000803e3d6000fd5b50505050866001600160a01b03168563ffffffff16827fc5d74e3546027ffb88c35b9482cc5709820a3ca00985c5301614f1af680888fd60405160405180910390a4600101611c19565b611ce8612833565b6110c6612c9a565b611d3c6040518060e00160405280600015158152602001600063ffffffff168152602001600061ffff168152602001600081526020016000815260200160608152602001606081525090565b63ffffffff82166000908152600f602052604090205460ff16611dc75760405162461bcd60e51b815260206004820152603a60248201527f4d6169736f6e4d61726769656c615661756c744d616e616765723a3a7661726960448201527f616e74446174613a56617269616e74204944206e6f742073657400000000000060648201526084016111b1565b63ffffffff8281166000908152600f6020908152604091829020825160e081018452815460ff811615158252610100810490951692810192909252600160281b90930461ffff1691810191909152600182015460608201526002820154608082015260038201805491929160a084019190611e41906136ac565b80601f0160208091040260200160405190810160405280929190818152602001828054611e6d906136ac565b8015611eba5780601f10611e8f57610100808354040283529160200191611eba565b820191906000526020600020905b815481529060010190602001808311611e9d57829003601f168201915b50505050508152602001600482018054611ed3906136ac565b80601f0160208091040260200160405190810160405280929190818152602001828054611eff906136ac565b8015611f4c5780601f10611f2157610100808354040283529160200191611f4c565b820191906000526020600020905b815481529060010190602001808311611f2f57829003601f168201915b5050505050815250509050919050565b60606004805461092c906136ac565b611f73612833565b611f7b612bc8565b611f8361288d565b60115460405147916000916001600160a01b039091169047908381818185875af1925050503d8060008114611fd4576040519150601f19603f3d011682016040523d82523d6000602084013e611fd9565b606091505b50509050806120505760405162461bcd60e51b815260206004820152603c60248201527f4d6169736f6e4d61726769656c615661756c744d616e616765723a3a7769746860448201527f647261775061796d656e743a5472616e73666572206661696c65642e0000000060648201526084016111b1565b601154604080516001600160a01b039092168252602082018490527f84511ecc081974f18e7f3e0dcc19db078b55bbd3852ddd0dd85b3aebb7bf94c2910160405180910390a150506110c66001600b55565b3360008181526008602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b612119848484610e7b565b6001600160a01b0383163b156121495761213584848484612cdd565b612149576121496368d2bf6b60e11b612a25565b50505050565b606061215a826129d7565b6121e75760405162461bcd60e51b815260206004820152605260248201527f4d6169736f6e4d61726769656c615661756c744d616e616765723a3a746f6b6560448201527f5552493a4552433732314d657461646174613a55524920717565727920666f72606482015271103737b732bc34b9ba32b73a103a37b5b2b760711b608482015260a4016111b1565b505060408051602081019091526000815290565b612203612bc8565b61220b61288d565b63ffffffff81166000908152600f60205260409020600e906001600160a01b03851661228d5760405162461bcd60e51b81526020600482015260396024820152600080516020613a7083398151915260448201527f3a43616e6e6f74206d696e7420746f203020616464726573730000000000000060648201526084016111b1565b815460ff166122e15760405162461bcd60e51b815260206004820152602c6024820152600080516020613a7083398151915260448201526b0e935a5b9d0818db1bdcd95960a21b60648201526084016111b1565b815462010000900461ffff1684118015906122fb57508315155b6123535760405162461bcd60e51b81526020600482015260356024820152600080516020613a708339815191526044820152743a556e737570706f72746564207175616e7469747960581b60648201526084016111b1565b805460ff166123ae5760405162461bcd60e51b81526020600482015260336024820152600080516020613a708339815191526044820152720e95985c9a585b9d081251081b9bdd081cd95d606a1b60648201526084016111b1565b60028101546123bd908561376d565b3410156124205760405162461bcd60e51b815260206004820152603e6024820152600080516020613a7083398151915260448201527f3a45746865722076616c75652073656e7420697320696e636f7272656374000060648201526084016111b1565b6001810154815461243d908690600160281b900461ffff166137a6565b111561245b5760405162461bcd60e51b81526004016111b190613901565b60008363ffffffff1660010361248e57815461248390600160281b900461ffff1660016137b9565b61ffff1690506124d6565b81547f000000000000000000000000000000000000000000000000000000000000000090600160281b900461ffff166124c88260016137a6565b6124d291906137a6565b9150505b805b6124e282876137a6565b81101561151d57601254601354604051632142170760e11b81526001600160a01b0391821660048201528982166024820152604481018490529116906342842e0e90606401600060405180830381600087803b15801561254157600080fd5b505af1158015612555573d6000803e3d6000fd5b50505050866001600160a01b03168563ffffffff16827fc5d74e3546027ffb88c35b9482cc5709820a3ca00985c5301614f1af680888fd60405160405180910390a46001016124d8565b6125a7612833565b6125af61288d565b80518251146126365760405162461bcd60e51b815260206004820152604760248201527f4d6169736f6e4d61726769656c615661756c744d616e616765723a3a7570646160448201527f74654163636573734c6973743a4172726179206c656e6774687320646f206e6f6064820152660e840dac2e8c6d60cb1b608482015260a4016111b1565b60005b82518110156126ac5781818151811061265457612654613738565b60200260200101516010600085848151811061267257612672613738565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055600101612639565b507fdb4cad279a893422aa79c49ff874a7db86281bf1d23b51050c37733516f4229182826040516108e7929190613942565b6001600160a01b0381166000908152600660205260408082205467ffffffffffffffff911c16610884565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205460ff1690565b61273f612833565b6001600160a01b0381166127a45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016111b1565b6127ad81612c4a565b50565b60006301ffc9a760e01b6001600160e01b0319831614806127e157506380ac58cd60e01b6001600160e01b03198316145b806108845750506001600160e01b031916635b5e139f60e01b1490565b60006001600160e01b0319821663152a902d60e11b148061088457506301ffc9a760e01b6001600160e01b0319831614610884565b6000546001600160a01b031633146110c65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016111b1565b600054600160a01b900460ff16156110c65760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016111b1565b6127106001600160601b03821611156129485760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b60648201526084016111b1565b6001600160a01b03821661299e5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c69642072656365697665720000000000000060448201526064016111b1565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600955565b600081600111612a2057600154821015612a205760005b5060008281526005602052604081205490819003612a1657612a0f836139c8565b92506129ee565b600160e01b161590505b919050565b8060005260046000fd5b6000612a3a83611707565b9050818015612a525750336001600160a01b03821614155b15612a7557612a618133612709565b612a7557612a756367d9dca160e11b612a25565b60008381526007602052604080822080546001600160a01b0319166001600160a01b0388811691821790925591518693918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a450505050565b600081600111612b63575060008181526005602052604081205490819003612b50576001548210612b0d57612b0d636f96cda160e11b612a25565b5b50600019016000818152600560205260409020548015612b0e57600160e01b8116600003612b3b57919050565b612b4b636f96cda160e11b612a25565b612b0e565b600160e01b8116600003612b6357919050565b612a20636f96cda160e11b612a25565b612b7b612dc0565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6002600b5403612c1a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016111b1565b6002600b55565b610a4e828260405180602001604052806000815250612e10565b6060600c805461092c906136ac565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b612ca261288d565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612bab3390565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290612d129033908990889088906004016139df565b6020604051808303816000875af1925050508015612d4d575060408051601f3d908101601f19168201909252612d4a91810190613a12565b60015b612da2573d808015612d7b576040519150601f19603f3d011682016040523d82523d6000602084013e612d80565b606091505b508051600003612d9a57612d9a6368d2bf6b60e11b612a25565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b600054600160a01b900460ff166110c65760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016111b1565b612e1a8383612e79565b6001600160a01b0383163b156110e3576001548281035b612e446000868380600101945086612cdd565b612e5857612e586368d2bf6b60e11b612a25565b818110612e31578160015414612e7257612e726000612a25565b5050505050565b6001546000829003612e9557612e9563b562e8dd60e01b612a25565b60008181526005602090815260408083206001600160a01b0387164260a01b6001881460e11b17811790915580845260069092528220805468010000000000000001860201905590819003612ef357612ef3622e076360e81b612a25565b818301825b808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4818160010191508103612ef8575060015550505050565b6001600160e01b0319811681146127ad57600080fd5b600060208284031215612f6057600080fd5b8135612f6b81612f38565b9392505050565b6001600160a01b03811681146127ad57600080fd5b60008060408385031215612f9a57600080fd5b8235612fa581612f72565b915060208301356001600160601b0381168114612fc157600080fd5b809150509250929050565b600060208284031215612fde57600080fd5b8135612f6b81612f72565b6000815180845260005b8181101561300f57602081850181015186830182015201612ff3565b506000602082860101526020601f19601f83011685010191505092915050565b602081526000612f6b6020830184612fe9565b60006020828403121561305457600080fd5b5035919050565b80358015158114612a2057600080fd5b60006020828403121561307d57600080fd5b612f6b8261305b565b6000806040838503121561309957600080fd5b82356130a481612f72565b946020939093013593505050565b60008151808452602080850194506020840160005b838110156130e757815161ffff16875295820195908201906001016130c7565b509495945050505050565b60008151808452602080850194506020840160005b838110156130e757815187529582019590820190600101613107565b6000602080835260e08301845115158285015261ffff82860151166040850152604085015163ffffffff80821660608701526060870151915060c06080870152828251808552610100880191508584019450600093505b8084101561319c5784518316825293850193600193909301929085019061317a565b5060808801519450601f199350838782030160a08801526131bd81866130b2565b945050505060a0850151818584030160c08601526131db83826130f2565b9695505050505050565b6000806000606084860312156131fa57600080fd5b833561320581612f72565b9250602084013561321581612f72565b929592945050506040919091013590565b6000806040838503121561323957600080fd5b50508035926020909101359150565b803563ffffffff81168114612a2057600080fd5b60008060006060848603121561327157600080fd5b833561327c81612f72565b92506020840135915061329160408501613248565b90509250925092565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156132d9576132d961329a565b604052919050565b600067ffffffffffffffff8311156132fb576132fb61329a565b61330e601f8401601f19166020016132b0565b905082815283838301111561332257600080fd5b828260208301376000602084830101529392505050565b60006020828403121561334b57600080fd5b813567ffffffffffffffff81111561336257600080fd5b8201601f8101841361337357600080fd5b612db8848235602084016132e1565b6000806040838503121561339557600080fd5b6130a483613248565b600080604083850312156133b157600080fd5b6133ba83613248565b9150602083013561ffff81168114612fc157600080fd5b6000602082840312156133e357600080fd5b612f6b82613248565b6020815281511515602082015263ffffffff602083015116604082015261ffff604083015116606082015260608201516080820152608082015160a0820152600060a083015160e060c0840152613447610100840182612fe9565b905060c0840151601f198483030160e08501526134648282612fe9565b95945050505050565b6000806040838503121561348057600080fd5b823561348b81612f72565b91506134996020840161305b565b90509250929050565b600080600080608085870312156134b857600080fd5b84356134c381612f72565b935060208501356134d381612f72565b925060408501359150606085013567ffffffffffffffff8111156134f657600080fd5b8501601f8101871361350757600080fd5b613516878235602084016132e1565b91505092959194509250565b600067ffffffffffffffff82111561353c5761353c61329a565b5060051b60200190565b600082601f83011261355757600080fd5b8135602061356c61356783613522565b6132b0565b8083825260208201915060208460051b87010193508684111561358e57600080fd5b602086015b848110156135b1576135a48161305b565b8352918301918301613593565b509695505050505050565b600080604083850312156135cf57600080fd5b823567ffffffffffffffff808211156135e757600080fd5b818501915085601f8301126135fb57600080fd5b8135602061360b61356783613522565b82815260059290921b8401810191818101908984111561362a57600080fd5b948201945b8386101561365157853561364281612f72565b8252948201949082019061362f565b9650508601359250508082111561366757600080fd5b5061367485828601613546565b9150509250929050565b6000806040838503121561369157600080fd5b823561369c81612f72565b91506020830135612fc181612f72565b600181811c908216806136c057607f821691505b6020821081036136e057634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600063ffffffff808316818103613715576137156136e6565b6001019392505050565b60ff8181168382160190811115610884576108846136e6565b634e487b7160e01b600052603260045260246000fd5b600060ff821660ff8103613764576137646136e6565b60010192915050565b8082028115828204841417610884576108846136e6565b6000826137a157634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115610884576108846136e6565b61ffff818116838216019080821115610e7457610e746136e6565b601f8211156110e3576000816000526020600020601f850160051c810160208610156137fd5750805b601f850160051c820191505b8181101561381c57828155600101613809565b505050505050565b815167ffffffffffffffff81111561383e5761383e61329a565b6138528161384c84546136ac565b846137d4565b602080601f831160018114613887576000841561386f5750858301515b600019600386901b1c1916600185901b17855561381c565b600085815260208120601f198616915b828110156138b657888601518255948401946001909101908401613897565b50858210156138d45787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6000602082840312156138f657600080fd5b8151612f6b81612f72565b6020808252603390820152600080516020613a708339815191526040820152720e93585e081cdd5c1c1b1e481c995858da1959606a1b606082015260800190565b604080825283519082018190526000906020906060840190828701845b828110156139845781516001600160a01b03168452928401929084019060010161395f565b5050508381038285015284518082528583019183019060005b818110156139bb57835115158352928401929184019160010161399d565b5090979650505050505050565b6000816139d7576139d76136e6565b506000190190565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906131db90830184612fe9565b600060208284031215613a2457600080fd5b8151612f6b81612f3856fe4d6169736f6e4d61726769656c615661756c744d616e616765723a3a616363654d6169736f6e4d61726769656c615661756c744d616e616765723a3a61646d694d6169736f6e4d61726769656c615661756c744d616e616765723a3a6d696e74a2646970667358221220e3e8d0501b18c07766f243995c1573dcc127dad0ca205ca1bfd4191d125c3fd864736f6c63430008170033169f97de0d9a84d840042b17d3c6b9638b3d6fd9024c9eb0c7a306a17b49f890000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000001f40000000000000000000000005c8cb9d24348c0b4eda49992cb68dae050217d92000000000000000000000000d8a97632b51a9b740caeea838e2043e6e688e90b0000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x60806040526004361061027d5760003560e01c80636d35bfb91161014f57806395d89b41116100c1578063d0047acf1161007a578063d0047acf146107b7578063d3c6f6c7146107ca578063dc33e681146107ea578063e985e9c51461080a578063f2fde38b1461082a578063f6aa4e291461084a57600080fd5b806395d89b411461071a578063a118babd1461072f578063a22cb46514610744578063ad5b882c14610764578063b88d4fde14610784578063c87b56dd1461079757600080fd5b806387a5b67c1161011357806387a5b67c146105fa5780638b12e24b1461062a5780638d784d5e1461064a5780638da5cb5b1461067757806390aa0b0f1461069557806393cb5af8146106e657600080fd5b80636d35bfb91461057d57806370a082311461059d578063715018a6146105bd5780638127d864146105d25780638456cb59146105e557600080fd5b80632913daa0116101f357806355f804b3116101ac57806355f804b3146104c9578063597d1007146104e95780635c975abb146105095780636352211e14610528578063682fb995146105485780636c0360eb1461056857600080fd5b80632913daa0146104025780632a55205a1461042f5780633f4ba83a1461046e57806342842e0e146104835780634e2bbcd81461049657806353b2a7d0146104a957600080fd5b8063085a10cf11610245578063085a10cf14610353578063095ea7b3146103735780630b6d18de1461038657806318160ddd146103a857806323b872dd146103cf578063244f14cb146103e257600080fd5b806301ffc9a71461028257806304634d8d146102b7578063068124f1146102d957806306fdde03146102f9578063081812fc1461031b575b600080fd5b34801561028e57600080fd5b506102a261029d366004612f4e565b61086a565b60405190151581526020015b60405180910390f35b3480156102c357600080fd5b506102d76102d2366004612f87565b61088a565b005b3480156102e557600080fd5b506102d76102f4366004612fcc565b6108f3565b34801561030557600080fd5b5061030e61091d565b6040516102ae919061302f565b34801561032757600080fd5b5061033b610336366004613042565b6109af565b6040516001600160a01b0390911681526020016102ae565b34801561035f57600080fd5b506102d761036e36600461306b565b6109ea565b6102d7610381366004613086565b610a42565b34801561039257600080fd5b5061039b610a52565b6040516102ae9190613123565b3480156103b457600080fd5b5060025460015403600019015b6040519081526020016102ae565b6102d76103dd3660046131e5565b610e7b565b3480156103ee57600080fd5b506102d76103fd366004612fcc565b610fe0565b34801561040e57600080fd5b50600e5462010000900461ffff1660405161ffff90911681526020016102ae565b34801561043b57600080fd5b5061044f61044a366004613226565b61100a565b604080516001600160a01b0390931683526020830191909152016102ae565b34801561047a57600080fd5b506102d76110b6565b6102d76104913660046131e5565b6110c8565b6102d76104a436600461325c565b6110e8565b3480156104b557600080fd5b506102d76104c436600461306b565b61156e565b3480156104d557600080fd5b506102d76104e4366004613339565b6115c7565b3480156104f557600080fd5b506102d7610504366004613382565b611613565b34801561051557600080fd5b50600054600160a01b900460ff166102a2565b34801561053457600080fd5b5061033b610543366004613042565b611707565b34801561055457600080fd5b506102d761056336600461339e565b611775565b34801561057457600080fd5b5061030e6117a1565b34801561058957600080fd5b506102d7610598366004612fcc565b6117b0565b3480156105a957600080fd5b506103c16105b8366004612fcc565b611876565b3480156105c957600080fd5b506102d76118bc565b6102d76105e036600461325c565b6118ce565b3480156105f157600080fd5b506102d7611ce0565b34801561060657600080fd5b506102a2610615366004612fcc565b60106020526000908152604090205460ff1681565b34801561063657600080fd5b5060135461033b906001600160a01b031681565b34801561065657600080fd5b5061066a6106653660046133d1565b611cf0565b6040516102ae91906133ec565b34801561068357600080fd5b506000546001600160a01b031661033b565b3480156106a157600080fd5b50600e546106c59060ff8082169161010081049091169062010000900461ffff1683565b604080519315158452911515602084015261ffff16908201526060016102ae565b3480156106f257600080fd5b506103c17f000000000000000000000000000000000000000000000000000000000000000f81565b34801561072657600080fd5b5061030e611f5c565b34801561073b57600080fd5b506102d7611f6b565b34801561075057600080fd5b506102d761075f36600461346d565b6120a2565b34801561077057600080fd5b5060115461033b906001600160a01b031681565b6102d76107923660046134a2565b61210e565b3480156107a357600080fd5b5061030e6107b2366004613042565b61214f565b6102d76107c536600461325c565b6121fb565b3480156107d657600080fd5b506102d76107e53660046135bc565b61259f565b3480156107f657600080fd5b506103c1610805366004612fcc565b6126de565b34801561081657600080fd5b506102a261082536600461367e565b612709565b34801561083657600080fd5b506102d7610845366004612fcc565b612737565b34801561085657600080fd5b5060125461033b906001600160a01b031681565b6000610875826127b0565b806108845750610884826127fe565b92915050565b610892612833565b61089a61288d565b6108a482826128da565b604080516001600160a01b03841681526001600160601b03831660208201527fe12d7d5bdb8218a22277dca8f854dd4573a1cea3d3e4808dc567df9eb1c14bf491015b60405180910390a15050565b6108fb612833565b601280546001600160a01b0319166001600160a01b0392909216919091179055565b60606003805461092c906136ac565b80601f0160208091040260200160405190810160405280929190818152602001828054610958906136ac565b80156109a55780601f1061097a576101008083540402835291602001916109a5565b820191906000526020600020905b81548152906001019060200180831161098857829003601f168201915b5050505050905090565b60006109ba826129d7565b6109ce576109ce6333d1c03960e21b612a25565b506000908152600760205260409020546001600160a01b031690565b6109f2612833565b6109fa61288d565b600e805460ff19168215159081179091556040519081527fe2bc7c34ea2bc57664d5a8700a7476e09714d671ef6a2ef218add7c058e8b2f3906020015b60405180910390a150565b610a4e82826001612a2f565b5050565b6040805160c08101825260008082526020820181905291810182905260608082018190526080820181905260a08201529060015b60ff8181161015610aca5760ff8082166000908152600f60205260409020541615610abd5781610ab5816136fc565b925050610ac2565b610aca565b600101610a86565b506040805160c08101825260009181019190915260608082018190526080820181905260a0820152600e5460ff81161515825262010000900461ffff166020820152600254600154036000190163ffffffff9081166040830152821667ffffffffffffffff811115610b3e57610b3e61329a565b604051908082528060200260200182016040528015610b67578160200160208202803683370190505b50606082015263ffffffff821667ffffffffffffffff811115610b8c57610b8c61329a565b604051908082528060200260200182016040528015610bb5578160200160208202803683370190505b5060a082015263ffffffff821667ffffffffffffffff811115610bda57610bda61329a565b604051908082528060200260200182016040528015610c03578160200160208202803683370190505b50608082015260005b8263ffffffff168160ff161015610e74576000610c2a82600161371f565b60ff8181166000908152600f60209081526040808320815160e08101835281549586161515815263ffffffff61010087041693810193909352600160281b90940461ffff16908201526001830154606082015260028301546080820152600383018054949550919390929160a0840191610ca3906136ac565b80601f0160208091040260200160405190810160405280929190818152602001828054610ccf906136ac565b8015610d1c5780601f10610cf157610100808354040283529160200191610d1c565b820191906000526020600020905b815481529060010190602001808311610cff57829003601f168201915b50505050508152602001600482018054610d35906136ac565b80601f0160208091040260200160405190810160405280929190818152602001828054610d61906136ac565b8015610dae5780601f10610d8357610100808354040283529160200191610dae565b820191906000526020600020905b815481529060010190602001808311610d9157829003601f168201915b50505050508152505090508060000151610dc9575050610e74565b806020015184606001518460ff1681518110610de757610de7613738565b602002602001019063ffffffff16908163ffffffff168152505080608001518460a001518460ff1681518110610e1f57610e1f613738565b602002602001018181525050806040015184608001518460ff1681518110610e4957610e49613738565b602002602001019061ffff16908161ffff168152505050508080610e6c9061374e565b915050610c0c565b5092915050565b6000610e8682612ad2565b6001600160a01b039485169490915081168414610eac57610eac62a1148160e81b612a25565b60008281526007602052604090208054338082146001600160a01b03881690911417610ef057610edc8633612709565b610ef057610ef0632ce44b5f60e11b612a25565b8015610efb57600082555b6001600160a01b038681166000908152600660205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260056020526040812091909155600160e11b84169003610f8d57600184016000818152600560205260408120549003610f8b576001548114610f8b5760008181526005602052604090208490555b505b6001600160a01b0385168481887fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a480600003610fd757610fd7633a954ecd60e21b612a25565b50505050505050565b610fe8612833565b601380546001600160a01b0319166001600160a01b0392909216919091179055565b6000828152600a602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b031692820192909252829161107f5750604080518082019091526009546001600160a01b0381168252600160a01b90046001600160601b031660208201525b60208101516000906127109061109e906001600160601b03168761376d565b6110a89190613784565b915196919550909350505050565b6110be612833565b6110c6612b73565b565b6110e38383836040518060200160405280600081525061210e565b505050565b6110f0612bc8565b6110f861288d565b611100612833565b60408051606081018252600e5460ff8082161515835261010082041615156020808401919091526201000090910461ffff168284015263ffffffff84166000908152600f909152919091206001600160a01b0385166111ba5760405162461bcd60e51b815260206004820152603e6024820152600080516020613a5083398151915260448201527f6e4d696e743a43616e6e6f74206d696e7420746f20302061646472657373000060648201526084015b60405180910390fd5b8151806111c8575081602001515b61121c5760405162461bcd60e51b81526020600482015260316024820152600080516020613a508339815191526044820152701b935a5b9d0e935a5b9d0818db1bdcd959607a1b60648201526084016111b1565b816040015161ffff16841115801561123357508315155b6112935760405162461bcd60e51b815260206004820152603a6024820152600080516020613a5083398151915260448201527f6e4d696e743a556e737570706f72746564207175616e7469747900000000000060648201526084016111b1565b805460ff166112f85760405162461bcd60e51b81526020600482015260386024820152600080516020613a5083398151915260448201527f6e4d696e743a56617269616e74204944206e6f7420736574000000000000000060648201526084016111b1565b341561135a5760405162461bcd60e51b815260206004820152603b6024820152600080516020613a5083398151915260448201527f6e4d696e743a43616e6e6f7420616363657074207061796d656e74000000000060648201526084016111b1565b60018101548154611377908690600160281b900461ffff166137a6565b11156113d95760405162461bcd60e51b81526020600482015260386024820152600080516020613a5083398151915260448201527f6e4d696e743a4d617820737570706c792072656163686564000000000000000060648201526084016111b1565b60008363ffffffff1660010361140c57815461140190600160281b900461ffff1660016137b9565b61ffff169050611454565b81547f000000000000000000000000000000000000000000000000000000000000000f90600160281b900461ffff166114468260016137a6565b61145091906137a6565b9150505b805b61146082876137a6565b81101561151d57601254601354604051632142170760e11b81526001600160a01b0391821660048201528982166024820152604481018490529116906342842e0e90606401600060405180830381600087803b1580156114bf57600080fd5b505af11580156114d3573d6000803e3d6000fd5b50505050866001600160a01b03168563ffffffff16827fc5d74e3546027ffb88c35b9482cc5709820a3ca00985c5301614f1af680888fd60405160405180910390a4600101611456565b5081548590839060059061153d908490600160281b900461ffff166137b9565b92506101000a81548161ffff021916908361ffff1602179055506115618686612c21565b5050506110e36001600b55565b611576612833565b61157e61288d565b600e80548215156101000261ff00199091161790556040517f936953bf8d0bde80d770cbcdc11a11bb7543ea7d6810004d3824146d7347b12790610a3790831515815260200190565b6115cf612833565b6115d761288d565b600c6115e38282613824565b507f6741b2fc379fad678116fe3d4d4b9a1a184ab53ba36b86ad0fa66340b1ab41ad81604051610a37919061302f565b61161b612833565b61162361288d565b63ffffffff82166000908152600f602052604090205460ff166116ae5760405162461bcd60e51b815260206004820152603e60248201527f4d6169736f6e4d61726769656c615661756c744d616e616765723a3a7365745660448201527f617269616e7450726963653a56617269616e74204944206e6f7420736574000060648201526084016111b1565b63ffffffff82166000818152600f602052604090819020600201839055517f0b8732d6cc69b09c8eb3f9d4389f842490f8a8c16194ea6d0d9b034ca11cf228906116fb9084815260200190565b60405180910390a25050565b6012546040516331a9108f60e11b8152600481018390526000916001600160a01b031690636352211e90602401602060405180830381865afa158015611751573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061088491906138e4565b61177d612833565b63ffffffff9091166000908152600f6020526040902061ffff909116600190910155565b60606117ab612c3b565b905090565b6117b8612833565b6117c061288d565b6001600160a01b0381166118545760405162461bcd60e51b815260206004820152604f60248201527f4d6169736f6e4d61726769656c615661756c744d616e616765723a3a7365744d60448201527f696e74526f79616c747952656365697665723a52656365697665722063616e6e60648201526e6f742062652030206164647265737360881b608482015260a4016111b1565b601180546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160a01b038216611896576118966323d3ad8160e21b612a25565b506001600160a01b031660009081526006602052604090205467ffffffffffffffff1690565b6118c4612833565b6110c66000612c4a565b6118d6612bc8565b6118de61288d565b3360009081526010602052604090205460ff1661195f5760405162461bcd60e51b815260206004820152604460248201819052600080516020613a30833981519152908201527f73734c6973744d696e743a53656e646572206e6f74206f6e20616363657373206064820152631b1a5cdd60e21b608482015260a4016111b1565b60408051606081018252600e5460ff8082161515835261010082041615156020808401919091526201000090910461ffff168284015263ffffffff84166000908152600f909152919091206001600160a01b038516611a205760405162461bcd60e51b81526020600482015260436024820152600080516020613a3083398151915260448201527f73734c6973744d696e743a43616e6e6f74206d696e7420746f2030206164647260648201526265737360e81b608482015260a4016111b1565b8160200151611a855760405162461bcd60e51b815260206004820152603a6024820152600080516020613a3083398151915260448201527f73734c6973744d696e743a446576206d696e7420636c6f73656400000000000060648201526084016111b1565b816040015161ffff168411158015611a9c57508315155b611afc5760405162461bcd60e51b815260206004820152603f6024820152600080516020613a3083398151915260448201527f73734c6973744d696e743a556e737570706f72746564207175616e746974790060648201526084016111b1565b805460ff16611b615760405162461bcd60e51b815260206004820152603d6024820152600080516020613a3083398151915260448201527f73734c6973744d696e743a56617269616e74204944206e6f742073657400000060648201526084016111b1565b60018101548154611b7e908690600160281b900461ffff166137a6565b1115611b9c5760405162461bcd60e51b81526004016111b190613901565b60008363ffffffff16600103611bcf578154611bc490600160281b900461ffff1660016137b9565b61ffff169050611c17565b81547f000000000000000000000000000000000000000000000000000000000000000f90600160281b900461ffff16611c098260016137a6565b611c1391906137a6565b9150505b805b611c2382876137a6565b81101561151d57601254601354604051632142170760e11b81526001600160a01b0391821660048201528982166024820152604481018490529116906342842e0e90606401600060405180830381600087803b158015611c8257600080fd5b505af1158015611c96573d6000803e3d6000fd5b50505050866001600160a01b03168563ffffffff16827fc5d74e3546027ffb88c35b9482cc5709820a3ca00985c5301614f1af680888fd60405160405180910390a4600101611c19565b611ce8612833565b6110c6612c9a565b611d3c6040518060e00160405280600015158152602001600063ffffffff168152602001600061ffff168152602001600081526020016000815260200160608152602001606081525090565b63ffffffff82166000908152600f602052604090205460ff16611dc75760405162461bcd60e51b815260206004820152603a60248201527f4d6169736f6e4d61726769656c615661756c744d616e616765723a3a7661726960448201527f616e74446174613a56617269616e74204944206e6f742073657400000000000060648201526084016111b1565b63ffffffff8281166000908152600f6020908152604091829020825160e081018452815460ff811615158252610100810490951692810192909252600160281b90930461ffff1691810191909152600182015460608201526002820154608082015260038201805491929160a084019190611e41906136ac565b80601f0160208091040260200160405190810160405280929190818152602001828054611e6d906136ac565b8015611eba5780601f10611e8f57610100808354040283529160200191611eba565b820191906000526020600020905b815481529060010190602001808311611e9d57829003601f168201915b50505050508152602001600482018054611ed3906136ac565b80601f0160208091040260200160405190810160405280929190818152602001828054611eff906136ac565b8015611f4c5780601f10611f2157610100808354040283529160200191611f4c565b820191906000526020600020905b815481529060010190602001808311611f2f57829003601f168201915b5050505050815250509050919050565b60606004805461092c906136ac565b611f73612833565b611f7b612bc8565b611f8361288d565b60115460405147916000916001600160a01b039091169047908381818185875af1925050503d8060008114611fd4576040519150601f19603f3d011682016040523d82523d6000602084013e611fd9565b606091505b50509050806120505760405162461bcd60e51b815260206004820152603c60248201527f4d6169736f6e4d61726769656c615661756c744d616e616765723a3a7769746860448201527f647261775061796d656e743a5472616e73666572206661696c65642e0000000060648201526084016111b1565b601154604080516001600160a01b039092168252602082018490527f84511ecc081974f18e7f3e0dcc19db078b55bbd3852ddd0dd85b3aebb7bf94c2910160405180910390a150506110c66001600b55565b3360008181526008602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b612119848484610e7b565b6001600160a01b0383163b156121495761213584848484612cdd565b612149576121496368d2bf6b60e11b612a25565b50505050565b606061215a826129d7565b6121e75760405162461bcd60e51b815260206004820152605260248201527f4d6169736f6e4d61726769656c615661756c744d616e616765723a3a746f6b6560448201527f5552493a4552433732314d657461646174613a55524920717565727920666f72606482015271103737b732bc34b9ba32b73a103a37b5b2b760711b608482015260a4016111b1565b505060408051602081019091526000815290565b612203612bc8565b61220b61288d565b63ffffffff81166000908152600f60205260409020600e906001600160a01b03851661228d5760405162461bcd60e51b81526020600482015260396024820152600080516020613a7083398151915260448201527f3a43616e6e6f74206d696e7420746f203020616464726573730000000000000060648201526084016111b1565b815460ff166122e15760405162461bcd60e51b815260206004820152602c6024820152600080516020613a7083398151915260448201526b0e935a5b9d0818db1bdcd95960a21b60648201526084016111b1565b815462010000900461ffff1684118015906122fb57508315155b6123535760405162461bcd60e51b81526020600482015260356024820152600080516020613a708339815191526044820152743a556e737570706f72746564207175616e7469747960581b60648201526084016111b1565b805460ff166123ae5760405162461bcd60e51b81526020600482015260336024820152600080516020613a708339815191526044820152720e95985c9a585b9d081251081b9bdd081cd95d606a1b60648201526084016111b1565b60028101546123bd908561376d565b3410156124205760405162461bcd60e51b815260206004820152603e6024820152600080516020613a7083398151915260448201527f3a45746865722076616c75652073656e7420697320696e636f7272656374000060648201526084016111b1565b6001810154815461243d908690600160281b900461ffff166137a6565b111561245b5760405162461bcd60e51b81526004016111b190613901565b60008363ffffffff1660010361248e57815461248390600160281b900461ffff1660016137b9565b61ffff1690506124d6565b81547f000000000000000000000000000000000000000000000000000000000000000f90600160281b900461ffff166124c88260016137a6565b6124d291906137a6565b9150505b805b6124e282876137a6565b81101561151d57601254601354604051632142170760e11b81526001600160a01b0391821660048201528982166024820152604481018490529116906342842e0e90606401600060405180830381600087803b15801561254157600080fd5b505af1158015612555573d6000803e3d6000fd5b50505050866001600160a01b03168563ffffffff16827fc5d74e3546027ffb88c35b9482cc5709820a3ca00985c5301614f1af680888fd60405160405180910390a46001016124d8565b6125a7612833565b6125af61288d565b80518251146126365760405162461bcd60e51b815260206004820152604760248201527f4d6169736f6e4d61726769656c615661756c744d616e616765723a3a7570646160448201527f74654163636573734c6973743a4172726179206c656e6774687320646f206e6f6064820152660e840dac2e8c6d60cb1b608482015260a4016111b1565b60005b82518110156126ac5781818151811061265457612654613738565b60200260200101516010600085848151811061267257612672613738565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055600101612639565b507fdb4cad279a893422aa79c49ff874a7db86281bf1d23b51050c37733516f4229182826040516108e7929190613942565b6001600160a01b0381166000908152600660205260408082205467ffffffffffffffff911c16610884565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205460ff1690565b61273f612833565b6001600160a01b0381166127a45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016111b1565b6127ad81612c4a565b50565b60006301ffc9a760e01b6001600160e01b0319831614806127e157506380ac58cd60e01b6001600160e01b03198316145b806108845750506001600160e01b031916635b5e139f60e01b1490565b60006001600160e01b0319821663152a902d60e11b148061088457506301ffc9a760e01b6001600160e01b0319831614610884565b6000546001600160a01b031633146110c65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016111b1565b600054600160a01b900460ff16156110c65760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016111b1565b6127106001600160601b03821611156129485760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b60648201526084016111b1565b6001600160a01b03821661299e5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c69642072656365697665720000000000000060448201526064016111b1565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600955565b600081600111612a2057600154821015612a205760005b5060008281526005602052604081205490819003612a1657612a0f836139c8565b92506129ee565b600160e01b161590505b919050565b8060005260046000fd5b6000612a3a83611707565b9050818015612a525750336001600160a01b03821614155b15612a7557612a618133612709565b612a7557612a756367d9dca160e11b612a25565b60008381526007602052604080822080546001600160a01b0319166001600160a01b0388811691821790925591518693918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a450505050565b600081600111612b63575060008181526005602052604081205490819003612b50576001548210612b0d57612b0d636f96cda160e11b612a25565b5b50600019016000818152600560205260409020548015612b0e57600160e01b8116600003612b3b57919050565b612b4b636f96cda160e11b612a25565b612b0e565b600160e01b8116600003612b6357919050565b612a20636f96cda160e11b612a25565b612b7b612dc0565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6002600b5403612c1a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016111b1565b6002600b55565b610a4e828260405180602001604052806000815250612e10565b6060600c805461092c906136ac565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b612ca261288d565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612bab3390565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290612d129033908990889088906004016139df565b6020604051808303816000875af1925050508015612d4d575060408051601f3d908101601f19168201909252612d4a91810190613a12565b60015b612da2573d808015612d7b576040519150601f19603f3d011682016040523d82523d6000602084013e612d80565b606091505b508051600003612d9a57612d9a6368d2bf6b60e11b612a25565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b600054600160a01b900460ff166110c65760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016111b1565b612e1a8383612e79565b6001600160a01b0383163b156110e3576001548281035b612e446000868380600101945086612cdd565b612e5857612e586368d2bf6b60e11b612a25565b818110612e31578160015414612e7257612e726000612a25565b5050505050565b6001546000829003612e9557612e9563b562e8dd60e01b612a25565b60008181526005602090815260408083206001600160a01b0387164260a01b6001881460e11b17811790915580845260069092528220805468010000000000000001860201905590819003612ef357612ef3622e076360e81b612a25565b818301825b808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4818160010191508103612ef8575060015550505050565b6001600160e01b0319811681146127ad57600080fd5b600060208284031215612f6057600080fd5b8135612f6b81612f38565b9392505050565b6001600160a01b03811681146127ad57600080fd5b60008060408385031215612f9a57600080fd5b8235612fa581612f72565b915060208301356001600160601b0381168114612fc157600080fd5b809150509250929050565b600060208284031215612fde57600080fd5b8135612f6b81612f72565b6000815180845260005b8181101561300f57602081850181015186830182015201612ff3565b506000602082860101526020601f19601f83011685010191505092915050565b602081526000612f6b6020830184612fe9565b60006020828403121561305457600080fd5b5035919050565b80358015158114612a2057600080fd5b60006020828403121561307d57600080fd5b612f6b8261305b565b6000806040838503121561309957600080fd5b82356130a481612f72565b946020939093013593505050565b60008151808452602080850194506020840160005b838110156130e757815161ffff16875295820195908201906001016130c7565b509495945050505050565b60008151808452602080850194506020840160005b838110156130e757815187529582019590820190600101613107565b6000602080835260e08301845115158285015261ffff82860151166040850152604085015163ffffffff80821660608701526060870151915060c06080870152828251808552610100880191508584019450600093505b8084101561319c5784518316825293850193600193909301929085019061317a565b5060808801519450601f199350838782030160a08801526131bd81866130b2565b945050505060a0850151818584030160c08601526131db83826130f2565b9695505050505050565b6000806000606084860312156131fa57600080fd5b833561320581612f72565b9250602084013561321581612f72565b929592945050506040919091013590565b6000806040838503121561323957600080fd5b50508035926020909101359150565b803563ffffffff81168114612a2057600080fd5b60008060006060848603121561327157600080fd5b833561327c81612f72565b92506020840135915061329160408501613248565b90509250925092565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156132d9576132d961329a565b604052919050565b600067ffffffffffffffff8311156132fb576132fb61329a565b61330e601f8401601f19166020016132b0565b905082815283838301111561332257600080fd5b828260208301376000602084830101529392505050565b60006020828403121561334b57600080fd5b813567ffffffffffffffff81111561336257600080fd5b8201601f8101841361337357600080fd5b612db8848235602084016132e1565b6000806040838503121561339557600080fd5b6130a483613248565b600080604083850312156133b157600080fd5b6133ba83613248565b9150602083013561ffff81168114612fc157600080fd5b6000602082840312156133e357600080fd5b612f6b82613248565b6020815281511515602082015263ffffffff602083015116604082015261ffff604083015116606082015260608201516080820152608082015160a0820152600060a083015160e060c0840152613447610100840182612fe9565b905060c0840151601f198483030160e08501526134648282612fe9565b95945050505050565b6000806040838503121561348057600080fd5b823561348b81612f72565b91506134996020840161305b565b90509250929050565b600080600080608085870312156134b857600080fd5b84356134c381612f72565b935060208501356134d381612f72565b925060408501359150606085013567ffffffffffffffff8111156134f657600080fd5b8501601f8101871361350757600080fd5b613516878235602084016132e1565b91505092959194509250565b600067ffffffffffffffff82111561353c5761353c61329a565b5060051b60200190565b600082601f83011261355757600080fd5b8135602061356c61356783613522565b6132b0565b8083825260208201915060208460051b87010193508684111561358e57600080fd5b602086015b848110156135b1576135a48161305b565b8352918301918301613593565b509695505050505050565b600080604083850312156135cf57600080fd5b823567ffffffffffffffff808211156135e757600080fd5b818501915085601f8301126135fb57600080fd5b8135602061360b61356783613522565b82815260059290921b8401810191818101908984111561362a57600080fd5b948201945b8386101561365157853561364281612f72565b8252948201949082019061362f565b9650508601359250508082111561366757600080fd5b5061367485828601613546565b9150509250929050565b6000806040838503121561369157600080fd5b823561369c81612f72565b91506020830135612fc181612f72565b600181811c908216806136c057607f821691505b6020821081036136e057634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600063ffffffff808316818103613715576137156136e6565b6001019392505050565b60ff8181168382160190811115610884576108846136e6565b634e487b7160e01b600052603260045260246000fd5b600060ff821660ff8103613764576137646136e6565b60010192915050565b8082028115828204841417610884576108846136e6565b6000826137a157634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115610884576108846136e6565b61ffff818116838216019080821115610e7457610e746136e6565b601f8211156110e3576000816000526020600020601f850160051c810160208610156137fd5750805b601f850160051c820191505b8181101561381c57828155600101613809565b505050505050565b815167ffffffffffffffff81111561383e5761383e61329a565b6138528161384c84546136ac565b846137d4565b602080601f831160018114613887576000841561386f5750858301515b600019600386901b1c1916600185901b17855561381c565b600085815260208120601f198616915b828110156138b657888601518255948401946001909101908401613897565b50858210156138d45787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6000602082840312156138f657600080fd5b8151612f6b81612f72565b6020808252603390820152600080516020613a708339815191526040820152720e93585e081cdd5c1c1b1e481c995858da1959606a1b606082015260800190565b604080825283519082018190526000906020906060840190828701845b828110156139845781516001600160a01b03168452928401929084019060010161395f565b5050508381038285015284518082528583019183019060005b818110156139bb57835115158352928401929184019160010161399d565b5090979650505050505050565b6000816139d7576139d76136e6565b506000190190565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906131db90830184612fe9565b600060208284031215613a2457600080fd5b8151612f6b81612f3856fe4d6169736f6e4d61726769656c615661756c744d616e616765723a3a616363654d6169736f6e4d61726769656c615661756c744d616e616765723a3a61646d694d6169736f6e4d61726769656c615661756c744d616e616765723a3a6d696e74a2646970667358221220e3e8d0501b18c07766f243995c1573dcc127dad0ca205ca1bfd4191d125c3fd864736f6c63430008170033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000001f40000000000000000000000005c8cb9d24348c0b4eda49992cb68dae050217d92000000000000000000000000d8a97632b51a9b740caeea838e2043e6e688e90b0000000000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _baseURIString (string):
Arg [1] : _royaltyBasisPoints (uint96): 500
Arg [2] : _auraContractAddress (address): 0x5C8Cb9D24348C0B4EDa49992CB68dAE050217D92
Arg [3] : _mmVaultAddress (address): 0xD8a97632B51A9B740CaEea838e2043e6E688e90b
-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [1] : 00000000000000000000000000000000000000000000000000000000000001f4
Arg [2] : 0000000000000000000000005c8cb9d24348c0b4eda49992cb68dae050217d92
Arg [3] : 000000000000000000000000d8a97632b51a9b740caeea838e2043e6e688e90b
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | Ether (ETH) | 100.00% | $3,337.74 | 8.79 | $29,338.74 |
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
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.