Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 873 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Set Approval For... | 21934450 | 50 days ago | IN | 0 ETH | 0.00005364 | ||||
Safe Transfer Fr... | 21682883 | 86 days ago | IN | 0 ETH | 0.00052754 | ||||
Set Approval For... | 21393457 | 126 days ago | IN | 0 ETH | 0.00031445 | ||||
Transfer From | 19978324 | 324 days ago | IN | 0 ETH | 0.00041517 | ||||
Set Approval For... | 19816167 | 346 days ago | IN | 0 ETH | 0.0001982 | ||||
Set Approval For... | 19448045 | 398 days ago | IN | 0 ETH | 0.00154565 | ||||
Set Approval For... | 19447984 | 398 days ago | IN | 0 ETH | 0.00163362 | ||||
Set Approval For... | 19064768 | 452 days ago | IN | 0 ETH | 0.00070043 | ||||
Set Approval For... | 19017776 | 458 days ago | IN | 0 ETH | 0.00058738 | ||||
Set Approval For... | 18938029 | 469 days ago | IN | 0 ETH | 0.00112218 | ||||
Set Approval For... | 18903366 | 474 days ago | IN | 0 ETH | 0.0002875 | ||||
Set Approval For... | 18896376 | 475 days ago | IN | 0 ETH | 0.00062782 | ||||
Set Approval For... | 18863639 | 480 days ago | IN | 0 ETH | 0.00064558 | ||||
Set Approval For... | 18831891 | 484 days ago | IN | 0 ETH | 0.0008537 | ||||
Set Approval For... | 18806479 | 488 days ago | IN | 0 ETH | 0.00104426 | ||||
Set Approval For... | 18626574 | 513 days ago | IN | 0 ETH | 0.00122789 | ||||
Set Approval For... | 18530148 | 527 days ago | IN | 0 ETH | 0.00178461 | ||||
Safe Transfer Fr... | 18530118 | 527 days ago | IN | 0 ETH | 0.00304267 | ||||
Set Approval For... | 18416766 | 542 days ago | IN | 0 ETH | 0.00136697 | ||||
Set Approval For... | 18400018 | 545 days ago | IN | 0 ETH | 0.00062657 | ||||
Set Approval For... | 18348473 | 552 days ago | IN | 0 ETH | 0.00013123 | ||||
Set Approval For... | 18348473 | 552 days ago | IN | 0 ETH | 0.00013168 | ||||
Set Approval For... | 18329195 | 555 days ago | IN | 0 ETH | 0.00050396 | ||||
Safe Transfer Fr... | 18326893 | 555 days ago | IN | 0 ETH | 0.00045493 | ||||
Set Approval For... | 18311427 | 557 days ago | IN | 0 ETH | 0.0002636 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
MaestrosTickets
Compiler Version
v0.8.15+commit.e14f2714
Optimization Enabled:
Yes with 2000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity ^0.8.15; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; //////////*////@&////////////(((& ((@( ((//////////*//////////*/////////////// //////****/////@/////////////(**/**#* ,*%///////////*/////////**/////////////// //////////////@@////**///////#/( ./*/////(//////////////////////////////// //////////////@//////*///////#/*.*/*,&@%((*////(/(/(//*///////////////////////// ////////////(&&//////////////#*(*@%*, *&/(//*///(*//////////*/*/////////////// ////////////*@////////*/*/////(*/ (/* /#*//////////////////(/(**////////////// ///////////(&@(//////////*//////(/#/#./ (#*//////////////////((*////////*/////// ////////////@#///////////////////(#. *( *#//////////////////(*///////////////// ////////#/%****/*//////////////(/%/#(*@@@@/*#*/////////////////////*/*////////// ///////*//*((/*/*////////////((/@@@%@@@((**@#@(((/////////////////////////////// ///////*@@%@@* ,(//////(((#@@@@*@/,*/#&(*@@/&@@@@*(#/*/////////////*//(///////// ///////*&@@*(, *(/*((@@@@@@@@&/* / */@@/#@@@@@/(*(/////////////////////////// ///*////(*/* *#//(@@@@((@@#@@(. * *@@@/(@@@@/((*@((//////////*/(///////////// ///////(/ /#@#@(@@@#@@/@@%@@/* *#@@((@@@@/(%@@@@/(//////////(////////////// ///////(@@%%@@@@@@(@@@@%/@@#* , /@@((@@@@&#(@@@@@#(*/////////*(/#///////*/// //***///(@@@@@@%/@@@@@@/(@@/* * (@@/(@@@@@((@@@@@@@/(////////////////////*/*/ ////*///(@@@@@@@@@@@@@//(@@(, * *@@&(%@@@@((((@@@@@@@(#////////////////////*// ///*////(@@@@@@@@@@#***(%@@@( ,.*/(@@(/@@@@(/@%(/@@@@@@((////(/(( *(*////////// //////////@@@@@@(*/**/**@@@@@@#((@@@@(@@@@%/@@((#(@@@@@@/(#@@%(/*./*(*////////// ///////*/*(/((*/*//////*#@@@@@@##@@@@/@@@@@(/@#((((@@@@@@@@@@@@#/ ,@@#((%*/#(// //////////////((/////////@@@@@#@@@@@%/@@@@@@(#(((//(*/@@@@@@@&#(&*****//*/////// ////////////*((/*///////*@@@@@%@@@@@@/@@@@@@((((@#////(########@(@##//////////// //////////////(/*///////*%@@@@@&@%(@@(@@@@@@(#@/@#(///////////////////////////// //////////////*(///////(/%@@@@@@@@@@@#/@@@@&(*#/&@&#//////*/////////////*///**// /////////*////*/////*/*(#@@@@@@@@&@@@@/@@@@(@@/(*%/@#(//////**////*/*//(/*//***/ ////////////////**///////@@@@@@@@#&@@@(@@@@(@@*&@@@@((/*/*//////////////****//// ///////*////*///*//////*/@@@@@@@@#(@@@@/@@@((@((@@@@@(//(((////////////(**////// /////////////////////////@@@@@@@@@%/@@@%/@@@((&(@@@@@((/**((/////////***//////// ////////*///////////////(@@@@@@@@@((/@@@@/%#&/((@@@@@##/////(///////*/////////// /////////////////////////%@@@@@@@@%/**@@@@@@@@/(@@@@@&(///(///////////////////// /////////////////////////(@@@@@@@@@((//@@@@@@@@/(@@@@@(///////////////////////// ///////////////////////////@@@@@@@@(////#@@@@@@@(#@@@@(#//////////////////////// /** * https://opus-labs.io/ * @title Maestro - Tickets * @notice ADMIT ONE to Maestro - Genesis mint * @author BowTiedPickle */ contract MaestrosTickets is ERC721, ERC2981, Ownable { using Counters for Counters.Counter; using SafeERC20 for IERC20; using Strings for uint256; event Mint(uint256 tokenId, uint8 tier); event NewRoot(bytes32 oldRoot, bytes32 newRoot); event NewURI(string oldURI, string newURI); event NewRoyalty(uint96 _newRoyalty); event PhaseStatus(uint256 phase, bool oldStatus, bool newStatus); event TierInfoUpdated( uint256 indexed tier, uint16 newSupply, uint64 newPrice, uint16 newWeight ); event Withdrawal(uint256 _balance); event SoulbindReleased(); event URIFrozen(string _finalURI); Counters.Counter internal nextId; uint8 public constant TICKET_DIAMOND = 1; uint8 public constant TICKET_GOLD = 2; uint8 public constant TICKET_SILVER = 3; uint8 public constant TICKET_BRONZE = 4; uint8 public constant MAX_WEIGHT_PER_USER = 12; struct TierInfo { uint16 maxSupply; uint16 minted; uint64 price; uint16 ticketWeight; } mapping(uint256 => TierInfo) public tiers; bytes32 public whitelistMerkleRoot; bytes32 public claimlistMerkleRoot; mapping(address => uint256) public userToWeight; mapping(address => bool) public claimed; mapping(uint256 => uint8) public ticketTier; string public baseURI; bool public frozen; IERC20 public immutable USDC; bool public claimActive; bool public whitelistActive; bool public soulbound = true; /** * @param _USDC Address of USDC implementation * @param _weights Array of ticket weights * @param _prices Array of ticket prices denominated in USDC (6 decimals) * @param _supplies Array of max supplies of each ticket tier */ constructor( IERC20 _USDC, uint16[] memory _weights, uint64[] memory _prices, uint16[] memory _supplies ) ERC721("Maestro - Tickets", "MTKT") { uint256 len = _weights.length; require( _prices.length == len && _supplies.length == len && len == 4, "!len" ); nextId.increment(); USDC = _USDC; _setDefaultRoyalty(msg.sender, 500); for (uint256 i; i < len; ++i) { TierInfo storage tier = tiers[i + 1]; tier.ticketWeight = _weights[i]; tier.price = _prices[i]; tier.maxSupply = _supplies[i]; emit TierInfoUpdated(i, _supplies[i], _prices[i], _weights[i]); } } // ----- Public Functions ----- /** * @notice Purchase an NFT * @dev Approve this contract for the desired amount of USDC first * @param _to NFT destination address * @param _tier Ticket tier * @param _qty Number of tickets to mint * @param _proof Merkle proof of whitelist */ function mint( address _to, uint8 _tier, uint8 _qty, bytes32[] calldata _proof ) external { require(whitelistActive, "!active"); require(_tier <= TICKET_BRONZE && _tier > 0, "!tier"); require(_qty > 0, "!zeroQty"); TierInfo storage tier = tiers[_tier]; uint256 weight = tier.ticketWeight * _qty; require(userToWeight[_to] + weight <= MAX_WEIGHT_PER_USER, "!userMax"); require(tier.minted + _qty <= tier.maxSupply, "!supply"); bytes32 leaf = keccak256(abi.encodePacked(_to)); require( MerkleProof.verify(_proof, whitelistMerkleRoot, leaf), "!proof" ); USDC.safeTransferFrom(msg.sender, address(this), tier.price * _qty); tier.minted += _qty; userToWeight[_to] += weight; mintInternal(_to, _qty, _tier); } /** * @notice Claim a free NFT * @param _to NFT destination address * @param _tier Ticket tier * @param _proof Merkle proof of whitelist */ function claim( address _to, uint8 _tier, bytes32[] calldata _proof ) external { require(claimActive, "!active"); require(_tier <= TICKET_BRONZE && _tier > 0, "!tier"); require(!claimed[_to], "!claimed"); TierInfo storage tier = tiers[_tier]; require(tier.minted + 1 <= tier.maxSupply, "!supply"); bytes32 leaf = keccak256(abi.encodePacked(_to, _tier)); require( MerkleProof.verify(_proof, claimlistMerkleRoot, leaf), "!proof" ); tier.minted += 1; claimed[_to] = true; mintInternal(_to, 1, _tier); } // ----- Internal Functions ----- function mintInternal( address _to, uint256 _qty, uint8 _tier ) internal { for (uint256 i; i < _qty; ++i) { uint256 tokenId = nextId.current(); nextId.increment(); ticketTier[tokenId] = _tier; _mint(_to, tokenId); emit Mint(tokenId, _tier); } } // ----- View Functions ----- /** * @notice View the total number of NFTs minted * @return Total number of NFTs minted */ function totalSupply() external view returns (uint256) { return nextId.current() - 1; } /** * @notice View the number of NFTs minted in each tier * @return Array of the number of NFTs minted in each tier */ function mintedByTier() external view returns (uint256[] memory) { uint256[] memory minted = new uint256[](4); for (uint256 i; i < 4; ++i) { minted[i] = tiers[i + 1].minted; } return minted; } /** * @notice View the number of NFTs remaining in each tier * @return Array of the number of NFTs remaining in each tier */ function remainingByTier() external view returns (uint256[] memory) { uint256[] memory remaining = new uint256[](4); for (uint256 i; i < 4; ++i) { remaining[i] = tiers[i + 1].maxSupply - tiers[i + 1].minted; } return remaining; } // ----- Admin Functions ----- /** * @notice Edit the parameters of a tier * @param _tier The tier ID to modify * @param _newMaxSupply New maximum supply of the ticket tier * @param _newPrice New price of the ticket tier * @param _newWeight New weight cost of the ticket tier */ function editTier( uint8 _tier, uint16 _newMaxSupply, uint16 _newPrice, uint16 _newWeight ) external onlyOwner { require(_tier <= TICKET_BRONZE && _tier > 0, "!tier"); TierInfo storage tier = tiers[_tier]; require(_newMaxSupply >= tier.minted, "!newSupply"); tier.maxSupply = _newMaxSupply; tier.price = _newPrice; tier.ticketWeight = _newWeight; emit TierInfoUpdated(_tier, _newMaxSupply, _newPrice, _newWeight); } /** * @notice Set one of the merkle roots * @param _ID 0 for whitelist root, 1 for claimlist root * @param _newRoot New Merkle tree root */ function setMerkleRoot(uint256 _ID, bytes32 _newRoot) external onlyOwner { require(_ID < 2, "!id"); if (_ID == 0) { emit NewRoot(whitelistMerkleRoot, _newRoot); whitelistMerkleRoot = _newRoot; } else { emit NewRoot(claimlistMerkleRoot, _newRoot); claimlistMerkleRoot = _newRoot; } } /** * @notice Set the sale activity status of whitelist or claimlist * @param _ID 0 for whitelist, 1 for claimlist * @param _newStatus true for phase active, false for inactive */ function setPhaseStatus(uint256 _ID, bool _newStatus) external onlyOwner { require(_ID < 2, "!id"); if (_ID == 0) { emit PhaseStatus(_ID, whitelistActive, _newStatus); whitelistActive = _newStatus; } else { emit PhaseStatus(_ID, claimActive, _newStatus); claimActive = _newStatus; } } /** * @notice Withdraw profits from the contract */ function withdraw() external onlyOwner { uint256 balance = USDC.balanceOf(address(this)); USDC.transfer(owner(), balance); emit Withdrawal(balance); } /** * @notice Sets a new royalty numerator * @dev Cannot exceed 10% * @param _royaltyBPS New royalty, denominated in BPS (10000 = 100%) * @return True on success */ function setRoyalty(uint96 _royaltyBPS) external onlyOwner returns (bool) { require(_royaltyBPS <= 1000, "!bps"); _setDefaultRoyalty(owner(), _royaltyBPS); emit NewRoyalty(_royaltyBPS); return true; } /** * @notice Set a new base URI * @param _newURI new URI string */ function setURI(string memory _newURI) external onlyOwner { require(!frozen, "!frozen"); emit NewURI(baseURI, _newURI); baseURI = _newURI; } /** * @notice Freeze the URI, preventing further changes */ function freezeURI() external onlyOwner { require(!frozen, "!frozen"); frozen = true; emit URIFrozen(baseURI); } /** * @notice Release the soulbind, allowing token transfers * @dev Irreversible, double check before calling! */ function releaseSoulbind() external onlyOwner { require(soulbound, "!soulbound"); soulbound = false; emit SoulbindReleased(); } // ----- Overrides ----- /// @inheritdoc ERC721 function _baseURI() internal view override returns (string memory) { return baseURI; } /// @inheritdoc ERC721 function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { _requireMinted(tokenId); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString(), ".json")) : ""; } /// @inheritdoc ERC721 function _transfer( address from, address to, uint256 tokenId ) internal override { require(!soulbound, "!soulbound"); super._transfer(from, to, tokenId); } /// @inheritdoc ERC721 function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC2981) returns (bool) { return interfaceId == type(ERC2981).interfaceId || ERC721.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: address zero is not a valid owner"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: invalid token ID"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { _requireMinted(tokenId); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not token owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { _requireMinted(tokenId); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner nor approved"); _safeTransfer(from, to, tokenId, data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { address owner = ERC721.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits an {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Reverts if the `tokenId` has not been minted yet. */ function _requireMinted(uint256 tokenId) internal view virtual { require(_exists(tokenId), "ERC721: invalid token ID"); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.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 // OpenZeppelin Contracts (last updated v4.7.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Calldata version of {verify} * * _Available since v4.7._ */ function verifyCalldata( bytes32[] calldata proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} * * _Available since v4.7._ */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be proved to be a part of a Merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * _Available since v4.7._ */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * _Available since v4.7._ */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and the sibling nodes in `proof`, * consuming from one or the other at each step according to the instructions given by * `proofFlags`. * * _Available since v4.7._ */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof} * * _Available since v4.7._ */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
{ "optimizer": { "enabled": true, "runs": 2000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"contract IERC20","name":"_USDC","type":"address"},{"internalType":"uint16[]","name":"_weights","type":"uint16[]"},{"internalType":"uint64[]","name":"_prices","type":"uint64[]"},{"internalType":"uint16[]","name":"_supplies","type":"uint16[]"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint8","name":"tier","type":"uint8"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"oldRoot","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"newRoot","type":"bytes32"}],"name":"NewRoot","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint96","name":"_newRoyalty","type":"uint96"}],"name":"NewRoyalty","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"oldURI","type":"string"},{"indexed":false,"internalType":"string","name":"newURI","type":"string"}],"name":"NewURI","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":"uint256","name":"phase","type":"uint256"},{"indexed":false,"internalType":"bool","name":"oldStatus","type":"bool"},{"indexed":false,"internalType":"bool","name":"newStatus","type":"bool"}],"name":"PhaseStatus","type":"event"},{"anonymous":false,"inputs":[],"name":"SoulbindReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tier","type":"uint256"},{"indexed":false,"internalType":"uint16","name":"newSupply","type":"uint16"},{"indexed":false,"internalType":"uint64","name":"newPrice","type":"uint64"},{"indexed":false,"internalType":"uint16","name":"newWeight","type":"uint16"}],"name":"TierInfoUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"_finalURI","type":"string"}],"name":"URIFrozen","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_balance","type":"uint256"}],"name":"Withdrawal","type":"event"},{"inputs":[],"name":"MAX_WEIGHT_PER_USER","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TICKET_BRONZE","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TICKET_DIAMOND","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TICKET_GOLD","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TICKET_SILVER","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"USDC","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint8","name":"_tier","type":"uint8"},{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimlistMerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"_tier","type":"uint8"},{"internalType":"uint16","name":"_newMaxSupply","type":"uint16"},{"internalType":"uint16","name":"_newPrice","type":"uint16"},{"internalType":"uint16","name":"_newWeight","type":"uint16"}],"name":"editTier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"freezeURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"frozen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint8","name":"_tier","type":"uint8"},{"internalType":"uint8","name":"_qty","type":"uint8"},{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintedByTier","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"releaseSoulbind","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"remainingByTier","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_ID","type":"uint256"},{"internalType":"bytes32","name":"_newRoot","type":"bytes32"}],"name":"setMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_ID","type":"uint256"},{"internalType":"bool","name":"_newStatus","type":"bool"}],"name":"setPhaseStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint96","name":"_royaltyBPS","type":"uint96"}],"name":"setRoyalty","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newURI","type":"string"}],"name":"setURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"soulbound","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"ticketTier","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tiers","outputs":[{"internalType":"uint16","name":"maxSupply","type":"uint16"},{"internalType":"uint16","name":"minted","type":"uint16"},{"internalType":"uint64","name":"price","type":"uint64"},{"internalType":"uint16","name":"ticketWeight","type":"uint16"}],"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":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userToWeight","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whitelistActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whitelistMerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a06040526011805463ff000000191663010000001790553480156200002457600080fd5b50604051620040b8380380620040b8833981016040819052620000479162000574565b604051806040016040528060118152602001704d61657374726f202d205469636b65747360781b81525060405180604001604052806004815260200163135512d560e21b81525081600090816200009f919062000723565b506001620000ae828262000723565b505050620000cb620000c56200032060201b60201c565b62000324565b8251825181148015620000de5750808251145b8015620000eb5750806004145b6200012b5760405162461bcd60e51b8152600401620001229060208082526004908201526310b632b760e11b604082015260600190565b60405180910390fd5b6200014260096200037660201b62001eab1760201c565b6001600160a01b0385166080526200015d336101f46200037f565b60005b8181101562000314576000600a816200017b84600162000805565b81526020019081526020016000209050858281518110620001a057620001a062000820565b6020908102919091010151815461ffff9091166c010000000000000000000000000261ffff60601b199091161781558451859083908110620001e657620001e662000820565b602090810291909101015181546001600160401b0390911664010000000002600160201b600160601b031990911617815583518490839081106200022e576200022e62000820565b6020908102919091010151815461ffff191661ffff909116178155835182907fde193dcff76a88d52adbb377a8c539b51d5fe8c48477b8c21f9e84d92486cacf9086908390811062000284576200028462000820565b6020026020010151878581518110620002a157620002a162000820565b6020026020010151898681518110620002be57620002be62000820565b6020026020010151604051620002f89392919061ffff93841681526001600160401b03929092166020830152909116604082015260600190565b60405180910390a2506200030c8162000836565b905062000160565b50505050505062000852565b3390565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80546001019055565b6127106001600160601b0382161115620003ef5760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b606482015260840162000122565b6001600160a01b038216620004475760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c696420726563656976657200000000000000604482015260640162000122565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600655565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715620004c157620004c162000480565b604052919050565b60006001600160401b03821115620004e557620004e562000480565b5060051b60200190565b600082601f8301126200050157600080fd5b815160206200051a6200051483620004c9565b62000496565b82815260059290921b840181019181810190868411156200053a57600080fd5b8286015b848110156200056957805161ffff811681146200055b5760008081fd5b83529183019183016200053e565b509695505050505050565b600080600080608085870312156200058b57600080fd5b84516001600160a01b0381168114620005a357600080fd5b602086810151919550906001600160401b0380821115620005c357600080fd5b620005d189838a01620004ef565b95506040880151915080821115620005e857600080fd5b818801915088601f830112620005fd57600080fd5b81516200060e6200051482620004c9565b81815260059190911b8301840190848101908b8311156200062e57600080fd5b938501935b828510156200065e57845184811681146200064e5760008081fd5b8252938501939085019062000633565b60608b015190975094505050808311156200067857600080fd5b50506200068887828801620004ef565b91505092959194509250565b600181811c90821680620006a957607f821691505b602082108103620006ca57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200071e57600081815260208120601f850160051c81016020861015620006f95750805b601f850160051c820191505b818110156200071a5782815560010162000705565b5050505b505050565b81516001600160401b038111156200073f576200073f62000480565b620007578162000750845462000694565b84620006d0565b602080601f8311600181146200078f5760008415620007765750858301515b600019600386901b1c1916600185901b1785556200071a565b600085815260208120601f198616915b82811015620007c0578886015182559484019460019091019084016200079f565b5085821015620007df5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b600082198211156200081b576200081b620007ef565b500190565b634e487b7160e01b600052603260045260246000fd5b6000600182016200084b576200084b620007ef565b5060010190565b60805161383562000883600039600081816105d201528181610e3d01528181610eb401526115d801526138356000f3fe608060405234801561001057600080fd5b50600436106103155760003560e01c806378419144116101a7578063b88d4fde116100ee578063d4a6a2fd11610097578063e985e9c511610071578063e985e9c5146106ea578063f2fde38b14610726578063f944b8fb1461073957600080fd5b8063d4a6a2fd146106a5578063da5a7e8d146106b7578063e2387028146106d757600080fd5b8063c87b56dd116100c8578063c87b56dd1461065c578063c884ef831461066f578063cac926691461069257600080fd5b8063b88d4fde14610639578063ba808f341461064c578063c793803c1461065457600080fd5b80638da5cb5b11610150578063a16062ae1161012a578063a16062ae14610615578063a22cb4651461061d578063aa98e0c61461063057600080fd5b80638da5cb5b146105f457806395d89b4114610605578063997bf9f61461060d57600080fd5b80638108a048116101815780638108a048146105b05780638450456f146105c557806389a30271146105cd57600080fd5b806378419144146105825780637b75403c1461058a5780637fde782c1461059d57600080fd5b806323b872dd1161026b5780635bef6364116102145780636c0360eb116101ee5780636c0360eb1461055f57806370a0823114610567578063715018a61461057a57600080fd5b80635bef63641461050f5780636352211e1461054457806366a7481d1461055757600080fd5b80632e60b6f8116102455780632e60b6f8146104e15780633ccfd60b146104f457806342842e0e146104fc57600080fd5b806323b872dd146104935780632560e376146104a65780632a55205a146104af57600080fd5b806306fdde03116102cd5780630fad0f51116102a75780630fad0f511461045657806318160ddd1461046a57806318712c211461048057600080fd5b806306fdde0314610403578063081812fc14610418578063095ea7b31461044357600080fd5b806302fe5305116102fe57806302fe530514610355578063039af9eb1461036a578063054f7d9c146103f657600080fd5b806301ffc9a71461031a57806302ce581314610342575b600080fd5b61032d610328366004612df3565b610741565b60405190151581526020015b60405180910390f35b60115461032d9062010000900460ff1681565b610368610363366004612e9c565b610785565b005b6103be610378366004612ee5565b600a6020526000908152604090205461ffff8082169162010000810482169167ffffffffffffffff640100000000830416916c0100000000000000000000000090041684565b6040805161ffff9586168152938516602085015267ffffffffffffffff90921691830191909152919091166060820152608001610339565b60115461032d9060ff1681565b61040b61082f565b6040516103399190612f56565b61042b610426366004612ee5565b6108c1565b6040516001600160a01b039091168152602001610339565b610368610451366004612f80565b6108e8565b60115461032d906301000000900460ff1681565b610472610a19565b604051908152602001610339565b61036861048e366004612faa565b610a35565b6103686104a1366004612fcc565b610b19565b610472600c5481565b6104c26104bd366004612faa565b610ba0565b604080516001600160a01b039093168352602083019190915201610339565b6103686104ef36600461302b565b610c7f565b610368610e04565b61036861050a366004612fcc565b610f9b565b61053261051d366004612ee5565b600f6020526000908152604090205460ff1681565b60405160ff9091168152602001610339565b61042b610552366004612ee5565b610fb6565b610532600481565b61040b61101b565b61047261057536600461307f565b6110a9565b610368611143565b610532600c81565b6103686105983660046130a8565b611157565b6103686105ab36600461311d565b6112c1565b6105b8611698565b6040516103399190613193565b6105b861175c565b61042b7f000000000000000000000000000000000000000000000000000000000000000081565b6008546001600160a01b031661042b565b61040b6117ef565b610532600281565b610532600381565b61036861062b3660046131d7565b6117fe565b610472600b5481565b610368610647366004613203565b611809565b610532600181565b610368611897565b61040b61066a366004612ee5565b61193a565b61032d61067d36600461307f565b600e6020526000908152604090205460ff1681565b61032d6106a036600461327f565b6119a1565b60115461032d90610100900460ff1681565b6104726106c536600461307f565b600d6020526000908152604090205481565b6103686106e53660046132ad565b611a72565b61032d6106f836600461330e565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b61036861073436600461307f565b611d67565b610368611df7565b60006001600160e01b031982167f2baae9fd00000000000000000000000000000000000000000000000000000000148061077f575061077f82611eb4565b92915050565b61078d611f4f565b60115460ff16156107e55760405162461bcd60e51b815260206004820152600760248201527f2166726f7a656e0000000000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b7feb0ff494c0855e7c27233e02cb7987f997be6005d24b09af504d00f2e349c8916010826040516108179291906133f2565b60405180910390a1601061082b8282613466565b5050565b60606000805461083e90613341565b80601f016020809104026020016040519081016040528092919081815260200182805461086a90613341565b80156108b75780601f1061088c576101008083540402835291602001916108b7565b820191906000526020600020905b81548152906001019060200180831161089a57829003601f168201915b5050505050905090565b60006108cc82611fa9565b506000908152600460205260409020546001600160a01b031690565b60006108f382610fb6565b9050806001600160a01b0316836001600160a01b03160361097c5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f720000000000000000000000000000000000000000000000000000000000000060648201526084016107dc565b336001600160a01b0382161480610998575061099881336106f8565b610a0a5760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c000060648201526084016107dc565b610a14838361200d565b505050565b60006001610a2660095490565b610a30919061353c565b905090565b610a3d611f4f565b60028210610a8d5760405162461bcd60e51b815260206004820152600360248201527f216964000000000000000000000000000000000000000000000000000000000060448201526064016107dc565b81600003610ad757600b5460408051918252602082018390527f191a34cdab35c3a3a2ef7ba4d54d4e55a5416f6807b90652ee8ee0be41699583910160405180910390a1600b5550565b600c5460408051918252602082018390527f191a34cdab35c3a3a2ef7ba4d54d4e55a5416f6807b90652ee8ee0be41699583910160405180910390a1600c5550565b610b233382612088565b610b955760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206e6f7220617070726f76656400000000000000000000000000000000000060648201526084016107dc565b610a14838383612107565b60008281526007602090815260408083208151808301909252546001600160a01b038116808352740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff16928201929092528291610c415750604080518082019091526006546001600160a01b03811682527401000000000000000000000000000000000000000090046bffffffffffffffffffffffff1660208201525b602081015160009061271090610c65906bffffffffffffffffffffffff1687613553565b610c6f9190613588565b91519350909150505b9250929050565b610c87611f4f565b600460ff851611801590610c9e575060008460ff16115b610cd25760405162461bcd60e51b815260206004820152600560248201526410ba34b2b960d91b60448201526064016107dc565b60ff84166000908152600a60205260409020805461ffff6201000090910481169085161015610d435760405162461bcd60e51b815260206004820152600a60248201527f216e6577537570706c790000000000000000000000000000000000000000000060448201526064016107dc565b805461ffff8581167fffffffffffffffffffffffffffffffffffffffff0000000000000000ffff000090921682178582166401000000008102919091177fffffffffffffffffffffffffffffffffffff0000ffffffffffffffffffffffff166c0100000000000000000000000092861692830217845560408051938452602084019190915282015260ff8616907fde193dcff76a88d52adbb377a8c539b51d5fe8c48477b8c21f9e84d92486cacf9060600160405180910390a25050505050565b610e0c611f4f565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610e8c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eb0919061359c565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb610ef36008546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018490526044016020604051808303816000875af1158015610f40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f6491906135b5565b506040518181527f4e70a604b23a8edee2b1d0a656e9b9c00b73ad8bb1afc2c59381ee9f69197de79060200160405180910390a150565b610a1483838360405180602001604052806000815250611809565b6000818152600260205260408120546001600160a01b03168061077f5760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e204944000000000000000060448201526064016107dc565b6010805461102890613341565b80601f016020809104026020016040519081016040528092919081815260200182805461105490613341565b80156110a15780601f10611076576101008083540402835291602001916110a1565b820191906000526020600020905b81548152906001019060200180831161108457829003601f168201915b505050505081565b60006001600160a01b0382166111275760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e6572000000000000000000000000000000000000000000000060648201526084016107dc565b506001600160a01b031660009081526003602052604090205490565b61114b611f4f565b611155600061216c565b565b61115f611f4f565b600282106111af5760405162461bcd60e51b815260206004820152600360248201527f216964000000000000000000000000000000000000000000000000000000000060448201526064016107dc565b8160000361123d57601154604080518481526201000090920460ff1615156020830152821515908201527f79363225105b8caa024b942af64e1f345181171bdf556a65c5621e593b006e729060600160405180910390a16011805482151562010000027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffff9091161790555050565b6011546040805184815261010090920460ff1615156020830152821515908201527f79363225105b8caa024b942af64e1f345181171bdf556a65c5621e593b006e729060600160405180910390a160118054821515610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff9091161790555050565b60115462010000900460ff166113195760405162461bcd60e51b815260206004820152600760248201527f216163746976650000000000000000000000000000000000000000000000000060448201526064016107dc565b600460ff851611801590611330575060008460ff16115b6113645760405162461bcd60e51b815260206004820152600560248201526410ba34b2b960d91b60448201526064016107dc565b60008360ff16116113b75760405162461bcd60e51b815260206004820152600860248201527f217a65726f51747900000000000000000000000000000000000000000000000060448201526064016107dc565b60ff8481166000908152600a60205260408120805490926113ef91908716906c01000000000000000000000000900461ffff166135d2565b6001600160a01b0388166000908152600d602052604090205461ffff919091169150600c9061141f9083906135fc565b111561146d5760405162461bcd60e51b815260206004820152600860248201527f21757365724d617800000000000000000000000000000000000000000000000060448201526064016107dc565b815461ffff8082169161148b9160ff89169162010000900416613614565b61ffff1611156114dd5760405162461bcd60e51b815260206004820152600760248201527f21737570706c790000000000000000000000000000000000000000000000000060448201526064016107dc565b6040516bffffffffffffffffffffffff19606089901b16602082015260009060340160405160208183030381529060405280519060200120905061155885858080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600b5491508490506121cb565b6115a45760405162461bcd60e51b815260206004820152600660248201527f2170726f6f66000000000000000000000000000000000000000000000000000060448201526064016107dc565b825461160a90339030906115ce9060ff8b1690640100000000900467ffffffffffffffff1661363a565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001692919067ffffffffffffffff166121e3565b825460ff871690849060029061162b90849062010000900461ffff16613614565b92506101000a81548161ffff021916908361ffff16021790555081600d60008a6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461167a91906135fc565b9091555061168e90508860ff88168961226b565b5050505050505050565b60408051600480825260a08201909252606091600091906020820160808036833701905050905060005b600481101561175657600a60006116da8360016135fc565b8152602081019190915260400160009081205462010000900461ffff1690600a906117068460016135fc565b8152602081019190915260400160002054611725919061ffff16613661565b61ffff1682828151811061173b5761173b613684565b602090810291909101015261174f8161369a565b90506116c2565b50919050565b60408051600480825260a08201909252606091600091906020820160808036833701905050905060005b600481101561175657600a600061179e8360016135fc565b815260200190815260200160002060000160029054906101000a900461ffff1661ffff168282815181106117d4576117d4613684565b60209081029190910101526117e88161369a565b9050611786565b60606001805461083e90613341565b61082b338383612302565b6118133383612088565b6118855760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206e6f7220617070726f76656400000000000000000000000000000000000060648201526084016107dc565b611891848484846123d0565b50505050565b61189f611f4f565b60115460ff16156118f25760405162461bcd60e51b815260206004820152600760248201527f2166726f7a656e0000000000000000000000000000000000000000000000000060448201526064016107dc565b6011805460ff191660011790556040517f80769e0fec5395870efbeb7790ddbe4c3669e465667108c34094cbcdd7c0ac5090611930906010906136b4565b60405180910390a1565b606061194582611fa9565b60006010805461195490613341565b905011611970576040518060200160405280600081525061077f565b601061197b83612459565b60405160200161198c9291906136c7565b60405160208183030381529060405292915050565b60006119ab611f4f565b6103e8826bffffffffffffffffffffffff161115611a0d5760405162461bcd60e51b81526004016107dc9060208082526004908201527f2162707300000000000000000000000000000000000000000000000000000000604082015260600190565b611a28611a226008546001600160a01b031690565b8361258e565b6040516bffffffffffffffffffffffff831681527f3cf4fec9aae458c3a169ef0c25423c15fbfc6175238fa756786f345d9d9fdbc99060200160405180910390a15060015b919050565b601154610100900460ff16611ac95760405162461bcd60e51b815260206004820152600760248201527f216163746976650000000000000000000000000000000000000000000000000060448201526064016107dc565b600460ff841611801590611ae0575060008360ff16115b611b145760405162461bcd60e51b815260206004820152600560248201526410ba34b2b960d91b60448201526064016107dc565b6001600160a01b0384166000908152600e602052604090205460ff1615611b7d5760405162461bcd60e51b815260206004820152600860248201527f21636c61696d656400000000000000000000000000000000000000000000000060448201526064016107dc565b60ff83166000908152600a60205260409020805461ffff80821691611bab9162010000909104166001613614565b61ffff161115611bfd5760405162461bcd60e51b815260206004820152600760248201527f21737570706c790000000000000000000000000000000000000000000000000060448201526064016107dc565b6040516bffffffffffffffffffffffff19606087901b1660208201527fff0000000000000000000000000000000000000000000000000000000000000060f886901b166034820152600090603501604051602081830303815290604052805190602001209050611ca484848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600c5491508490506121cb565b611cf05760405162461bcd60e51b815260206004820152600660248201527f2170726f6f66000000000000000000000000000000000000000000000000000060448201526064016107dc565b81546001908390600290611d0f90849062010000900461ffff16613614565b825461ffff9182166101009390930a9283029190920219909116179055506001600160a01b0386166000908152600e60205260409020805460ff19166001908117909155611d5f9087908761226b565b505050505050565b611d6f611f4f565b6001600160a01b038116611deb5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016107dc565b611df48161216c565b50565b611dff611f4f565b6011546301000000900460ff16611e585760405162461bcd60e51b815260206004820152600a60248201527f21736f756c626f756e640000000000000000000000000000000000000000000060448201526064016107dc565b601180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffff1690556040517f7ee2b9314e17d216faa474818af3bfd5ee91d9e2f31a2fb4fbe5a72e0141f09090600090a1565b80546001019055565b60006001600160e01b031982167f80ac58cd000000000000000000000000000000000000000000000000000000001480611f1757506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b8061077f57507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b031983161461077f565b6008546001600160a01b031633146111555760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107dc565b6000818152600260205260409020546001600160a01b0316611df45760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e204944000000000000000060448201526064016107dc565b6000818152600460205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038416908117909155819061204f82610fb6565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008061209483610fb6565b9050806001600160a01b0316846001600160a01b031614806120db57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b806120ff5750836001600160a01b03166120f4846108c1565b6001600160a01b0316145b949350505050565b6011546301000000900460ff16156121615760405162461bcd60e51b815260206004820152600a60248201527f21736f756c626f756e640000000000000000000000000000000000000000000060448201526064016107dc565b610a148383836126b9565b600880546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000826121d88584612893565b1490505b9392505050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526118919085906128e0565b60005b8281101561189157600061228160095490565b9050612291600980546001019055565b6000818152600f60205260409020805460ff191660ff85161790556122b685826129c5565b6040805182815260ff851660208201527fbc4ddb52c9c61a3a738bbaefba9e77197ec2ed649fc045814492d5dc8e8bb4bd910160405180910390a1506122fb8161369a565b905061226e565b816001600160a01b0316836001600160a01b0316036123635760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016107dc565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6123db848484612107565b6123e784848484612b14565b6118915760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e746572000000000000000000000000000060648201526084016107dc565b60608160000361249c57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156124c657806124b08161369a565b91506124bf9050600a83613588565b91506124a0565b60008167ffffffffffffffff8111156124e1576124e1612e10565b6040519080825280601f01601f19166020018201604052801561250b576020820181803683370190505b5090505b84156120ff5761252060018361353c565b915061252d600a86613776565b6125389060306135fc565b60f81b81838151811061254d5761254d613684565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350612587600a86613588565b945061250f565b6127106bffffffffffffffffffffffff821611156126145760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c2065786365656460448201527f2073616c6550726963650000000000000000000000000000000000000000000060648201526084016107dc565b6001600160a01b03821661266a5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c69642072656365697665720000000000000060448201526064016107dc565b604080518082019091526001600160a01b039092168083526bffffffffffffffffffffffff90911660209092018290527401000000000000000000000000000000000000000090910217600655565b826001600160a01b03166126cc82610fb6565b6001600160a01b0316146127485760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e657200000000000000000000000000000000000000000000000000000060648201526084016107dc565b6001600160a01b0382166127c35760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016107dc565b6127ce60008261200d565b6001600160a01b03831660009081526003602052604081208054600192906127f790849061353c565b90915550506001600160a01b03821660009081526003602052604081208054600192906128259084906135fc565b9091555050600081815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600081815b84518110156128d8576128c4828683815181106128b7576128b7613684565b6020026020010151612c9d565b9150806128d08161369a565b915050612898565b509392505050565b6000612935826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612cc99092919063ffffffff16565b805190915015610a14578080602001905181019061295391906135b5565b610a145760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016107dc565b6001600160a01b038216612a1b5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016107dc565b6000818152600260205260409020546001600160a01b031615612a805760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016107dc565b6001600160a01b0382166000908152600360205260408120805460019290612aa99084906135fc565b9091555050600081815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001600160a01b0384163b15612c92576040517f150b7a020000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063150b7a0290612b7190339089908890889060040161378a565b6020604051808303816000875af1925050508015612bac575060408051601f3d908101601f19168201909252612ba9918101906137c6565b60015b612c5f573d808015612bda576040519150601f19603f3d011682016040523d82523d6000602084013e612bdf565b606091505b508051600003612c575760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e746572000000000000000000000000000060648201526084016107dc565b805181602001fd5b6001600160e01b0319167f150b7a02000000000000000000000000000000000000000000000000000000001490506120ff565b506001949350505050565b6000818310612cb95760008281526020849052604090206121dc565b5060009182526020526040902090565b60606120ff8484600085856001600160a01b0385163b612d2b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016107dc565b600080866001600160a01b03168587604051612d4791906137e3565b60006040518083038185875af1925050503d8060008114612d84576040519150601f19603f3d011682016040523d82523d6000602084013e612d89565b606091505b5091509150612d99828286612da4565b979650505050505050565b60608315612db35750816121dc565b825115612dc35782518084602001fd5b8160405162461bcd60e51b81526004016107dc9190612f56565b6001600160e01b031981168114611df457600080fd5b600060208284031215612e0557600080fd5b81356121dc81612ddd565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115612e4157612e41612e10565b604051601f8501601f19908116603f01168101908282118183101715612e6957612e69612e10565b81604052809350858152868686011115612e8257600080fd5b858560208301376000602087830101525050509392505050565b600060208284031215612eae57600080fd5b813567ffffffffffffffff811115612ec557600080fd5b8201601f81018413612ed657600080fd5b6120ff84823560208401612e26565b600060208284031215612ef757600080fd5b5035919050565b60005b83811015612f19578181015183820152602001612f01565b838111156118915750506000910152565b60008151808452612f42816020860160208601612efe565b601f01601f19169290920160200192915050565b6020815260006121dc6020830184612f2a565b80356001600160a01b0381168114611a6d57600080fd5b60008060408385031215612f9357600080fd5b612f9c83612f69565b946020939093013593505050565b60008060408385031215612fbd57600080fd5b50508035926020909101359150565b600080600060608486031215612fe157600080fd5b612fea84612f69565b9250612ff860208501612f69565b9150604084013590509250925092565b803560ff81168114611a6d57600080fd5b803561ffff81168114611a6d57600080fd5b6000806000806080858703121561304157600080fd5b61304a85613008565b935061305860208601613019565b925061306660408601613019565b915061307460608601613019565b905092959194509250565b60006020828403121561309157600080fd5b6121dc82612f69565b8015158114611df457600080fd5b600080604083850312156130bb57600080fd5b8235915060208301356130cd8161309a565b809150509250929050565b60008083601f8401126130ea57600080fd5b50813567ffffffffffffffff81111561310257600080fd5b6020830191508360208260051b8501011115610c7857600080fd5b60008060008060006080868803121561313557600080fd5b61313e86612f69565b945061314c60208701613008565b935061315a60408701613008565b9250606086013567ffffffffffffffff81111561317657600080fd5b613182888289016130d8565b969995985093965092949392505050565b6020808252825182820181905260009190848201906040850190845b818110156131cb578351835292840192918401916001016131af565b50909695505050505050565b600080604083850312156131ea57600080fd5b6131f383612f69565b915060208301356130cd8161309a565b6000806000806080858703121561321957600080fd5b61322285612f69565b935061323060208601612f69565b925060408501359150606085013567ffffffffffffffff81111561325357600080fd5b8501601f8101871361326457600080fd5b61327387823560208401612e26565b91505092959194509250565b60006020828403121561329157600080fd5b81356bffffffffffffffffffffffff811681146121dc57600080fd5b600080600080606085870312156132c357600080fd5b6132cc85612f69565b93506132da60208601613008565b9250604085013567ffffffffffffffff8111156132f657600080fd5b613302878288016130d8565b95989497509550505050565b6000806040838503121561332157600080fd5b61332a83612f69565b915061333860208401612f69565b90509250929050565b600181811c9082168061335557607f821691505b60208210810361175657634e487b7160e01b600052602260045260246000fd5b6000815461338281613341565b80855260206001838116801561339f57600181146133b9576133e7565b60ff198516838901528284151560051b89010195506133e7565b866000528260002060005b858110156133df5781548a82018601529083019084016133c4565b890184019650505b505050505092915050565b6040815260006134056040830185613375565b82810360208401526134178185612f2a565b95945050505050565b601f821115610a1457600081815260208120601f850160051c810160208610156134475750805b601f850160051c820191505b81811015611d5f57828155600101613453565b815167ffffffffffffffff81111561348057613480612e10565b6134948161348e8454613341565b84613420565b602080601f8311600181146134c957600084156134b15750858301515b600019600386901b1c1916600185901b178555611d5f565b600085815260208120601f198616915b828110156134f8578886015182559484019460019091019084016134d9565b50858210156135165787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b60008282101561354e5761354e613526565b500390565b600081600019048311821515161561356d5761356d613526565b500290565b634e487b7160e01b600052601260045260246000fd5b60008261359757613597613572565b500490565b6000602082840312156135ae57600080fd5b5051919050565b6000602082840312156135c757600080fd5b81516121dc8161309a565b600061ffff808316818516818304811182151516156135f3576135f3613526565b02949350505050565b6000821982111561360f5761360f613526565b500190565b600061ffff80831681851680830382111561363157613631613526565b01949350505050565b600067ffffffffffffffff808316818516818304811182151516156135f3576135f3613526565b600061ffff8381169083168181101561367c5761367c613526565b039392505050565b634e487b7160e01b600052603260045260246000fd5b600060001982036136ad576136ad613526565b5060010190565b6020815260006121dc6020830184613375565b60008084546136d581613341565b600182811680156136ed576001811461370257613731565b60ff1984168752821515830287019450613731565b8860005260208060002060005b858110156137285781548a82015290840190820161370f565b50505082870194505b505050508351613745818360208801612efe565b7f2e6a736f6e0000000000000000000000000000000000000000000000000000009101908152600501949350505050565b60008261378557613785613572565b500690565b60006001600160a01b038087168352808616602084015250836040830152608060608301526137bc6080830184612f2a565b9695505050505050565b6000602082840312156137d857600080fd5b81516121dc81612ddd565b600082516137f5818460208701612efe565b919091019291505056fea2646970667358221220cd83ec6d7cb44493cc8806b2eb500284f43c3250006fbf75d03cfbfc70f95a8e64736f6c634300080f0033000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000001bf08eb00000000000000000000000000000000000000000000000000000000010c388d0000000000000000000000000000000000000000000000000000000000b2d05e000000000000000000000000000000000000000000000000000000000059682f000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000008700000000000000000000000000000000000000000000000000000000000000e100000000000000000000000000000000000000000000000000000000000001a900000000000000000000000000000000000000000000000000000000000002ee
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106103155760003560e01c806378419144116101a7578063b88d4fde116100ee578063d4a6a2fd11610097578063e985e9c511610071578063e985e9c5146106ea578063f2fde38b14610726578063f944b8fb1461073957600080fd5b8063d4a6a2fd146106a5578063da5a7e8d146106b7578063e2387028146106d757600080fd5b8063c87b56dd116100c8578063c87b56dd1461065c578063c884ef831461066f578063cac926691461069257600080fd5b8063b88d4fde14610639578063ba808f341461064c578063c793803c1461065457600080fd5b80638da5cb5b11610150578063a16062ae1161012a578063a16062ae14610615578063a22cb4651461061d578063aa98e0c61461063057600080fd5b80638da5cb5b146105f457806395d89b4114610605578063997bf9f61461060d57600080fd5b80638108a048116101815780638108a048146105b05780638450456f146105c557806389a30271146105cd57600080fd5b806378419144146105825780637b75403c1461058a5780637fde782c1461059d57600080fd5b806323b872dd1161026b5780635bef6364116102145780636c0360eb116101ee5780636c0360eb1461055f57806370a0823114610567578063715018a61461057a57600080fd5b80635bef63641461050f5780636352211e1461054457806366a7481d1461055757600080fd5b80632e60b6f8116102455780632e60b6f8146104e15780633ccfd60b146104f457806342842e0e146104fc57600080fd5b806323b872dd146104935780632560e376146104a65780632a55205a146104af57600080fd5b806306fdde03116102cd5780630fad0f51116102a75780630fad0f511461045657806318160ddd1461046a57806318712c211461048057600080fd5b806306fdde0314610403578063081812fc14610418578063095ea7b31461044357600080fd5b806302fe5305116102fe57806302fe530514610355578063039af9eb1461036a578063054f7d9c146103f657600080fd5b806301ffc9a71461031a57806302ce581314610342575b600080fd5b61032d610328366004612df3565b610741565b60405190151581526020015b60405180910390f35b60115461032d9062010000900460ff1681565b610368610363366004612e9c565b610785565b005b6103be610378366004612ee5565b600a6020526000908152604090205461ffff8082169162010000810482169167ffffffffffffffff640100000000830416916c0100000000000000000000000090041684565b6040805161ffff9586168152938516602085015267ffffffffffffffff90921691830191909152919091166060820152608001610339565b60115461032d9060ff1681565b61040b61082f565b6040516103399190612f56565b61042b610426366004612ee5565b6108c1565b6040516001600160a01b039091168152602001610339565b610368610451366004612f80565b6108e8565b60115461032d906301000000900460ff1681565b610472610a19565b604051908152602001610339565b61036861048e366004612faa565b610a35565b6103686104a1366004612fcc565b610b19565b610472600c5481565b6104c26104bd366004612faa565b610ba0565b604080516001600160a01b039093168352602083019190915201610339565b6103686104ef36600461302b565b610c7f565b610368610e04565b61036861050a366004612fcc565b610f9b565b61053261051d366004612ee5565b600f6020526000908152604090205460ff1681565b60405160ff9091168152602001610339565b61042b610552366004612ee5565b610fb6565b610532600481565b61040b61101b565b61047261057536600461307f565b6110a9565b610368611143565b610532600c81565b6103686105983660046130a8565b611157565b6103686105ab36600461311d565b6112c1565b6105b8611698565b6040516103399190613193565b6105b861175c565b61042b7f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4881565b6008546001600160a01b031661042b565b61040b6117ef565b610532600281565b610532600381565b61036861062b3660046131d7565b6117fe565b610472600b5481565b610368610647366004613203565b611809565b610532600181565b610368611897565b61040b61066a366004612ee5565b61193a565b61032d61067d36600461307f565b600e6020526000908152604090205460ff1681565b61032d6106a036600461327f565b6119a1565b60115461032d90610100900460ff1681565b6104726106c536600461307f565b600d6020526000908152604090205481565b6103686106e53660046132ad565b611a72565b61032d6106f836600461330e565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b61036861073436600461307f565b611d67565b610368611df7565b60006001600160e01b031982167f2baae9fd00000000000000000000000000000000000000000000000000000000148061077f575061077f82611eb4565b92915050565b61078d611f4f565b60115460ff16156107e55760405162461bcd60e51b815260206004820152600760248201527f2166726f7a656e0000000000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b7feb0ff494c0855e7c27233e02cb7987f997be6005d24b09af504d00f2e349c8916010826040516108179291906133f2565b60405180910390a1601061082b8282613466565b5050565b60606000805461083e90613341565b80601f016020809104026020016040519081016040528092919081815260200182805461086a90613341565b80156108b75780601f1061088c576101008083540402835291602001916108b7565b820191906000526020600020905b81548152906001019060200180831161089a57829003601f168201915b5050505050905090565b60006108cc82611fa9565b506000908152600460205260409020546001600160a01b031690565b60006108f382610fb6565b9050806001600160a01b0316836001600160a01b03160361097c5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f720000000000000000000000000000000000000000000000000000000000000060648201526084016107dc565b336001600160a01b0382161480610998575061099881336106f8565b610a0a5760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c000060648201526084016107dc565b610a14838361200d565b505050565b60006001610a2660095490565b610a30919061353c565b905090565b610a3d611f4f565b60028210610a8d5760405162461bcd60e51b815260206004820152600360248201527f216964000000000000000000000000000000000000000000000000000000000060448201526064016107dc565b81600003610ad757600b5460408051918252602082018390527f191a34cdab35c3a3a2ef7ba4d54d4e55a5416f6807b90652ee8ee0be41699583910160405180910390a1600b5550565b600c5460408051918252602082018390527f191a34cdab35c3a3a2ef7ba4d54d4e55a5416f6807b90652ee8ee0be41699583910160405180910390a1600c5550565b610b233382612088565b610b955760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206e6f7220617070726f76656400000000000000000000000000000000000060648201526084016107dc565b610a14838383612107565b60008281526007602090815260408083208151808301909252546001600160a01b038116808352740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff16928201929092528291610c415750604080518082019091526006546001600160a01b03811682527401000000000000000000000000000000000000000090046bffffffffffffffffffffffff1660208201525b602081015160009061271090610c65906bffffffffffffffffffffffff1687613553565b610c6f9190613588565b91519350909150505b9250929050565b610c87611f4f565b600460ff851611801590610c9e575060008460ff16115b610cd25760405162461bcd60e51b815260206004820152600560248201526410ba34b2b960d91b60448201526064016107dc565b60ff84166000908152600a60205260409020805461ffff6201000090910481169085161015610d435760405162461bcd60e51b815260206004820152600a60248201527f216e6577537570706c790000000000000000000000000000000000000000000060448201526064016107dc565b805461ffff8581167fffffffffffffffffffffffffffffffffffffffff0000000000000000ffff000090921682178582166401000000008102919091177fffffffffffffffffffffffffffffffffffff0000ffffffffffffffffffffffff166c0100000000000000000000000092861692830217845560408051938452602084019190915282015260ff8616907fde193dcff76a88d52adbb377a8c539b51d5fe8c48477b8c21f9e84d92486cacf9060600160405180910390a25050505050565b610e0c611f4f565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb486001600160a01b0316906370a0823190602401602060405180830381865afa158015610e8c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eb0919061359c565b90507f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb486001600160a01b031663a9059cbb610ef36008546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018490526044016020604051808303816000875af1158015610f40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f6491906135b5565b506040518181527f4e70a604b23a8edee2b1d0a656e9b9c00b73ad8bb1afc2c59381ee9f69197de79060200160405180910390a150565b610a1483838360405180602001604052806000815250611809565b6000818152600260205260408120546001600160a01b03168061077f5760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e204944000000000000000060448201526064016107dc565b6010805461102890613341565b80601f016020809104026020016040519081016040528092919081815260200182805461105490613341565b80156110a15780601f10611076576101008083540402835291602001916110a1565b820191906000526020600020905b81548152906001019060200180831161108457829003601f168201915b505050505081565b60006001600160a01b0382166111275760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e6572000000000000000000000000000000000000000000000060648201526084016107dc565b506001600160a01b031660009081526003602052604090205490565b61114b611f4f565b611155600061216c565b565b61115f611f4f565b600282106111af5760405162461bcd60e51b815260206004820152600360248201527f216964000000000000000000000000000000000000000000000000000000000060448201526064016107dc565b8160000361123d57601154604080518481526201000090920460ff1615156020830152821515908201527f79363225105b8caa024b942af64e1f345181171bdf556a65c5621e593b006e729060600160405180910390a16011805482151562010000027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffff9091161790555050565b6011546040805184815261010090920460ff1615156020830152821515908201527f79363225105b8caa024b942af64e1f345181171bdf556a65c5621e593b006e729060600160405180910390a160118054821515610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff9091161790555050565b60115462010000900460ff166113195760405162461bcd60e51b815260206004820152600760248201527f216163746976650000000000000000000000000000000000000000000000000060448201526064016107dc565b600460ff851611801590611330575060008460ff16115b6113645760405162461bcd60e51b815260206004820152600560248201526410ba34b2b960d91b60448201526064016107dc565b60008360ff16116113b75760405162461bcd60e51b815260206004820152600860248201527f217a65726f51747900000000000000000000000000000000000000000000000060448201526064016107dc565b60ff8481166000908152600a60205260408120805490926113ef91908716906c01000000000000000000000000900461ffff166135d2565b6001600160a01b0388166000908152600d602052604090205461ffff919091169150600c9061141f9083906135fc565b111561146d5760405162461bcd60e51b815260206004820152600860248201527f21757365724d617800000000000000000000000000000000000000000000000060448201526064016107dc565b815461ffff8082169161148b9160ff89169162010000900416613614565b61ffff1611156114dd5760405162461bcd60e51b815260206004820152600760248201527f21737570706c790000000000000000000000000000000000000000000000000060448201526064016107dc565b6040516bffffffffffffffffffffffff19606089901b16602082015260009060340160405160208183030381529060405280519060200120905061155885858080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600b5491508490506121cb565b6115a45760405162461bcd60e51b815260206004820152600660248201527f2170726f6f66000000000000000000000000000000000000000000000000000060448201526064016107dc565b825461160a90339030906115ce9060ff8b1690640100000000900467ffffffffffffffff1661363a565b6001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb481692919067ffffffffffffffff166121e3565b825460ff871690849060029061162b90849062010000900461ffff16613614565b92506101000a81548161ffff021916908361ffff16021790555081600d60008a6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461167a91906135fc565b9091555061168e90508860ff88168961226b565b5050505050505050565b60408051600480825260a08201909252606091600091906020820160808036833701905050905060005b600481101561175657600a60006116da8360016135fc565b8152602081019190915260400160009081205462010000900461ffff1690600a906117068460016135fc565b8152602081019190915260400160002054611725919061ffff16613661565b61ffff1682828151811061173b5761173b613684565b602090810291909101015261174f8161369a565b90506116c2565b50919050565b60408051600480825260a08201909252606091600091906020820160808036833701905050905060005b600481101561175657600a600061179e8360016135fc565b815260200190815260200160002060000160029054906101000a900461ffff1661ffff168282815181106117d4576117d4613684565b60209081029190910101526117e88161369a565b9050611786565b60606001805461083e90613341565b61082b338383612302565b6118133383612088565b6118855760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206e6f7220617070726f76656400000000000000000000000000000000000060648201526084016107dc565b611891848484846123d0565b50505050565b61189f611f4f565b60115460ff16156118f25760405162461bcd60e51b815260206004820152600760248201527f2166726f7a656e0000000000000000000000000000000000000000000000000060448201526064016107dc565b6011805460ff191660011790556040517f80769e0fec5395870efbeb7790ddbe4c3669e465667108c34094cbcdd7c0ac5090611930906010906136b4565b60405180910390a1565b606061194582611fa9565b60006010805461195490613341565b905011611970576040518060200160405280600081525061077f565b601061197b83612459565b60405160200161198c9291906136c7565b60405160208183030381529060405292915050565b60006119ab611f4f565b6103e8826bffffffffffffffffffffffff161115611a0d5760405162461bcd60e51b81526004016107dc9060208082526004908201527f2162707300000000000000000000000000000000000000000000000000000000604082015260600190565b611a28611a226008546001600160a01b031690565b8361258e565b6040516bffffffffffffffffffffffff831681527f3cf4fec9aae458c3a169ef0c25423c15fbfc6175238fa756786f345d9d9fdbc99060200160405180910390a15060015b919050565b601154610100900460ff16611ac95760405162461bcd60e51b815260206004820152600760248201527f216163746976650000000000000000000000000000000000000000000000000060448201526064016107dc565b600460ff841611801590611ae0575060008360ff16115b611b145760405162461bcd60e51b815260206004820152600560248201526410ba34b2b960d91b60448201526064016107dc565b6001600160a01b0384166000908152600e602052604090205460ff1615611b7d5760405162461bcd60e51b815260206004820152600860248201527f21636c61696d656400000000000000000000000000000000000000000000000060448201526064016107dc565b60ff83166000908152600a60205260409020805461ffff80821691611bab9162010000909104166001613614565b61ffff161115611bfd5760405162461bcd60e51b815260206004820152600760248201527f21737570706c790000000000000000000000000000000000000000000000000060448201526064016107dc565b6040516bffffffffffffffffffffffff19606087901b1660208201527fff0000000000000000000000000000000000000000000000000000000000000060f886901b166034820152600090603501604051602081830303815290604052805190602001209050611ca484848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600c5491508490506121cb565b611cf05760405162461bcd60e51b815260206004820152600660248201527f2170726f6f66000000000000000000000000000000000000000000000000000060448201526064016107dc565b81546001908390600290611d0f90849062010000900461ffff16613614565b825461ffff9182166101009390930a9283029190920219909116179055506001600160a01b0386166000908152600e60205260409020805460ff19166001908117909155611d5f9087908761226b565b505050505050565b611d6f611f4f565b6001600160a01b038116611deb5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016107dc565b611df48161216c565b50565b611dff611f4f565b6011546301000000900460ff16611e585760405162461bcd60e51b815260206004820152600a60248201527f21736f756c626f756e640000000000000000000000000000000000000000000060448201526064016107dc565b601180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffff1690556040517f7ee2b9314e17d216faa474818af3bfd5ee91d9e2f31a2fb4fbe5a72e0141f09090600090a1565b80546001019055565b60006001600160e01b031982167f80ac58cd000000000000000000000000000000000000000000000000000000001480611f1757506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b8061077f57507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b031983161461077f565b6008546001600160a01b031633146111555760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107dc565b6000818152600260205260409020546001600160a01b0316611df45760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e204944000000000000000060448201526064016107dc565b6000818152600460205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038416908117909155819061204f82610fb6565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008061209483610fb6565b9050806001600160a01b0316846001600160a01b031614806120db57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b806120ff5750836001600160a01b03166120f4846108c1565b6001600160a01b0316145b949350505050565b6011546301000000900460ff16156121615760405162461bcd60e51b815260206004820152600a60248201527f21736f756c626f756e640000000000000000000000000000000000000000000060448201526064016107dc565b610a148383836126b9565b600880546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000826121d88584612893565b1490505b9392505050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526118919085906128e0565b60005b8281101561189157600061228160095490565b9050612291600980546001019055565b6000818152600f60205260409020805460ff191660ff85161790556122b685826129c5565b6040805182815260ff851660208201527fbc4ddb52c9c61a3a738bbaefba9e77197ec2ed649fc045814492d5dc8e8bb4bd910160405180910390a1506122fb8161369a565b905061226e565b816001600160a01b0316836001600160a01b0316036123635760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016107dc565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6123db848484612107565b6123e784848484612b14565b6118915760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e746572000000000000000000000000000060648201526084016107dc565b60608160000361249c57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156124c657806124b08161369a565b91506124bf9050600a83613588565b91506124a0565b60008167ffffffffffffffff8111156124e1576124e1612e10565b6040519080825280601f01601f19166020018201604052801561250b576020820181803683370190505b5090505b84156120ff5761252060018361353c565b915061252d600a86613776565b6125389060306135fc565b60f81b81838151811061254d5761254d613684565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350612587600a86613588565b945061250f565b6127106bffffffffffffffffffffffff821611156126145760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c2065786365656460448201527f2073616c6550726963650000000000000000000000000000000000000000000060648201526084016107dc565b6001600160a01b03821661266a5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c69642072656365697665720000000000000060448201526064016107dc565b604080518082019091526001600160a01b039092168083526bffffffffffffffffffffffff90911660209092018290527401000000000000000000000000000000000000000090910217600655565b826001600160a01b03166126cc82610fb6565b6001600160a01b0316146127485760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e657200000000000000000000000000000000000000000000000000000060648201526084016107dc565b6001600160a01b0382166127c35760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016107dc565b6127ce60008261200d565b6001600160a01b03831660009081526003602052604081208054600192906127f790849061353c565b90915550506001600160a01b03821660009081526003602052604081208054600192906128259084906135fc565b9091555050600081815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600081815b84518110156128d8576128c4828683815181106128b7576128b7613684565b6020026020010151612c9d565b9150806128d08161369a565b915050612898565b509392505050565b6000612935826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612cc99092919063ffffffff16565b805190915015610a14578080602001905181019061295391906135b5565b610a145760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016107dc565b6001600160a01b038216612a1b5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016107dc565b6000818152600260205260409020546001600160a01b031615612a805760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016107dc565b6001600160a01b0382166000908152600360205260408120805460019290612aa99084906135fc565b9091555050600081815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001600160a01b0384163b15612c92576040517f150b7a020000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063150b7a0290612b7190339089908890889060040161378a565b6020604051808303816000875af1925050508015612bac575060408051601f3d908101601f19168201909252612ba9918101906137c6565b60015b612c5f573d808015612bda576040519150601f19603f3d011682016040523d82523d6000602084013e612bdf565b606091505b508051600003612c575760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e746572000000000000000000000000000060648201526084016107dc565b805181602001fd5b6001600160e01b0319167f150b7a02000000000000000000000000000000000000000000000000000000001490506120ff565b506001949350505050565b6000818310612cb95760008281526020849052604090206121dc565b5060009182526020526040902090565b60606120ff8484600085856001600160a01b0385163b612d2b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016107dc565b600080866001600160a01b03168587604051612d4791906137e3565b60006040518083038185875af1925050503d8060008114612d84576040519150601f19603f3d011682016040523d82523d6000602084013e612d89565b606091505b5091509150612d99828286612da4565b979650505050505050565b60608315612db35750816121dc565b825115612dc35782518084602001fd5b8160405162461bcd60e51b81526004016107dc9190612f56565b6001600160e01b031981168114611df457600080fd5b600060208284031215612e0557600080fd5b81356121dc81612ddd565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115612e4157612e41612e10565b604051601f8501601f19908116603f01168101908282118183101715612e6957612e69612e10565b81604052809350858152868686011115612e8257600080fd5b858560208301376000602087830101525050509392505050565b600060208284031215612eae57600080fd5b813567ffffffffffffffff811115612ec557600080fd5b8201601f81018413612ed657600080fd5b6120ff84823560208401612e26565b600060208284031215612ef757600080fd5b5035919050565b60005b83811015612f19578181015183820152602001612f01565b838111156118915750506000910152565b60008151808452612f42816020860160208601612efe565b601f01601f19169290920160200192915050565b6020815260006121dc6020830184612f2a565b80356001600160a01b0381168114611a6d57600080fd5b60008060408385031215612f9357600080fd5b612f9c83612f69565b946020939093013593505050565b60008060408385031215612fbd57600080fd5b50508035926020909101359150565b600080600060608486031215612fe157600080fd5b612fea84612f69565b9250612ff860208501612f69565b9150604084013590509250925092565b803560ff81168114611a6d57600080fd5b803561ffff81168114611a6d57600080fd5b6000806000806080858703121561304157600080fd5b61304a85613008565b935061305860208601613019565b925061306660408601613019565b915061307460608601613019565b905092959194509250565b60006020828403121561309157600080fd5b6121dc82612f69565b8015158114611df457600080fd5b600080604083850312156130bb57600080fd5b8235915060208301356130cd8161309a565b809150509250929050565b60008083601f8401126130ea57600080fd5b50813567ffffffffffffffff81111561310257600080fd5b6020830191508360208260051b8501011115610c7857600080fd5b60008060008060006080868803121561313557600080fd5b61313e86612f69565b945061314c60208701613008565b935061315a60408701613008565b9250606086013567ffffffffffffffff81111561317657600080fd5b613182888289016130d8565b969995985093965092949392505050565b6020808252825182820181905260009190848201906040850190845b818110156131cb578351835292840192918401916001016131af565b50909695505050505050565b600080604083850312156131ea57600080fd5b6131f383612f69565b915060208301356130cd8161309a565b6000806000806080858703121561321957600080fd5b61322285612f69565b935061323060208601612f69565b925060408501359150606085013567ffffffffffffffff81111561325357600080fd5b8501601f8101871361326457600080fd5b61327387823560208401612e26565b91505092959194509250565b60006020828403121561329157600080fd5b81356bffffffffffffffffffffffff811681146121dc57600080fd5b600080600080606085870312156132c357600080fd5b6132cc85612f69565b93506132da60208601613008565b9250604085013567ffffffffffffffff8111156132f657600080fd5b613302878288016130d8565b95989497509550505050565b6000806040838503121561332157600080fd5b61332a83612f69565b915061333860208401612f69565b90509250929050565b600181811c9082168061335557607f821691505b60208210810361175657634e487b7160e01b600052602260045260246000fd5b6000815461338281613341565b80855260206001838116801561339f57600181146133b9576133e7565b60ff198516838901528284151560051b89010195506133e7565b866000528260002060005b858110156133df5781548a82018601529083019084016133c4565b890184019650505b505050505092915050565b6040815260006134056040830185613375565b82810360208401526134178185612f2a565b95945050505050565b601f821115610a1457600081815260208120601f850160051c810160208610156134475750805b601f850160051c820191505b81811015611d5f57828155600101613453565b815167ffffffffffffffff81111561348057613480612e10565b6134948161348e8454613341565b84613420565b602080601f8311600181146134c957600084156134b15750858301515b600019600386901b1c1916600185901b178555611d5f565b600085815260208120601f198616915b828110156134f8578886015182559484019460019091019084016134d9565b50858210156135165787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b60008282101561354e5761354e613526565b500390565b600081600019048311821515161561356d5761356d613526565b500290565b634e487b7160e01b600052601260045260246000fd5b60008261359757613597613572565b500490565b6000602082840312156135ae57600080fd5b5051919050565b6000602082840312156135c757600080fd5b81516121dc8161309a565b600061ffff808316818516818304811182151516156135f3576135f3613526565b02949350505050565b6000821982111561360f5761360f613526565b500190565b600061ffff80831681851680830382111561363157613631613526565b01949350505050565b600067ffffffffffffffff808316818516818304811182151516156135f3576135f3613526565b600061ffff8381169083168181101561367c5761367c613526565b039392505050565b634e487b7160e01b600052603260045260246000fd5b600060001982036136ad576136ad613526565b5060010190565b6020815260006121dc6020830184613375565b60008084546136d581613341565b600182811680156136ed576001811461370257613731565b60ff1984168752821515830287019450613731565b8860005260208060002060005b858110156137285781548a82015290840190820161370f565b50505082870194505b505050508351613745818360208801612efe565b7f2e6a736f6e0000000000000000000000000000000000000000000000000000009101908152600501949350505050565b60008261378557613785613572565b500690565b60006001600160a01b038087168352808616602084015250836040830152608060608301526137bc6080830184612f2a565b9695505050505050565b6000602082840312156137d857600080fd5b81516121dc81612ddd565b600082516137f5818460208701612efe565b919091019291505056fea2646970667358221220cd83ec6d7cb44493cc8806b2eb500284f43c3250006fbf75d03cfbfc70f95a8e64736f6c634300080f0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000001bf08eb00000000000000000000000000000000000000000000000000000000010c388d0000000000000000000000000000000000000000000000000000000000b2d05e000000000000000000000000000000000000000000000000000000000059682f000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000008700000000000000000000000000000000000000000000000000000000000000e100000000000000000000000000000000000000000000000000000000000001a900000000000000000000000000000000000000000000000000000000000002ee
-----Decoded View---------------
Arg [0] : _USDC (address): 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
Arg [1] : _weights (uint16[]): 12,12,12,6
Arg [2] : _prices (uint64[]): 7500000000,4500000000,3000000000,1500000000
Arg [3] : _supplies (uint16[]): 135,225,425,750
-----Encoded View---------------
19 Constructor Arguments found :
Arg [0] : 000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [3] : 00000000000000000000000000000000000000000000000000000000000001c0
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [5] : 000000000000000000000000000000000000000000000000000000000000000c
Arg [6] : 000000000000000000000000000000000000000000000000000000000000000c
Arg [7] : 000000000000000000000000000000000000000000000000000000000000000c
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [10] : 00000000000000000000000000000000000000000000000000000001bf08eb00
Arg [11] : 000000000000000000000000000000000000000000000000000000010c388d00
Arg [12] : 00000000000000000000000000000000000000000000000000000000b2d05e00
Arg [13] : 0000000000000000000000000000000000000000000000000000000059682f00
Arg [14] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [15] : 0000000000000000000000000000000000000000000000000000000000000087
Arg [16] : 00000000000000000000000000000000000000000000000000000000000000e1
Arg [17] : 00000000000000000000000000000000000000000000000000000000000001a9
Arg [18] : 00000000000000000000000000000000000000000000000000000000000002ee
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ 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.