Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60806040 | 15111548 | 748 days ago | IN | 0 ETH | 0.0512347 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
ArtTokenUpgradeable
Compiler Version
v0.8.14+commit.80d49f37
Optimization Enabled:
Yes with 1 runs
Other Settings:
byzantium EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "erc721a-upgradeable/contracts/ERC721AUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/interfaces/IERC2981Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol"; import "./finance/PaymentSplitterUpgradeable.sol"; import "./utils/MerkleAllowListUpgradeable.sol"; import "./utils/DenyListUpgradeable.sol"; contract ArtTokenUpgradeable is ERC721AUpgradeable, OwnableUpgradeable, PaymentSplitterUpgradeable, PausableUpgradeable, ReentrancyGuardUpgradeable, DenyListUpgradeable, MerkleAllowListUpgradeable { uint16 public maxPerMint; uint16 public maxSupply; uint256 public royaltiesPercentage; address public royaltiesReceiver; string public openBaseURI; string public closedBaseURI; bool public isOpen; function initialize(string memory _name, string memory _symbol) public initializer initializerERC721A { isOpen = false; maxPerMint = 2; maxSupply = 10000; isAllowlistEnabled = true; royaltiesReceiver = address(this); royaltiesPercentage = 100; __Ownable_init(); __ReentrancyGuard_init(); __Pausable_init(); __ERC721A_init(_name, _symbol); } function setSecondaryRoyalty(address _receiver, uint256 _percentage) public onlyOwner { royaltiesReceiver = _receiver; royaltiesPercentage = _percentage; } function setClosedBaseURI(string memory baseURI_) public onlyOwner { closedBaseURI = baseURI_; } function setOpenBaseURI(string memory baseURI_) public onlyOwner { openBaseURI = baseURI_; } function setIsOpen(bool _isOpen) public onlyOwner { isOpen = _isOpen; } function setMaxPerMint(uint16 _quantity) public onlyOwner { maxPerMint = _quantity; } function setMaxSupply(uint16 _maxSupply) public onlyOwner { maxSupply = _maxSupply; } function addPayee(address account, uint256 shares_) public onlyOwner { _addPayee(account, shares_); } function pause() public onlyOwner { _pause(); } function unpause() public onlyOwner { _unpause(); } function mint(uint256 _quantity) external payable nonReentrant whenNotPaused { require(!isAllowlistEnabled, "whitelist enabled"); _beforeMint(_quantity, maxPerMint); _safeMint(msg.sender, _quantity); _afterMint(_quantity); } function mintWithProof( uint256 _quantity, uint256 _max, bytes32[] memory _proof ) external payable nonReentrant whenNotPaused { require(isAllowlistEnabled, "whitelist disabled"); isWhitelisted(_proof, _max); _beforeMint(_quantity, _max); _safeMint(msg.sender, _quantity); _afterMint(_quantity); } function _beforeMint(uint256 _quantity, uint256 _max) private view { require(totalSupply() + _quantity <= maxSupply, "max supply exceeded"); require( _quantity <= (_max - _minted[_msgSender()]), "max to mint exceeded" ); if (isDenylistEnabled) { require(!_denylist[_msgSender()], "in denylist"); } } function _afterMint(uint256 _quantity) private { _minted[_msgSender()] += _quantity; } /* solhint-disable no-unused-vars */ function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view returns (address receiver, uint256 royaltyAmount) { uint256 _royalties = (_salePrice * royaltiesPercentage) / 100; return (royaltiesReceiver, _royalties); } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = closedBaseURI; if (isOpen) { baseURI = openBaseURI; } return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId), ".json")) : ""; } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721AUpgradeable) returns (bool) { return interfaceId == type(IERC2981Upgradeable).interfaceId || super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/cryptography/MerkleProofUpgradeable.sol"; contract MerkleAllowListUpgradeable is Initializable, ContextUpgradeable, OwnableUpgradeable { using ECDSAUpgradeable for bytes32; bool public isAllowlistEnabled; bytes32 private _whitelistMerkleRoot; mapping(address => uint256) public _minted; function setAllowlist(bool _enable) public onlyOwner { isAllowlistEnabled = _enable; } function isWhitelisted(bytes32[] memory proof, uint256 max) public view { require(_whitelistMerkleRoot != "", "merkle tree not set"); require( MerkleProofUpgradeable.verify( proof, _whitelistMerkleRoot, keccak256(abi.encode(_msgSender(), max)) ), "validation failed" ); } function setWhitelistMerkleRoot(bytes32 newMerkleRoot_) external onlyOwner { _whitelistMerkleRoot = newMerkleRoot_; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; contract DenyListUpgradeable is Initializable, ContextUpgradeable, OwnableUpgradeable { bool public isDenylistEnabled; mapping(address => bool) public _denylist; function setDenylist(bool _enable) public onlyOwner { isDenylistEnabled = _enable; } function addDenylist(address _account, bool _isDenied) public onlyOwner { _denylist[_account] = _isDenied; } function removeDenylist(address _account) public onlyOwner { _denylist[_account] = false; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (finance/PaymentSplitter.sol) pragma solidity ^0.8.0; import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; /** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each * account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim * an amount proportional to the percentage of total shares they were assigned. * * `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the * accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release} * function. * * NOTE: This contract assumes that ERC20 tokens will behave similarly to native tokens (Ether). Rebasing tokens, and * tokens that apply fees during transfers, are likely to not be supported as expected. If in doubt, we encourage you * to run tests before sending real value to this contract. */ contract PaymentSplitterUpgradeable is Initializable, ContextUpgradeable { event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20Upgradeable indexed token, address to, uint256 amount); event PaymentReceived(address from, uint256 amount); uint256 private _totalShares; uint256 private _totalReleased; mapping(address => uint256) private _shares; mapping(address => uint256) private _released; address[] private _payees; mapping(IERC20Upgradeable => uint256) private _erc20TotalReleased; mapping(IERC20Upgradeable => mapping(address => uint256)) private _erc20Released; /** * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at * the matching position in the `shares` array. * * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no * duplicates in `payees`. */ function __PaymentSplitter_init(address[] memory payees, uint256[] memory shares_) internal onlyInitializing { __PaymentSplitter_init_unchained(payees, shares_); } function __PaymentSplitter_init_unchained(address[] memory payees, uint256[] memory shares_) internal onlyInitializing { require(payees.length == shares_.length, "PaymentSplitter: payees and shares length mismatch"); require(payees.length > 0, "PaymentSplitter: no payees"); for (uint256 i = 0; i < payees.length; i++) { _addPayee(payees[i], shares_[i]); } } /** * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the * reliability of the events, and not the actual splitting of Ether. * * To learn more about this see the Solidity documentation for * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback * functions]. */ receive() external payable virtual { emit PaymentReceived(_msgSender(), msg.value); } /** * @dev Getter for the total shares held by payees. */ function totalShares() public view returns (uint256) { return _totalShares; } /** * @dev Getter for the total amount of Ether already released. */ function totalReleased() public view returns (uint256) { return _totalReleased; } /** * @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20 * contract. */ function totalReleased(IERC20Upgradeable token) public view returns (uint256) { return _erc20TotalReleased[token]; } /** * @dev Getter for the amount of shares held by an account. */ function shares(address account) public view returns (uint256) { return _shares[account]; } /** * @dev Getter for the amount of Ether already released to a payee. */ function released(address account) public view returns (uint256) { return _released[account]; } /** * @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an * IERC20 contract. */ function released(IERC20Upgradeable token, address account) public view returns (uint256) { return _erc20Released[token][account]; } /** * @dev Getter for the address of the payee number `index`. */ function payee(uint256 index) public view returns (address) { return _payees[index]; } /** * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the * total shares and their previous withdrawals. */ function release(address payable account) public virtual { require(_shares[account] > 0, "PaymentSplitter: account has no shares"); uint256 totalReceived = address(this).balance + totalReleased(); uint256 payment = _pendingPayment(account, totalReceived, released(account)); require(payment != 0, "PaymentSplitter: account is not due payment"); _released[account] += payment; _totalReleased += payment; AddressUpgradeable.sendValue(account, payment); emit PaymentReleased(account, payment); } /** * @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their * percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20 * contract. */ function release(IERC20Upgradeable token, address account) public virtual { require(_shares[account] > 0, "PaymentSplitter: account has no shares"); uint256 totalReceived = token.balanceOf(address(this)) + totalReleased(token); uint256 payment = _pendingPayment(account, totalReceived, released(token, account)); require(payment != 0, "PaymentSplitter: account is not due payment"); _erc20Released[token][account] += payment; _erc20TotalReleased[token] += payment; SafeERC20Upgradeable.safeTransfer(token, account, payment); emit ERC20PaymentReleased(token, account, payment); } /** * @dev internal logic for computing the pending payment of an `account` given the token historical balances and * already released amounts. */ function _pendingPayment( address account, uint256 totalReceived, uint256 alreadyReleased ) private view returns (uint256) { return (totalReceived * _shares[account]) / _totalShares - alreadyReleased; } /** * @dev Add a new payee to the contract. * @param account The address of the payee to add. * @param shares_ The number of shares owned by the payee. */ function _addPayee(address account, uint256 shares_) internal { require(account != address(0), "PaymentSplitter: account is the zero address"); require(shares_ > 0, "PaymentSplitter: shares are 0"); require(_shares[account] == 0, "PaymentSplitter: account already has shares"); _payees.push(account); _shares[account] = shares_; _totalShares = _totalShares + shares_; emit PayeeAdded(account, shares_); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[43] private __gap; }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.0.0 // Creator: Chiru Labs pragma solidity ^0.8.4; /** * @dev Interface of an ERC721A compliant contract. */ interface IERC721AUpgradeable { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * The token does not exist. */ error ApprovalQueryForNonexistentToken(); /** * The caller cannot approve to their own address. */ error ApproveToCaller(); /** * The caller cannot approve to the current owner. */ error ApprovalToCurrentOwner(); /** * Cannot query the balance for the zero address. */ error BalanceQueryForZeroAddress(); /** * Cannot mint to the zero address. */ error MintToZeroAddress(); /** * The quantity of tokens minted must be more than zero. */ error MintZeroQuantity(); /** * The token does not exist. */ error OwnerQueryForNonexistentToken(); /** * The caller must own the token or be an approved operator. */ error TransferCallerNotOwnerNorApproved(); /** * The token must be owned by `from`. */ error TransferFromIncorrectOwner(); /** * Cannot safely transfer to a contract that does not implement the ERC721Receiver interface. */ error TransferToNonERC721ReceiverImplementer(); /** * Cannot transfer to the zero address. */ error TransferToZeroAddress(); /** * The token does not exist. */ error URIQueryForNonexistentToken(); struct TokenOwnership { // The address of the owner. address addr; // Keeps track of the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; } /** * @dev Returns the total amount of tokens stored by the contract. * * Burned tokens are calculated here, use `_totalMinted()` if you want to count just minted tokens. */ function totalSupply() external view returns (uint256); // ============================== // 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); // ============================== // IERC721 // ============================== /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * 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 be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); // ============================== // IERC721Metadata // ============================== /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev This is a base storage for the initialization function for upgradeable diamond facet contracts **/ library ERC721A__InitializableStorage { struct Layout { /* * Indicates that the contract has been initialized. */ bool _initialized; /* * Indicates that the contract is in the process of being initialized. */ bool _initializing; } bytes32 internal constant STORAGE_SLOT = keccak256('ERC721A.contracts.storage.initializable.facet'); function layout() internal pure returns (Layout storage l) { bytes32 slot = STORAGE_SLOT; assembly { l.slot := slot } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev This is a base contract to aid in writing upgradeable diamond facet contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. */ import {ERC721A__InitializableStorage} from './ERC721A__InitializableStorage.sol'; abstract contract ERC721A__Initializable { using ERC721A__InitializableStorage for ERC721A__InitializableStorage.Layout; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializerERC721A() { // If the contract is initializing we ignore whether _initialized is set in order to support multiple // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the // contract may have been reentered. require( ERC721A__InitializableStorage.layout()._initializing ? _isConstructor() : !ERC721A__InitializableStorage.layout()._initialized, 'ERC721A__Initializable: contract is already initialized' ); bool isTopLevelCall = !ERC721A__InitializableStorage.layout()._initializing; if (isTopLevelCall) { ERC721A__InitializableStorage.layout()._initializing = true; ERC721A__InitializableStorage.layout()._initialized = true; } _; if (isTopLevelCall) { ERC721A__InitializableStorage.layout()._initializing = false; } } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} modifier, directly or indirectly. */ modifier onlyInitializingERC721A() { require( ERC721A__InitializableStorage.layout()._initializing, 'ERC721A__Initializable: contract is not initializing' ); _; } /// @dev Returns true if and only if the function is running in the constructor function _isConstructor() private view returns (bool) { // extcodesize checks the size of the code stored in an address, and // address returns the current address. Since the code is still not // deployed when running a constructor, any checks on its code size will // yield zero, making it an effective way to detect if a contract is // under construction or not. address self = address(this); uint256 cs; assembly { cs := extcodesize(self) } return cs == 0; } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.0.0 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721AUpgradeable.sol'; import {ERC721AStorage} from './ERC721AStorage.sol'; import './ERC721A__Initializable.sol'; /** * @dev ERC721 token receiver interface. */ interface ERC721A__IERC721ReceiverUpgradeable { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..). * * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721AUpgradeable is ERC721A__Initializable, IERC721AUpgradeable { using ERC721AStorage for ERC721AStorage.Layout; // Mask of an entry in packed address data. uint256 private constant BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant BITMASK_NEXT_INITIALIZED = 1 << 225; function __ERC721A_init(string memory name_, string memory symbol_) internal onlyInitializingERC721A { __ERC721A_init_unchained(name_, symbol_); } function __ERC721A_init_unchained(string memory name_, string memory symbol_) internal onlyInitializingERC721A { ERC721AStorage.layout()._name = name_; ERC721AStorage.layout()._symbol = symbol_; ERC721AStorage.layout()._currentIndex = _startTokenId(); } /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view returns (uint256) { return ERC721AStorage.layout()._currentIndex; } /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see `_totalMinted`. */ function totalSupply() public view override returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than `_currentIndex - _startTokenId()` times. unchecked { return ERC721AStorage.layout()._currentIndex - ERC721AStorage.layout()._burnCounter - _startTokenId(); } } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view returns (uint256) { // Counter underflow is impossible as _currentIndex does not decrement, // and it is initialized to `_startTokenId()` unchecked { return ERC721AStorage.layout()._currentIndex - _startTokenId(); } } /** * @dev Returns the total number of tokens burned. */ function _totalBurned() internal view returns (uint256) { return ERC721AStorage.layout()._burnCounter; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { // The interface IDs are constants representing the first 4 bytes of the XOR of // all function selectors in the interface. See: https://eips.ethereum.org/EIPS/eip-165 // e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)` return interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165. interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721. interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata. } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view override returns (uint256) { if (_addressToUint256(owner) == 0) revert BalanceQueryForZeroAddress(); return ERC721AStorage.layout()._packedAddressData[owner] & BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return (ERC721AStorage.layout()._packedAddressData[owner] >> BITPOS_NUMBER_MINTED) & BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return (ERC721AStorage.layout()._packedAddressData[owner] >> BITPOS_NUMBER_BURNED) & BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return uint64(ERC721AStorage.layout()._packedAddressData[owner] >> BITPOS_AUX); } /** * Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal { uint256 packed = ERC721AStorage.layout()._packedAddressData[owner]; uint256 auxCasted; assembly { // Cast aux without masking. auxCasted := aux } packed = (packed & BITMASK_AUX_COMPLEMENT) | (auxCasted << BITPOS_AUX); ERC721AStorage.layout()._packedAddressData[owner] = packed; } /** * Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr) if (curr < ERC721AStorage.layout()._currentIndex) { uint256 packed = ERC721AStorage.layout()._packedOwnerships[curr]; // If not burned. if (packed & BITMASK_BURNED == 0) { // Invariant: // There will always be an ownership that has an address and is not burned // before an ownership that does not have an address and is not burned. // Hence, curr will not underflow. // // We can directly compare the packed value. // If the address is zero, packed is zero. while (packed == 0) { packed = ERC721AStorage.layout()._packedOwnerships[--curr]; } return packed; } } } revert OwnerQueryForNonexistentToken(); } /** * Returns the unpacked `TokenOwnership` struct from `packed`. */ function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) { ownership.addr = address(uint160(packed)); ownership.startTimestamp = uint64(packed >> BITPOS_START_TIMESTAMP); ownership.burned = packed & BITMASK_BURNED != 0; } /** * Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view returns (TokenOwnership memory) { return _unpackedOwnership(ERC721AStorage.layout()._packedOwnerships[index]); } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal { if (ERC721AStorage.layout()._packedOwnerships[index] == 0) { ERC721AStorage.layout()._packedOwnerships[index] = _packedOwnershipOf(index); } } /** * Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around in the collection over time. */ function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnershipOf(tokenId)); } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { return address(uint160(_packedOwnershipOf(tokenId))); } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return ERC721AStorage.layout()._name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return ERC721AStorage.layout()._symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : ''; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } /** * @dev Casts the address to uint256 without masking. */ function _addressToUint256(address value) private pure returns (uint256 result) { assembly { result := value } } /** * @dev Casts the boolean to uint256 without branching. */ function _boolToUint256(bool value) private pure returns (uint256 result) { assembly { result := value } } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public override { address owner = address(uint160(_packedOwnershipOf(tokenId))); if (to == owner) revert ApprovalToCurrentOwner(); if (_msgSenderERC721A() != owner) if (!isApprovedForAll(owner, _msgSenderERC721A())) { revert ApprovalCallerNotOwnerNorApproved(); } ERC721AStorage.layout()._tokenApprovals[tokenId] = to; emit Approval(owner, to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return ERC721AStorage.layout()._tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { if (operator == _msgSenderERC721A()) revert ApproveToCaller(); ERC721AStorage.layout()._operatorApprovals[_msgSenderERC721A()][operator] = approved; emit ApprovalForAll(_msgSenderERC721A(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return ERC721AStorage.layout()._operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { _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 { _transfer(from, to, tokenId); if (to.code.length != 0) if (!_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @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`), */ function _exists(uint256 tokenId) internal view returns (bool) { return _startTokenId() <= tokenId && tokenId < ERC721AStorage.layout()._currentIndex && // If within bounds, ERC721AStorage.layout()._packedOwnerships[tokenId] & BITMASK_BURNED == 0; // and not burned. } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal { _safeMint(to, quantity, ''); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { uint256 startTokenId = ERC721AStorage.layout()._currentIndex; if (_addressToUint256(to) == 0) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1 // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1 unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the balance and number minted. ERC721AStorage.layout()._packedAddressData[to] += quantity * ((1 << BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. ERC721AStorage.layout()._packedOwnerships[startTokenId] = _addressToUint256(to) | (block.timestamp << BITPOS_START_TIMESTAMP) | (_boolToUint256(quantity == 1) << BITPOS_NEXT_INITIALIZED); uint256 updatedIndex = startTokenId; uint256 end = updatedIndex + quantity; if (to.code.length != 0) { do { emit Transfer(address(0), to, updatedIndex); if (!_checkContractOnERC721Received(address(0), to, updatedIndex++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (updatedIndex < end); // Reentrancy protection if (ERC721AStorage.layout()._currentIndex != startTokenId) revert(); } else { do { emit Transfer(address(0), to, updatedIndex++); } while (updatedIndex < end); } ERC721AStorage.layout()._currentIndex = updatedIndex; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _mint(address to, uint256 quantity) internal { uint256 startTokenId = ERC721AStorage.layout()._currentIndex; if (_addressToUint256(to) == 0) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1 // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1 unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the balance and number minted. ERC721AStorage.layout()._packedAddressData[to] += quantity * ((1 << BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. ERC721AStorage.layout()._packedOwnerships[startTokenId] = _addressToUint256(to) | (block.timestamp << BITPOS_START_TIMESTAMP) | (_boolToUint256(quantity == 1) << BITPOS_NEXT_INITIALIZED); uint256 updatedIndex = startTokenId; uint256 end = updatedIndex + quantity; do { emit Transfer(address(0), to, updatedIndex++); } while (updatedIndex < end); ERC721AStorage.layout()._currentIndex = updatedIndex; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Transfers `tokenId` from `from` to `to`. * * 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 ) private { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner(); address approvedAddress = ERC721AStorage.layout()._tokenApprovals[tokenId]; bool isApprovedOrOwner = (_msgSenderERC721A() == from || isApprovedForAll(from, _msgSenderERC721A()) || approvedAddress == _msgSenderERC721A()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); if (_addressToUint256(to) == 0) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner. if (_addressToUint256(approvedAddress) != 0) { delete ERC721AStorage.layout()._tokenApprovals[tokenId]; } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { // We can directly increment and decrement the balances. --ERC721AStorage.layout()._packedAddressData[from]; // Updates: `balance -= 1`. ++ERC721AStorage.layout()._packedAddressData[to]; // Updates: `balance += 1`. // Updates: // - `address` to the next owner. // - `startTimestamp` to the timestamp of transfering. // - `burned` to `false`. // - `nextInitialized` to `true`. ERC721AStorage.layout()._packedOwnerships[tokenId] = _addressToUint256(to) | (block.timestamp << BITPOS_START_TIMESTAMP) | BITMASK_NEXT_INITIALIZED; // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (ERC721AStorage.layout()._packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != ERC721AStorage.layout()._currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. ERC721AStorage.layout()._packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Equivalent to `_burn(tokenId, false)`. */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); address from = address(uint160(prevOwnershipPacked)); address approvedAddress = ERC721AStorage.layout()._tokenApprovals[tokenId]; if (approvalCheck) { bool isApprovedOrOwner = (_msgSenderERC721A() == from || isApprovedForAll(from, _msgSenderERC721A()) || approvedAddress == _msgSenderERC721A()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner. if (_addressToUint256(approvedAddress) != 0) { delete ERC721AStorage.layout()._tokenApprovals[tokenId]; } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { // Updates: // - `balance -= 1`. // - `numberBurned += 1`. // // We can directly decrement the balance, and increment the number burned. // This is equivalent to `packed -= 1; packed += 1 << BITPOS_NUMBER_BURNED;`. ERC721AStorage.layout()._packedAddressData[from] += (1 << BITPOS_NUMBER_BURNED) - 1; // Updates: // - `address` to the last owner. // - `startTimestamp` to the timestamp of burning. // - `burned` to `true`. // - `nextInitialized` to `true`. ERC721AStorage.layout()._packedOwnerships[tokenId] = _addressToUint256(from) | (block.timestamp << BITPOS_START_TIMESTAMP) | BITMASK_BURNED | BITMASK_NEXT_INITIALIZED; // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (ERC721AStorage.layout()._packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != ERC721AStorage.layout()._currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. ERC721AStorage.layout()._packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { ERC721AStorage.layout()._burnCounter++; } } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target 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 _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try ERC721A__IERC721ReceiverUpgradeable(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns (bytes4 retval) { return retval == ERC721A__IERC721ReceiverUpgradeable(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } /** * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting. * And also called before burning one token. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * And also called after one token has been burned. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { return msg.sender; } /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function _toString(uint256 value) internal pure returns (string memory ptr) { assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), // but we allocate 128 bytes to keep the free memory pointer 32-byte word aliged. // We will need 1 32-byte word to store the length, // and 3 32-byte words to store a maximum of 78 digits. Total: 32 + 3 * 32 = 128. ptr := add(mload(0x40), 128) // Update the free memory pointer to allocate. mstore(0x40, ptr) // Cache the end of the memory to calculate the length later. let end := ptr // We write the string from the rightmost digit to the leftmost digit. // The following is essentially a do-while loop that also handles the zero case. // Costs a bit more than early returning for the zero case, // but cheaper in terms of deployment and overall runtime costs. for { // Initialize and perform the first pass without check. let temp := value // Move the pointer 1 byte leftwards to point to an empty character slot. ptr := sub(ptr, 1) // Write the character to the pointer. 48 is the ASCII index of '0'. mstore8(ptr, add(48, mod(temp, 10))) temp := div(temp, 10) } temp { // Keep dividing `temp` until zero. temp := div(temp, 10) } { // Body of the for loop. ptr := sub(ptr, 1) mstore8(ptr, add(48, mod(temp, 10))) } let length := sub(end, ptr) // Move the pointer 32 bytes leftwards to make room for the length. ptr := sub(ptr, 32) // Store the length. mstore(ptr, length) } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {ERC721AUpgradeable} from './ERC721AUpgradeable.sol'; library ERC721AStorage { struct Layout { // The tokenId of the next token to be minted. uint256 _currentIndex; // The number of tokens burned. uint256 _burnCounter; // Token name string _name; // Token symbol string _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. // See `_packedOwnershipOf` implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` mapping(uint256 => uint256) _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) _packedAddressData; // Mapping from token ID to approved address. mapping(uint256 => address) _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) _operatorApprovals; } bytes32 internal constant STORAGE_SLOT = keccak256('ERC721A.contracts.storage.ERC721A'); function layout() internal pure returns (Layout storage l) { bytes32 slot = STORAGE_SLOT; assembly { l.slot := slot } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165Upgradeable { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Trees proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. * * 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 MerkleProofUpgradeable { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a 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++) { bytes32 proofElement = proof[i]; if (computedHash <= proofElement) { // Hash(current computed hash + current element of the proof) computedHash = _efficientHash(computedHash, proofElement); } else { // Hash(current element of the proof + current computed hash) computedHash = _efficientHash(proofElement, computedHash); } } return computedHash; } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../StringsUpgradeable.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSAUpgradeable { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", StringsUpgradeable.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library StringsUpgradeable { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20Upgradeable.sol"; import "../../../utils/AddressUpgradeable.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 SafeERC20Upgradeable { using AddressUpgradeable for address; function safeTransfer( IERC20Upgradeable token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20Upgradeable 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( IERC20Upgradeable 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( IERC20Upgradeable 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( IERC20Upgradeable 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)); } } /** * @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(IERC20Upgradeable 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.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20Upgradeable { /** * @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 v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuardUpgradeable is Initializable { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; function __ReentrancyGuard_init() internal onlyInitializing { __ReentrancyGuard_init_unchained(); } function __ReentrancyGuard_init_unchained() internal onlyInitializing { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract PausableUpgradeable is Initializable, ContextUpgradeable { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ function __Pausable_init() internal onlyInitializing { __Pausable_init_unchained(); } function __Pausable_init_unchained() internal onlyInitializing { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ``` * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`. */ modifier initializer() { bool isTopLevelCall = _setInitializedVersion(1); if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original * initialization step. This is essential to configure modules that are added through upgrades and that require * initialization. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. */ modifier reinitializer(uint8 version) { bool isTopLevelCall = _setInitializedVersion(version); if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(version); } } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. */ function _disableInitializers() internal virtual { _setInitializedVersion(type(uint8).max); } function _setInitializedVersion(uint8 version) private returns (bool) { // If the contract is initializing we ignore whether _initialized is set in order to support multiple // inheritance patterns, but we only do this in the context of a constructor, and for the lowest level // of initializers, because in other contexts the contract may have been reentered. if (_initializing) { require( version == 1 && !AddressUpgradeable.isContract(address(this)), "Initializable: contract is already initialized" ); return false; } else { require(_initialized < version, "Initializable: contract is already initialized"); _initialized = version; return true; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165Upgradeable.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981Upgradeable is IERC165Upgradeable { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal onlyInitializing { __Ownable_init_unchained(); } function __Ownable_init_unchained() internal onlyInitializing { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 1 }, "evmVersion": "byzantium", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":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":true,"internalType":"contract IERC20Upgradeable","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ERC20PaymentReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"PayeeAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"_denylist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"_minted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"bool","name":"_isDenied","type":"bool"}],"name":"addDenylist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"shares_","type":"uint256"}],"name":"addPayee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"closedBaseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isAllowlistEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isDenylistEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"},{"internalType":"uint256","name":"max","type":"uint256"}],"name":"isWhitelisted","outputs":[],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPerMint","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quantity","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"uint256","name":"_max","type":"uint256"},{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"}],"name":"mintWithProof","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"openBaseURI","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":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"payee","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20Upgradeable","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20Upgradeable","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"removeDenylist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"royaltiesPercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"royaltiesReceiver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","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":"bool","name":"_enable","type":"bool"}],"name":"setAllowlist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI_","type":"string"}],"name":"setClosedBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_enable","type":"bool"}],"name":"setDenylist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isOpen","type":"bool"}],"name":"setIsOpen","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_quantity","type":"uint16"}],"name":"setMaxPerMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_maxSupply","type":"uint16"}],"name":"setMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI_","type":"string"}],"name":"setOpenBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"setSecondaryRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"newMerkleRoot_","type":"bytes32"}],"name":"setWhitelistMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"shares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20Upgradeable","name":"token","type":"address"}],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
608060405234801561001057600080fd5b506138f5806100206000396000f3fe60806040526004361061028d5760e060020a600035046301ffc9a781146102d257806306421c2f1461030757806306fdde0314610329578063081812fc1461034b578063085a10cf14610378578063095ea7b31461039857806318160ddd146103b857806318f9b023146103db57806319165587146103fb578063226bfb0a1461041b57806323b872dd146104305780632a55205a14610450578063325e7e3c1461047e5780633a98ef391461049e5780633f4ba83a146104b3578063406072a9146104c857806342842e0e146104e857806347535d7b1461050857806348b75044146105235780634cd88b7614610543578063507e094f14610563578063530df6bd146105925780635ad1c1b5146105a75780635c975abb146105c75780635cf44020146105df5780636352211e146105f9578063664e8c201461061957806370a0823114610639578063715018a6146106595780637658c8121461066e5780637de77ecc1461068e5780638456cb59146106bb5780638b83209b146106d05780638da5cb5b146106f0578063916f3f501461070557806395d89b411461072557806398167be61461073a5780639852595c1461075a5780639f949f7b1461077a578063a0712d681461079a578063a22cb465146107ad578063a309a672146107cd578063a3a51bd5146107ed578063a75dfe9e1461080e578063b297800a1461083e578063b88d4fde1461085e578063bd32fb661461087e578063c87b56dd1461089e578063cafa8dfe146108be578063ce7c2ac2146108d5578063d146fd1b1461090b578063d5abeb0114610925578063d79779b214610947578063e33b7de314610967578063e985e9c51461097c578063f2fde38b1461099c578063fc832f68146109bc57600080fd5b366102cd577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033346040516102c3929190612f46565b60405180910390a1005b600080fd5b3480156102de57600080fd5b506102f26102ed366004612f75565b6109cf565b60405190151581526020015b60405180910390f35b34801561031357600080fd5b50610327610322366004612f92565b6109fd565b005b34801561033557600080fd5b5061033e610a59565b6040516102fe919061300e565b34801561035757600080fd5b5061036b610366366004613021565b610af4565b6040516102fe919061303a565b34801561038457600080fd5b5061032761039336600461305c565b610b44565b3480156103a457600080fd5b506103276103b336600461308e565b610b8a565b3480156103c457600080fd5b506103cd610c70565b6040519081526020016102fe565b3480156103e757600080fd5b506103276103f636600461308e565b610c8f565b34801561040757600080fd5b506103276104163660046130ba565b610ccf565b34801561042757600080fd5b5061033e610de8565b34801561043c57600080fd5b5061032761044b3660046130d7565b610e77565b34801561045c57600080fd5b5061047061046b366004613118565b610e87565b6040516102fe929190612f46565b34801561048a57600080fd5b5061032761049936600461305c565b610ebf565b3480156104aa57600080fd5b506065546103cd565b3480156104bf57600080fd5b50610327610f04565b3480156104d457600080fd5b506103cd6104e336600461313a565b610f40565b3480156104f457600080fd5b506103276105033660046130d7565b610f6b565b34801561051457600080fd5b50610105546102f29060ff1681565b34801561052f57600080fd5b5061032761053e36600461313a565b610f86565b34801561054f57600080fd5b5061032761055e366004613234565b611139565b34801561056f57600080fd5b506101005461057f9061ffff1681565b60405161ffff90911681526020016102fe565b34801561059e57600080fd5b5061033e611313565b3480156105b357600080fd5b506103276105c236600461305c565b611321565b3480156105d357600080fd5b5060975460ff166102f2565b3480156105eb57600080fd5b5060fb546102f29060ff1681565b34801561060557600080fd5b5061036b610614366004613021565b611366565b34801561062557600080fd5b50610327610634366004613297565b611371565b34801561064557600080fd5b506103cd6106543660046130ba565b6113b7565b34801561066557600080fd5b5061032761141c565b34801561067a57600080fd5b5061032761068936600461333e565b611458565b34801561069a57600080fd5b506103cd6106a93660046130ba565b60ff6020526000908152604090205481565b3480156106c757600080fd5b50610327611527565b3480156106dc57600080fd5b5061036b6106eb366004613021565b611561565b3480156106fc57600080fd5b5061036b611591565b34801561071157600080fd5b50610327610720366004613297565b6115a0565b34801561073157600080fd5b5061033e6115e6565b34801561074657600080fd5b50610327610755366004613382565b6115fe565b34801561076657600080fd5b506103cd6107753660046130ba565b61165b565b34801561078657600080fd5b5061032761079536600461308e565b611676565b6103276107a8366004613021565b6116d0565b3480156107b957600080fd5b506103276107c8366004613382565b61179b565b3480156107d957600080fd5b506103276107e8366004612f92565b611844565b3480156107f957600080fd5b506101025461036b90600160a060020a031681565b34801561081a57600080fd5b506102f26108293660046130ba565b60fc6020526000908152604090205460ff1681565b34801561084a57600080fd5b506103276108593660046130ba565b61188f565b34801561086a57600080fd5b506103276108793660046133b0565b6118e2565b34801561088a57600080fd5b50610327610899366004613021565b61192f565b3480156108aa57600080fd5b5061033e6108b9366004613021565b611966565b3480156108ca57600080fd5b506103cd6101015481565b3480156108e157600080fd5b506103cd6108f03660046130ba565b600160a060020a031660009081526067602052604090205490565b34801561091757600080fd5b5060fd546102f29060ff1681565b34801561093157600080fd5b506101005461057f9062010000900461ffff1681565b34801561095357600080fd5b506103cd6109623660046130ba565b611b10565b34801561097357600080fd5b506066546103cd565b34801561098857600080fd5b506102f261099736600461313a565b611b2b565b3480156109a857600080fd5b506103276109b73660046130ba565b611b68565b6103276109ca36600461342f565b611c11565b6000600160e060020a0319821660e160020a63152a902d0214806109f757506109f782611cdf565b92915050565b33610a06611591565b600160a060020a031614610a385760405160e560020a62461bcd028152600401610a2f9061347e565b60405180910390fd5b610100805461ffff909216620100000263ffff000019909216919091179055565b6060610a63611d36565b6002018054610a71906134b3565b80601f0160208091040260200160405190810160405280929190818152602001828054610a9d906134b3565b8015610aea5780601f10610abf57610100808354040283529160200191610aea565b820191906000526020600020905b815481529060010190602001808311610acd57829003601f168201915b5050505050905090565b6000610aff82611d5a565b610b1f5760405160e260020a6333d1c03902815260040160405180910390fd5b610b27611d36565b6000928352600601602052506040902054600160a060020a031690565b33610b4d611591565b600160a060020a031614610b765760405160e560020a62461bcd028152600401610a2f9061347e565b610105805460ff1916911515919091179055565b6000610b9582611d96565b905080600160a060020a031683600160a060020a031603610bcc5760405160e260020a63250fdee302815260040160405180910390fd5b33600160a060020a03821614610c0657610be68133611b2b565b610c065760405160e160020a6367d9dca102815260040160405180910390fd5b82610c0f611d36565b600084815260069190910160205260408082208054600160a060020a031916600160a060020a0394851617905551849286811692908516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259190a4505050565b600080610c7b611d36565b60010154610c87611d36565b540303919050565b33610c98611591565b600160a060020a031614610cc15760405160e560020a62461bcd028152600401610a2f9061347e565b610ccb8282611e25565b5050565b600160a060020a038116600090815260676020526040902054610d075760405160e560020a62461bcd028152600401610a2f906134f1565b6000610d1260665490565b610d1d903031613554565b90506000610d348383610d2f8661165b565b612012565b905080600003610d595760405160e560020a62461bcd028152600401610a2f9061356c565b600160a060020a03831660009081526068602052604081208054839290610d81908490613554565b925050819055508060666000828254610d9a9190613554565b90915550610daa90508382612058565b7fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b0568382604051610ddb929190612f46565b60405180910390a1505050565b6101038054610df6906134b3565b80601f0160208091040260200160405190810160405280929190818152602001828054610e22906134b3565b8015610e6f5780601f10610e4457610100808354040283529160200191610e6f565b820191906000526020600020905b815481529060010190602001808311610e5257829003601f168201915b505050505081565b610e82838383612178565b505050565b600080600060646101015485610e9d91906135ba565b610ea791906135d9565b61010254600160a060020a0316969095509350505050565b33610ec8611591565b600160a060020a031614610ef15760405160e560020a62461bcd028152600401610a2f9061347e565b60fb805460ff1916911515919091179055565b33610f0d611591565b600160a060020a031614610f365760405160e560020a62461bcd028152600401610a2f9061347e565b610f3e61239b565b565b600160a060020a039182166000908152606b6020908152604080832093909416825291909152205490565b610e82838383604051806020016040528060008152506118e2565b600160a060020a038116600090815260676020526040902054610fbe5760405160e560020a62461bcd028152600401610a2f906134f1565b6000610fc983611b10565b60405160e060020a6370a08231028152600160a060020a038516906370a0823190610ff890309060040161303a565b602060405180830381865afa158015611015573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061103991906135ff565b6110439190613554565b905060006110568383610d2f8787610f40565b90508060000361107b5760405160e560020a62461bcd028152600401610a2f9061356c565b600160a060020a038085166000908152606b60209081526040808320938716835292905290812080548392906110b2908490613554565b9091555050600160a060020a0384166000908152606a6020526040812080548392906110df908490613554565b909155506110f0905084848361242e565b83600160a060020a03167f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a848360405161112b929190612f46565b60405180910390a250505050565b60006111456001612487565b9050801561115d576000805461ff0019166101001790555b61116561251c565b54610100900460ff166111845761117a61251c565b5460ff1615611188565b303b155b6111e85760405160e560020a62461bcd02815260206004820152603760248201526000805160206138808339815191526044820152604a60020a76081a5cc8185b1c9958591e481a5b9a5d1a585b1a5e9959026064820152608401610a2f565b60006111f261251c565b54610100900460ff16159050801561123e57600161120e61251c565b80549115156101000261ff0019909216919091179055600161122e61251c565b805460ff19169115159190911790555b610105805460ff199081169091556101008054632710000263ffffffff1990911617905560fd805490911660011790556101028054600160a060020a0319163017905560646101015561128f612540565b611297612572565b61129f6125a4565b6112a984846125d6565b80156112d05760006112b961251c565b80549115156101000261ff00199092169190911790555b508015610e82576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602001610ddb565b6101048054610df6906134b3565b3361132a611591565b600160a060020a0316146113535760405160e560020a62461bcd028152600401610a2f9061347e565b60fd805460ff1916911515919091179055565b60006109f782611d96565b3361137a611591565b600160a060020a0316146113a35760405160e560020a62461bcd028152600401610a2f9061347e565b8051610ccb90610103906020840190612ead565b6000816000036113dd5760405160e260020a6323d3ad8102815260040160405180910390fd5b6001604060020a036113ed611d36565b600501600084600160a060020a0316600160a060020a0316815260200190815260200160002054169050919050565b33611425611591565b600160a060020a03161461144e5760405160e560020a62461bcd028152600401610a2f9061347e565b610f3e6000612610565b60fe546000036114a65760405160e560020a62461bcd0281526020600482015260136024820152606a60020a721b595c9adb19481d1c9959481b9bdd081cd95d026044820152606401610a2f565b6114e18260fe546114b43390565b846040516020016114c6929190612f46565b60405160208183030381529060405280519060200120612662565b610ccb5760405160e560020a62461bcd0281526020600482015260116024820152607a60020a701d985b1a59185d1a5bdb8819985a5b1959026044820152606401610a2f565b33611530611591565b600160a060020a0316146115595760405160e560020a62461bcd028152600401610a2f9061347e565b610f3e612678565b60006069828154811061157657611576613618565b600091825260209091200154600160a060020a031692915050565b603354600160a060020a031690565b336115a9611591565b600160a060020a0316146115d25760405160e560020a62461bcd028152600401610a2f9061347e565b8051610ccb90610104906020840190612ead565b60606115f0611d36565b6003018054610a71906134b3565b33611607611591565b600160a060020a0316146116305760405160e560020a62461bcd028152600401610a2f9061347e565b600160a060020a0391909116600090815260fc60205260409020805460ff1916911515919091179055565b600160a060020a031660009081526068602052604090205490565b3361167f611591565b600160a060020a0316146116a85760405160e560020a62461bcd028152600401610a2f9061347e565b6101028054600160a060020a031916600160a060020a03939093169290921790915561010155565b600260c954036116f55760405160e560020a62461bcd028152600401610a2f90613632565b600260c95560975460ff16156117205760405160e560020a62461bcd028152600401610a2f90613669565b60fd5460ff161561176d5760405160e560020a62461bcd0281526020600482015260116024820152607a60020a701dda1a5d195b1a5cdd08195b98589b1959026044820152606401610a2f565b6101005461178090829061ffff166126d3565b61178a3382612803565b6117938161281d565b50600160c955565b33600160a060020a038316036117c75760405160e060020a63b06307db02815260040160405180910390fd5b806117d0611d36565b33600081815260079290920160209081526040808420600160a060020a03881680865290835293819020805460ff19169515159590951790945592518415158152919290917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b3361184d611591565b600160a060020a0316146118765760405160e560020a62461bcd028152600401610a2f9061347e565b610100805461ffff191661ffff92909216919091179055565b33611898611591565b600160a060020a0316146118c15760405160e560020a62461bcd028152600401610a2f9061347e565b600160a060020a0316600090815260fc60205260409020805460ff19169055565b6118ed848484612178565b600160a060020a0383163b156119295761190984848484612844565b6119295760405160e160020a6368d2bf6b02815260040160405180910390fd5b50505050565b33611938611591565b600160a060020a0316146119615760405160e560020a62461bcd028152600401610a2f9061347e565b60fe55565b606061197182611d5a565b6119915760405160e460020a630a14c4b502815260040160405180910390fd5b600061010480546119a1906134b3565b80601f01602080910402602001604051908101604052809291908181526020018280546119cd906134b3565b8015611a1a5780601f106119ef57610100808354040283529160200191611a1a565b820191906000526020600020905b8154815290600101906020018083116119fd57829003601f168201915b505061010554939450505060ff909116159050611ac0576101038054611a3f906134b3565b80601f0160208091040260200160405190810160405280929190818152602001828054611a6b906134b3565b8015611ab85780601f10611a8d57610100808354040283529160200191611ab8565b820191906000526020600020905b815481529060010190602001808311611a9b57829003601f168201915b505050505090505b8051600003611ade5760405180602001604052806000815250611b09565b80611ae884612938565b604051602001611af9929190613696565b6040516020818303038152906040525b9392505050565b600160a060020a03166000908152606a602052604090205490565b6000611b35611d36565b600160a060020a039384166000908152600791909101602090815260408083209490951682529290925250205460ff1690565b33611b71611591565b600160a060020a031614611b9a5760405160e560020a62461bcd028152600401610a2f9061347e565b600160a060020a038116611c055760405160e560020a62461bcd02815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061604482015260d060020a65646472657373026064820152608401610a2f565b611c0e81612610565b50565b600260c95403611c365760405160e560020a62461bcd028152600401610a2f90613632565b600260c95560975460ff1615611c615760405160e560020a62461bcd028152600401610a2f90613669565b60fd5460ff16611cae5760405160e560020a62461bcd0281526020600482015260126024820152607260020a711dda1a5d195b1a5cdd08191a5cd8589b1959026044820152606401610a2f565b611cb88183611458565b611cc283836126d3565b611ccc3384612803565b611cd58361281d565b5050600160c95550565b600060e060020a6301ffc9a702600160e060020a031983161480611d16575060e060020a6380ac58cd02600160e060020a03198316145b806109f7575050600160e060020a03191660e060020a635b5e139f021490565b7f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4090565b6000611d64611d36565b54821080156109f7575060e060020a611d7b611d36565b60008481526004919091016020526040902054161592915050565b600081611da1611d36565b54811015611e09576000611db3611d36565b60008381526004919091016020526040812054915060e060020a82169003611e07575b80600003611b0957611de6611d36565b60001990920160008181526004939093016020526040909220549050611dd6565b505b60405160e160020a636f96cda102815260040160405180910390fd5b600160a060020a038216611e965760405160e560020a62461bcd02815260206004820152602c60248201527f5061796d656e7453706c69747465723a206163636f756e742069732074686520604482015260a060020a6b7a65726f2061646472657373026064820152608401610a2f565b60008111611ee95760405160e560020a62461bcd02815260206004820152601d60248201527f5061796d656e7453706c69747465723a207368617265732061726520300000006044820152606401610a2f565b600160a060020a03821660009081526067602052604090205415611f695760405160e560020a62461bcd02815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e7420616c7265616479604482015260a860020a6a2068617320736861726573026064820152608401610a2f565b60698054600181019091557f7fb4302e8e91f9110a6554c2c0a24601252c2a42c2220ca988efcfe399914308018054600160a060020a031916600160a060020a0384169081179091556000908152606760205260409020819055606554611fd1908290613554565b6065556040517f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac906120069084908490612f46565b60405180910390a15050565b606554600160a060020a0384166000908152606760205260408120549091839161203c90866135ba565b61204691906135d9565b61205091906136d8565b949350505050565b30318111156120ac5760405160e560020a62461bcd02815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610a2f565b600082600160a060020a03168260405160006040518083038185875af1925050503d80600081146120f9576040519150601f19603f3d011682016040523d82523d6000602084013e6120fe565b606091505b5050905080610e825760405160e560020a62461bcd02815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610a2f565b600061218382611d96565b905083600160a060020a031681600160a060020a0316146121b95760405160e860020a62a1148102815260040160405180910390fd5b60006121c3611d36565b60008481526006919091016020526040812054600160a060020a03908116925086163314806121f757506121f78633611b2b565b8061220a5750600160a060020a03821633145b90508061222d5760405160e160020a632ce44b5f02815260040160405180910390fd5b846000036122515760405160e260020a633a954ecd02815260040160405180910390fd5b81156122805761225f611d36565b6000858152600691909101602052604090208054600160a060020a03191690555b612288611d36565b600160a060020a03871660009081526005919091016020526040902080546000190190556122b4611d36565b600160a060020a0386166000908152600591909101602052604090208054600101905560e160020a4260a060020a028617176122ee611d36565b6000868152600491909101602052604081209190915560e160020a84169003612364576001840161231d611d36565b6000828152600491909101602052604081205490036123625761233e611d36565b548114612362578361234e611d36565b600083815260049190910160205260409020555b505b8385600160a060020a031687600160a060020a03166000805160206138a083398151915260405160405180910390a4505050505050565b60975460ff166123ea5760405160e560020a62461bcd0281526020600482015260146024820152606260020a7314185d5cd8589b194e881b9bdd081c185d5cd959026044820152606401610a2f565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b604051612424919061303a565b60405180910390a1565b610e828363a9059cbb60e060020a028484604051602401612450929190612f46565b60408051601f19818403018152919052602081018051600160e060020a0316600160e060020a031990931692909217909152612987565b60008054610100900460ff16156124d8578160ff1660011480156124b157506124af30612a5f565b155b6124d05760405160e560020a62461bcd028152600401610a2f906136ef565b506000919050565b60005460ff8084169116106125025760405160e560020a62461bcd028152600401610a2f906136ef565b506000805460ff191660ff92909216919091179055600190565b7fee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85f90565b600054610100900460ff1661256a5760405160e560020a62461bcd028152600401610a2f90613740565b610f3e612a6e565b600054610100900460ff1661259c5760405160e560020a62461bcd028152600401610a2f90613740565b610f3e612aa1565b600054610100900460ff166125ce5760405160e560020a62461bcd028152600401610a2f90613740565b610f3e612ad2565b6125de61251c565b54610100900460ff166126065760405160e560020a62461bcd028152600401610a2f9061378e565b610ccb8282612b08565b60338054600160a060020a03838116600160a060020a0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008261266f8584612b87565b14949350505050565b60975460ff161561269e5760405160e560020a62461bcd028152600401610a2f90613669565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586124173390565b6101005462010000900461ffff16826126ea610c70565b6126f49190613554565b111561273e5760405160e560020a62461bcd0281526020600482015260136024820152606a60020a721b585e081cdd5c1c1b1e48195e18d959591959026044820152606401610a2f565b33600090815260ff602052604090205461275890826136d8565b8211156127a45760405160e560020a62461bcd0281526020600482015260146024820152606260020a731b585e081d1bc81b5a5b9d08195e18d959591959026044820152606401610a2f565b60fb5460ff1615610ccb5733600090815260fc602052604090205460ff1615610ccb5760405160e560020a62461bcd02815260206004820152600b602482015260aa60020a6a1a5b8819195b9e5b1a5cdd026044820152606401610a2f565b610ccb828260405180602001604052806000815250612bfb565b33600090815260ff60205260408120805483929061283c908490613554565b909155505050565b60405160e160020a630a85bd01028152600090600160a060020a0385169063150b7a029061287c9033908990889088906004016137d3565b6020604051808303816000875af19250505080156128b7575060408051601f3d908101601f191682019092526128b491810190613810565b60015b612918573d8080156128e5576040519150601f19603f3d011682016040523d82523d6000602084013e6128ea565b606091505b5080516000036129105760405160e160020a6368d2bf6b02815260040160405180910390fd5b805181602001fd5b600160e060020a03191660e160020a630a85bd0102149050949350505050565b604080516080810191829052607f0190826030600a8206018353600a90045b801561297557600183039250600a81066030018353600a9004612957565b50819003601f19909101908152919050565b60006129dc826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525085600160a060020a0316612d959092919063ffffffff16565b805190915015610e8257808060200190518101906129fa919061382d565b610e825760405160e560020a62461bcd02815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e604482015260b260020a691bdd081cdd58d8d95959026064820152608401610a2f565b600160a060020a03163b151590565b600054610100900460ff16612a985760405160e560020a62461bcd028152600401610a2f90613740565b610f3e33612610565b600054610100900460ff16612acb5760405160e560020a62461bcd028152600401610a2f90613740565b600160c955565b600054610100900460ff16612afc5760405160e560020a62461bcd028152600401610a2f90613740565b6097805460ff19169055565b612b1061251c565b54610100900460ff16612b385760405160e560020a62461bcd028152600401610a2f9061378e565b81612b41611d36565b6002019080519060200190612b57929190612ead565b5080612b61611d36565b6003019080519060200190612b77929190612ead565b506000612b82611d36565b555050565b600081815b8451811015612bf3576000858281518110612ba957612ba9613618565b60200260200101519050808311612bcf5760008381526020829052604090209250612be0565b600081815260208490526040902092505b5080612beb8161384a565b915050612b8c565b509392505050565b6000612c05611d36565b54905083600003612c2b5760405160e860020a622e076302815260040160405180910390fd5b82600003612c4f5760405160e060020a63b562e8dd02815260040160405180910390fd5b6001604060020a018302612c61611d36565b600160a060020a0386166000908152600591909101602052604090208054909101905560e1612c906001851490565b60029190910a024260a060020a02851717612ca9611d36565b6000838152600491909101602052604090205580838101600160a060020a0386163b15612d4a575b6040518290600160a060020a038816906000906000805160206138a0833981519152908290a4612d0a6000878480600101955087612844565b612d2a5760405160e160020a6368d2bf6b02815260040160405180910390fd5b808210612cd15782612d3a611d36565b5414612d4557600080fd5b612d7d565b5b604051600183019290600160a060020a038816906000906000805160206138a0833981519152908290a4808210612d4b575b81612d86611d36565b55506119299050600085838684565b6060612050848460008585612da985612a5f565b612df85760405160e560020a62461bcd02815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a2f565b60008086600160a060020a03168587604051612e149190613863565b60006040518083038185875af1925050503d8060008114612e51576040519150601f19603f3d011682016040523d82523d6000602084013e612e56565b606091505b5091509150612e66828286612e71565b979650505050505050565b60608315612e80575081611b09565b825115612e905782518084602001fd5b8160405160e560020a62461bcd028152600401610a2f919061300e565b828054612eb9906134b3565b90600052602060002090601f016020900481019282612edb5760008555612f21565b82601f10612ef457805160ff1916838001178555612f21565b82800160010185558215612f21579182015b82811115612f21578251825591602001919060010190612f06565b50612f2d929150612f31565b5090565b5b80821115612f2d5760008155600101612f32565b600160a060020a03929092168252602082015260400190565b600160e060020a031981168114611c0e57600080fd5b600060208284031215612f8757600080fd5b8135611b0981612f5f565b600060208284031215612fa457600080fd5b813561ffff81168114611b0957600080fd5b60005b83811015612fd1578181015183820152602001612fb9565b838111156119295750506000910152565b60008151808452612ffa816020860160208601612fb6565b601f01601f19169290920160200192915050565b602081526000611b096020830184612fe2565b60006020828403121561303357600080fd5b5035919050565b600160a060020a0391909116815260200190565b8015158114611c0e57600080fd5b60006020828403121561306e57600080fd5b8135611b098161304e565b600160a060020a0381168114611c0e57600080fd5b600080604083850312156130a157600080fd5b82356130ac81613079565b946020939093013593505050565b6000602082840312156130cc57600080fd5b8135611b0981613079565b6000806000606084860312156130ec57600080fd5b83356130f781613079565b9250602084013561310781613079565b929592945050506040919091013590565b6000806040838503121561312b57600080fd5b50508035926020909101359150565b6000806040838503121561314d57600080fd5b823561315881613079565b9150602083013561316881613079565b809150509250929050565b60e060020a634e487b710260009081526041600452602490fd5b604051601f8201601f191681016001604060020a03811182821017156131b5576131b5613173565b604052919050565b60006001604060020a038311156131d6576131d6613173565b6131e9601f8401601f191660200161318d565b90508281528383830111156131fd57600080fd5b828260208301376000602084830101529392505050565b600082601f83011261322557600080fd5b611b09838335602085016131bd565b6000806040838503121561324757600080fd5b82356001604060020a038082111561325e57600080fd5b61326a86838701613214565b9350602085013591508082111561328057600080fd5b5061328d85828601613214565b9150509250929050565b6000602082840312156132a957600080fd5b81356001604060020a038111156132bf57600080fd5b61205084828501613214565b600082601f8301126132dc57600080fd5b813560206001604060020a038211156132f7576132f7613173565b80820261330582820161318d565b928352848101820192828101908785111561331f57600080fd5b83870192505b84831015612e6657823582529183019190830190613325565b6000806040838503121561335157600080fd5b82356001604060020a0381111561336757600080fd5b613373858286016132cb565b95602094909401359450505050565b6000806040838503121561339557600080fd5b82356133a081613079565b915060208301356131688161304e565b600080600080608085870312156133c657600080fd5b84356133d181613079565b935060208501356133e181613079565b92506040850135915060608501356001604060020a0381111561340357600080fd5b8501601f8101871361341457600080fd5b613423878235602084016131bd565b91505092959194509250565b60008060006060848603121561344457600080fd5b833592506020840135915060408401356001604060020a0381111561346857600080fd5b613474868287016132cb565b9150509250925092565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6002810460018216806134c757607f821691505b6020821081036134eb5760e060020a634e487b710260009081526022600452602490fd5b50919050565b60208082526026908201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f20604082015260d060020a6573686172657302606082015260800190565b60e060020a634e487b710260009081526011600452602490fd5b600082198211156135675761356761353a565b500190565b6020808252602b908201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f7420604082015260aa60020a6a191d59481c185e5b595b9d02606082015260800190565b60008160001904831182151516156135d4576135d461353a565b500290565b6000826135fa5760e060020a634e487b710260009081526012600452602490fd5b500490565b60006020828403121561361157600080fd5b5051919050565b60e060020a634e487b710260009081526032600452602490fd5b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6020808252601090820152608260020a6f14185d5cd8589b194e881c185d5cd95902604082015260600190565b600083516136a8818460208801612fb6565b8351908301906136bc818360208801612fb6565b60d960020a64173539b7b7029101908152600501949350505050565b6000828210156136ea576136ea61353a565b500390565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c7265616040820152609260020a6d191e481a5b9a5d1a585b1a5e995902606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f742069604082015260a860020a6a6e697469616c697a696e6702606082015260800190565b60208082526034908201526000805160206138808339815191526040820152606060020a73206973206e6f7420696e697469616c697a696e6702606082015260800190565b600160a060020a038581168252841660208201526040810183905260806060820181905260009061380690830184612fe2565b9695505050505050565b60006020828403121561382257600080fd5b8151611b0981612f5f565b60006020828403121561383f57600080fd5b8151611b098161304e565b60006001820161385c5761385c61353a565b5060010190565b60008251613875818460208701612fb6565b919091019291505056fe455243373231415f5f496e697469616c697a61626c653a20636f6e7472616374ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220b199622ca39bbbc6e2d0304fa508eefe707cbb2ee7ac7fc7453371764944eab764736f6c634300080e0033
Deployed Bytecode
0x60806040526004361061028d5760e060020a600035046301ffc9a781146102d257806306421c2f1461030757806306fdde0314610329578063081812fc1461034b578063085a10cf14610378578063095ea7b31461039857806318160ddd146103b857806318f9b023146103db57806319165587146103fb578063226bfb0a1461041b57806323b872dd146104305780632a55205a14610450578063325e7e3c1461047e5780633a98ef391461049e5780633f4ba83a146104b3578063406072a9146104c857806342842e0e146104e857806347535d7b1461050857806348b75044146105235780634cd88b7614610543578063507e094f14610563578063530df6bd146105925780635ad1c1b5146105a75780635c975abb146105c75780635cf44020146105df5780636352211e146105f9578063664e8c201461061957806370a0823114610639578063715018a6146106595780637658c8121461066e5780637de77ecc1461068e5780638456cb59146106bb5780638b83209b146106d05780638da5cb5b146106f0578063916f3f501461070557806395d89b411461072557806398167be61461073a5780639852595c1461075a5780639f949f7b1461077a578063a0712d681461079a578063a22cb465146107ad578063a309a672146107cd578063a3a51bd5146107ed578063a75dfe9e1461080e578063b297800a1461083e578063b88d4fde1461085e578063bd32fb661461087e578063c87b56dd1461089e578063cafa8dfe146108be578063ce7c2ac2146108d5578063d146fd1b1461090b578063d5abeb0114610925578063d79779b214610947578063e33b7de314610967578063e985e9c51461097c578063f2fde38b1461099c578063fc832f68146109bc57600080fd5b366102cd577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033346040516102c3929190612f46565b60405180910390a1005b600080fd5b3480156102de57600080fd5b506102f26102ed366004612f75565b6109cf565b60405190151581526020015b60405180910390f35b34801561031357600080fd5b50610327610322366004612f92565b6109fd565b005b34801561033557600080fd5b5061033e610a59565b6040516102fe919061300e565b34801561035757600080fd5b5061036b610366366004613021565b610af4565b6040516102fe919061303a565b34801561038457600080fd5b5061032761039336600461305c565b610b44565b3480156103a457600080fd5b506103276103b336600461308e565b610b8a565b3480156103c457600080fd5b506103cd610c70565b6040519081526020016102fe565b3480156103e757600080fd5b506103276103f636600461308e565b610c8f565b34801561040757600080fd5b506103276104163660046130ba565b610ccf565b34801561042757600080fd5b5061033e610de8565b34801561043c57600080fd5b5061032761044b3660046130d7565b610e77565b34801561045c57600080fd5b5061047061046b366004613118565b610e87565b6040516102fe929190612f46565b34801561048a57600080fd5b5061032761049936600461305c565b610ebf565b3480156104aa57600080fd5b506065546103cd565b3480156104bf57600080fd5b50610327610f04565b3480156104d457600080fd5b506103cd6104e336600461313a565b610f40565b3480156104f457600080fd5b506103276105033660046130d7565b610f6b565b34801561051457600080fd5b50610105546102f29060ff1681565b34801561052f57600080fd5b5061032761053e36600461313a565b610f86565b34801561054f57600080fd5b5061032761055e366004613234565b611139565b34801561056f57600080fd5b506101005461057f9061ffff1681565b60405161ffff90911681526020016102fe565b34801561059e57600080fd5b5061033e611313565b3480156105b357600080fd5b506103276105c236600461305c565b611321565b3480156105d357600080fd5b5060975460ff166102f2565b3480156105eb57600080fd5b5060fb546102f29060ff1681565b34801561060557600080fd5b5061036b610614366004613021565b611366565b34801561062557600080fd5b50610327610634366004613297565b611371565b34801561064557600080fd5b506103cd6106543660046130ba565b6113b7565b34801561066557600080fd5b5061032761141c565b34801561067a57600080fd5b5061032761068936600461333e565b611458565b34801561069a57600080fd5b506103cd6106a93660046130ba565b60ff6020526000908152604090205481565b3480156106c757600080fd5b50610327611527565b3480156106dc57600080fd5b5061036b6106eb366004613021565b611561565b3480156106fc57600080fd5b5061036b611591565b34801561071157600080fd5b50610327610720366004613297565b6115a0565b34801561073157600080fd5b5061033e6115e6565b34801561074657600080fd5b50610327610755366004613382565b6115fe565b34801561076657600080fd5b506103cd6107753660046130ba565b61165b565b34801561078657600080fd5b5061032761079536600461308e565b611676565b6103276107a8366004613021565b6116d0565b3480156107b957600080fd5b506103276107c8366004613382565b61179b565b3480156107d957600080fd5b506103276107e8366004612f92565b611844565b3480156107f957600080fd5b506101025461036b90600160a060020a031681565b34801561081a57600080fd5b506102f26108293660046130ba565b60fc6020526000908152604090205460ff1681565b34801561084a57600080fd5b506103276108593660046130ba565b61188f565b34801561086a57600080fd5b506103276108793660046133b0565b6118e2565b34801561088a57600080fd5b50610327610899366004613021565b61192f565b3480156108aa57600080fd5b5061033e6108b9366004613021565b611966565b3480156108ca57600080fd5b506103cd6101015481565b3480156108e157600080fd5b506103cd6108f03660046130ba565b600160a060020a031660009081526067602052604090205490565b34801561091757600080fd5b5060fd546102f29060ff1681565b34801561093157600080fd5b506101005461057f9062010000900461ffff1681565b34801561095357600080fd5b506103cd6109623660046130ba565b611b10565b34801561097357600080fd5b506066546103cd565b34801561098857600080fd5b506102f261099736600461313a565b611b2b565b3480156109a857600080fd5b506103276109b73660046130ba565b611b68565b6103276109ca36600461342f565b611c11565b6000600160e060020a0319821660e160020a63152a902d0214806109f757506109f782611cdf565b92915050565b33610a06611591565b600160a060020a031614610a385760405160e560020a62461bcd028152600401610a2f9061347e565b60405180910390fd5b610100805461ffff909216620100000263ffff000019909216919091179055565b6060610a63611d36565b6002018054610a71906134b3565b80601f0160208091040260200160405190810160405280929190818152602001828054610a9d906134b3565b8015610aea5780601f10610abf57610100808354040283529160200191610aea565b820191906000526020600020905b815481529060010190602001808311610acd57829003601f168201915b5050505050905090565b6000610aff82611d5a565b610b1f5760405160e260020a6333d1c03902815260040160405180910390fd5b610b27611d36565b6000928352600601602052506040902054600160a060020a031690565b33610b4d611591565b600160a060020a031614610b765760405160e560020a62461bcd028152600401610a2f9061347e565b610105805460ff1916911515919091179055565b6000610b9582611d96565b905080600160a060020a031683600160a060020a031603610bcc5760405160e260020a63250fdee302815260040160405180910390fd5b33600160a060020a03821614610c0657610be68133611b2b565b610c065760405160e160020a6367d9dca102815260040160405180910390fd5b82610c0f611d36565b600084815260069190910160205260408082208054600160a060020a031916600160a060020a0394851617905551849286811692908516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259190a4505050565b600080610c7b611d36565b60010154610c87611d36565b540303919050565b33610c98611591565b600160a060020a031614610cc15760405160e560020a62461bcd028152600401610a2f9061347e565b610ccb8282611e25565b5050565b600160a060020a038116600090815260676020526040902054610d075760405160e560020a62461bcd028152600401610a2f906134f1565b6000610d1260665490565b610d1d903031613554565b90506000610d348383610d2f8661165b565b612012565b905080600003610d595760405160e560020a62461bcd028152600401610a2f9061356c565b600160a060020a03831660009081526068602052604081208054839290610d81908490613554565b925050819055508060666000828254610d9a9190613554565b90915550610daa90508382612058565b7fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b0568382604051610ddb929190612f46565b60405180910390a1505050565b6101038054610df6906134b3565b80601f0160208091040260200160405190810160405280929190818152602001828054610e22906134b3565b8015610e6f5780601f10610e4457610100808354040283529160200191610e6f565b820191906000526020600020905b815481529060010190602001808311610e5257829003601f168201915b505050505081565b610e82838383612178565b505050565b600080600060646101015485610e9d91906135ba565b610ea791906135d9565b61010254600160a060020a0316969095509350505050565b33610ec8611591565b600160a060020a031614610ef15760405160e560020a62461bcd028152600401610a2f9061347e565b60fb805460ff1916911515919091179055565b33610f0d611591565b600160a060020a031614610f365760405160e560020a62461bcd028152600401610a2f9061347e565b610f3e61239b565b565b600160a060020a039182166000908152606b6020908152604080832093909416825291909152205490565b610e82838383604051806020016040528060008152506118e2565b600160a060020a038116600090815260676020526040902054610fbe5760405160e560020a62461bcd028152600401610a2f906134f1565b6000610fc983611b10565b60405160e060020a6370a08231028152600160a060020a038516906370a0823190610ff890309060040161303a565b602060405180830381865afa158015611015573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061103991906135ff565b6110439190613554565b905060006110568383610d2f8787610f40565b90508060000361107b5760405160e560020a62461bcd028152600401610a2f9061356c565b600160a060020a038085166000908152606b60209081526040808320938716835292905290812080548392906110b2908490613554565b9091555050600160a060020a0384166000908152606a6020526040812080548392906110df908490613554565b909155506110f0905084848361242e565b83600160a060020a03167f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a848360405161112b929190612f46565b60405180910390a250505050565b60006111456001612487565b9050801561115d576000805461ff0019166101001790555b61116561251c565b54610100900460ff166111845761117a61251c565b5460ff1615611188565b303b155b6111e85760405160e560020a62461bcd02815260206004820152603760248201526000805160206138808339815191526044820152604a60020a76081a5cc8185b1c9958591e481a5b9a5d1a585b1a5e9959026064820152608401610a2f565b60006111f261251c565b54610100900460ff16159050801561123e57600161120e61251c565b80549115156101000261ff0019909216919091179055600161122e61251c565b805460ff19169115159190911790555b610105805460ff199081169091556101008054632710000263ffffffff1990911617905560fd805490911660011790556101028054600160a060020a0319163017905560646101015561128f612540565b611297612572565b61129f6125a4565b6112a984846125d6565b80156112d05760006112b961251c565b80549115156101000261ff00199092169190911790555b508015610e82576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602001610ddb565b6101048054610df6906134b3565b3361132a611591565b600160a060020a0316146113535760405160e560020a62461bcd028152600401610a2f9061347e565b60fd805460ff1916911515919091179055565b60006109f782611d96565b3361137a611591565b600160a060020a0316146113a35760405160e560020a62461bcd028152600401610a2f9061347e565b8051610ccb90610103906020840190612ead565b6000816000036113dd5760405160e260020a6323d3ad8102815260040160405180910390fd5b6001604060020a036113ed611d36565b600501600084600160a060020a0316600160a060020a0316815260200190815260200160002054169050919050565b33611425611591565b600160a060020a03161461144e5760405160e560020a62461bcd028152600401610a2f9061347e565b610f3e6000612610565b60fe546000036114a65760405160e560020a62461bcd0281526020600482015260136024820152606a60020a721b595c9adb19481d1c9959481b9bdd081cd95d026044820152606401610a2f565b6114e18260fe546114b43390565b846040516020016114c6929190612f46565b60405160208183030381529060405280519060200120612662565b610ccb5760405160e560020a62461bcd0281526020600482015260116024820152607a60020a701d985b1a59185d1a5bdb8819985a5b1959026044820152606401610a2f565b33611530611591565b600160a060020a0316146115595760405160e560020a62461bcd028152600401610a2f9061347e565b610f3e612678565b60006069828154811061157657611576613618565b600091825260209091200154600160a060020a031692915050565b603354600160a060020a031690565b336115a9611591565b600160a060020a0316146115d25760405160e560020a62461bcd028152600401610a2f9061347e565b8051610ccb90610104906020840190612ead565b60606115f0611d36565b6003018054610a71906134b3565b33611607611591565b600160a060020a0316146116305760405160e560020a62461bcd028152600401610a2f9061347e565b600160a060020a0391909116600090815260fc60205260409020805460ff1916911515919091179055565b600160a060020a031660009081526068602052604090205490565b3361167f611591565b600160a060020a0316146116a85760405160e560020a62461bcd028152600401610a2f9061347e565b6101028054600160a060020a031916600160a060020a03939093169290921790915561010155565b600260c954036116f55760405160e560020a62461bcd028152600401610a2f90613632565b600260c95560975460ff16156117205760405160e560020a62461bcd028152600401610a2f90613669565b60fd5460ff161561176d5760405160e560020a62461bcd0281526020600482015260116024820152607a60020a701dda1a5d195b1a5cdd08195b98589b1959026044820152606401610a2f565b6101005461178090829061ffff166126d3565b61178a3382612803565b6117938161281d565b50600160c955565b33600160a060020a038316036117c75760405160e060020a63b06307db02815260040160405180910390fd5b806117d0611d36565b33600081815260079290920160209081526040808420600160a060020a03881680865290835293819020805460ff19169515159590951790945592518415158152919290917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b3361184d611591565b600160a060020a0316146118765760405160e560020a62461bcd028152600401610a2f9061347e565b610100805461ffff191661ffff92909216919091179055565b33611898611591565b600160a060020a0316146118c15760405160e560020a62461bcd028152600401610a2f9061347e565b600160a060020a0316600090815260fc60205260409020805460ff19169055565b6118ed848484612178565b600160a060020a0383163b156119295761190984848484612844565b6119295760405160e160020a6368d2bf6b02815260040160405180910390fd5b50505050565b33611938611591565b600160a060020a0316146119615760405160e560020a62461bcd028152600401610a2f9061347e565b60fe55565b606061197182611d5a565b6119915760405160e460020a630a14c4b502815260040160405180910390fd5b600061010480546119a1906134b3565b80601f01602080910402602001604051908101604052809291908181526020018280546119cd906134b3565b8015611a1a5780601f106119ef57610100808354040283529160200191611a1a565b820191906000526020600020905b8154815290600101906020018083116119fd57829003601f168201915b505061010554939450505060ff909116159050611ac0576101038054611a3f906134b3565b80601f0160208091040260200160405190810160405280929190818152602001828054611a6b906134b3565b8015611ab85780601f10611a8d57610100808354040283529160200191611ab8565b820191906000526020600020905b815481529060010190602001808311611a9b57829003601f168201915b505050505090505b8051600003611ade5760405180602001604052806000815250611b09565b80611ae884612938565b604051602001611af9929190613696565b6040516020818303038152906040525b9392505050565b600160a060020a03166000908152606a602052604090205490565b6000611b35611d36565b600160a060020a039384166000908152600791909101602090815260408083209490951682529290925250205460ff1690565b33611b71611591565b600160a060020a031614611b9a5760405160e560020a62461bcd028152600401610a2f9061347e565b600160a060020a038116611c055760405160e560020a62461bcd02815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061604482015260d060020a65646472657373026064820152608401610a2f565b611c0e81612610565b50565b600260c95403611c365760405160e560020a62461bcd028152600401610a2f90613632565b600260c95560975460ff1615611c615760405160e560020a62461bcd028152600401610a2f90613669565b60fd5460ff16611cae5760405160e560020a62461bcd0281526020600482015260126024820152607260020a711dda1a5d195b1a5cdd08191a5cd8589b1959026044820152606401610a2f565b611cb88183611458565b611cc283836126d3565b611ccc3384612803565b611cd58361281d565b5050600160c95550565b600060e060020a6301ffc9a702600160e060020a031983161480611d16575060e060020a6380ac58cd02600160e060020a03198316145b806109f7575050600160e060020a03191660e060020a635b5e139f021490565b7f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4090565b6000611d64611d36565b54821080156109f7575060e060020a611d7b611d36565b60008481526004919091016020526040902054161592915050565b600081611da1611d36565b54811015611e09576000611db3611d36565b60008381526004919091016020526040812054915060e060020a82169003611e07575b80600003611b0957611de6611d36565b60001990920160008181526004939093016020526040909220549050611dd6565b505b60405160e160020a636f96cda102815260040160405180910390fd5b600160a060020a038216611e965760405160e560020a62461bcd02815260206004820152602c60248201527f5061796d656e7453706c69747465723a206163636f756e742069732074686520604482015260a060020a6b7a65726f2061646472657373026064820152608401610a2f565b60008111611ee95760405160e560020a62461bcd02815260206004820152601d60248201527f5061796d656e7453706c69747465723a207368617265732061726520300000006044820152606401610a2f565b600160a060020a03821660009081526067602052604090205415611f695760405160e560020a62461bcd02815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e7420616c7265616479604482015260a860020a6a2068617320736861726573026064820152608401610a2f565b60698054600181019091557f7fb4302e8e91f9110a6554c2c0a24601252c2a42c2220ca988efcfe399914308018054600160a060020a031916600160a060020a0384169081179091556000908152606760205260409020819055606554611fd1908290613554565b6065556040517f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac906120069084908490612f46565b60405180910390a15050565b606554600160a060020a0384166000908152606760205260408120549091839161203c90866135ba565b61204691906135d9565b61205091906136d8565b949350505050565b30318111156120ac5760405160e560020a62461bcd02815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610a2f565b600082600160a060020a03168260405160006040518083038185875af1925050503d80600081146120f9576040519150601f19603f3d011682016040523d82523d6000602084013e6120fe565b606091505b5050905080610e825760405160e560020a62461bcd02815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610a2f565b600061218382611d96565b905083600160a060020a031681600160a060020a0316146121b95760405160e860020a62a1148102815260040160405180910390fd5b60006121c3611d36565b60008481526006919091016020526040812054600160a060020a03908116925086163314806121f757506121f78633611b2b565b8061220a5750600160a060020a03821633145b90508061222d5760405160e160020a632ce44b5f02815260040160405180910390fd5b846000036122515760405160e260020a633a954ecd02815260040160405180910390fd5b81156122805761225f611d36565b6000858152600691909101602052604090208054600160a060020a03191690555b612288611d36565b600160a060020a03871660009081526005919091016020526040902080546000190190556122b4611d36565b600160a060020a0386166000908152600591909101602052604090208054600101905560e160020a4260a060020a028617176122ee611d36565b6000868152600491909101602052604081209190915560e160020a84169003612364576001840161231d611d36565b6000828152600491909101602052604081205490036123625761233e611d36565b548114612362578361234e611d36565b600083815260049190910160205260409020555b505b8385600160a060020a031687600160a060020a03166000805160206138a083398151915260405160405180910390a4505050505050565b60975460ff166123ea5760405160e560020a62461bcd0281526020600482015260146024820152606260020a7314185d5cd8589b194e881b9bdd081c185d5cd959026044820152606401610a2f565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b604051612424919061303a565b60405180910390a1565b610e828363a9059cbb60e060020a028484604051602401612450929190612f46565b60408051601f19818403018152919052602081018051600160e060020a0316600160e060020a031990931692909217909152612987565b60008054610100900460ff16156124d8578160ff1660011480156124b157506124af30612a5f565b155b6124d05760405160e560020a62461bcd028152600401610a2f906136ef565b506000919050565b60005460ff8084169116106125025760405160e560020a62461bcd028152600401610a2f906136ef565b506000805460ff191660ff92909216919091179055600190565b7fee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85f90565b600054610100900460ff1661256a5760405160e560020a62461bcd028152600401610a2f90613740565b610f3e612a6e565b600054610100900460ff1661259c5760405160e560020a62461bcd028152600401610a2f90613740565b610f3e612aa1565b600054610100900460ff166125ce5760405160e560020a62461bcd028152600401610a2f90613740565b610f3e612ad2565b6125de61251c565b54610100900460ff166126065760405160e560020a62461bcd028152600401610a2f9061378e565b610ccb8282612b08565b60338054600160a060020a03838116600160a060020a0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008261266f8584612b87565b14949350505050565b60975460ff161561269e5760405160e560020a62461bcd028152600401610a2f90613669565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586124173390565b6101005462010000900461ffff16826126ea610c70565b6126f49190613554565b111561273e5760405160e560020a62461bcd0281526020600482015260136024820152606a60020a721b585e081cdd5c1c1b1e48195e18d959591959026044820152606401610a2f565b33600090815260ff602052604090205461275890826136d8565b8211156127a45760405160e560020a62461bcd0281526020600482015260146024820152606260020a731b585e081d1bc81b5a5b9d08195e18d959591959026044820152606401610a2f565b60fb5460ff1615610ccb5733600090815260fc602052604090205460ff1615610ccb5760405160e560020a62461bcd02815260206004820152600b602482015260aa60020a6a1a5b8819195b9e5b1a5cdd026044820152606401610a2f565b610ccb828260405180602001604052806000815250612bfb565b33600090815260ff60205260408120805483929061283c908490613554565b909155505050565b60405160e160020a630a85bd01028152600090600160a060020a0385169063150b7a029061287c9033908990889088906004016137d3565b6020604051808303816000875af19250505080156128b7575060408051601f3d908101601f191682019092526128b491810190613810565b60015b612918573d8080156128e5576040519150601f19603f3d011682016040523d82523d6000602084013e6128ea565b606091505b5080516000036129105760405160e160020a6368d2bf6b02815260040160405180910390fd5b805181602001fd5b600160e060020a03191660e160020a630a85bd0102149050949350505050565b604080516080810191829052607f0190826030600a8206018353600a90045b801561297557600183039250600a81066030018353600a9004612957565b50819003601f19909101908152919050565b60006129dc826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525085600160a060020a0316612d959092919063ffffffff16565b805190915015610e8257808060200190518101906129fa919061382d565b610e825760405160e560020a62461bcd02815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e604482015260b260020a691bdd081cdd58d8d95959026064820152608401610a2f565b600160a060020a03163b151590565b600054610100900460ff16612a985760405160e560020a62461bcd028152600401610a2f90613740565b610f3e33612610565b600054610100900460ff16612acb5760405160e560020a62461bcd028152600401610a2f90613740565b600160c955565b600054610100900460ff16612afc5760405160e560020a62461bcd028152600401610a2f90613740565b6097805460ff19169055565b612b1061251c565b54610100900460ff16612b385760405160e560020a62461bcd028152600401610a2f9061378e565b81612b41611d36565b6002019080519060200190612b57929190612ead565b5080612b61611d36565b6003019080519060200190612b77929190612ead565b506000612b82611d36565b555050565b600081815b8451811015612bf3576000858281518110612ba957612ba9613618565b60200260200101519050808311612bcf5760008381526020829052604090209250612be0565b600081815260208490526040902092505b5080612beb8161384a565b915050612b8c565b509392505050565b6000612c05611d36565b54905083600003612c2b5760405160e860020a622e076302815260040160405180910390fd5b82600003612c4f5760405160e060020a63b562e8dd02815260040160405180910390fd5b6001604060020a018302612c61611d36565b600160a060020a0386166000908152600591909101602052604090208054909101905560e1612c906001851490565b60029190910a024260a060020a02851717612ca9611d36565b6000838152600491909101602052604090205580838101600160a060020a0386163b15612d4a575b6040518290600160a060020a038816906000906000805160206138a0833981519152908290a4612d0a6000878480600101955087612844565b612d2a5760405160e160020a6368d2bf6b02815260040160405180910390fd5b808210612cd15782612d3a611d36565b5414612d4557600080fd5b612d7d565b5b604051600183019290600160a060020a038816906000906000805160206138a0833981519152908290a4808210612d4b575b81612d86611d36565b55506119299050600085838684565b6060612050848460008585612da985612a5f565b612df85760405160e560020a62461bcd02815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a2f565b60008086600160a060020a03168587604051612e149190613863565b60006040518083038185875af1925050503d8060008114612e51576040519150601f19603f3d011682016040523d82523d6000602084013e612e56565b606091505b5091509150612e66828286612e71565b979650505050505050565b60608315612e80575081611b09565b825115612e905782518084602001fd5b8160405160e560020a62461bcd028152600401610a2f919061300e565b828054612eb9906134b3565b90600052602060002090601f016020900481019282612edb5760008555612f21565b82601f10612ef457805160ff1916838001178555612f21565b82800160010185558215612f21579182015b82811115612f21578251825591602001919060010190612f06565b50612f2d929150612f31565b5090565b5b80821115612f2d5760008155600101612f32565b600160a060020a03929092168252602082015260400190565b600160e060020a031981168114611c0e57600080fd5b600060208284031215612f8757600080fd5b8135611b0981612f5f565b600060208284031215612fa457600080fd5b813561ffff81168114611b0957600080fd5b60005b83811015612fd1578181015183820152602001612fb9565b838111156119295750506000910152565b60008151808452612ffa816020860160208601612fb6565b601f01601f19169290920160200192915050565b602081526000611b096020830184612fe2565b60006020828403121561303357600080fd5b5035919050565b600160a060020a0391909116815260200190565b8015158114611c0e57600080fd5b60006020828403121561306e57600080fd5b8135611b098161304e565b600160a060020a0381168114611c0e57600080fd5b600080604083850312156130a157600080fd5b82356130ac81613079565b946020939093013593505050565b6000602082840312156130cc57600080fd5b8135611b0981613079565b6000806000606084860312156130ec57600080fd5b83356130f781613079565b9250602084013561310781613079565b929592945050506040919091013590565b6000806040838503121561312b57600080fd5b50508035926020909101359150565b6000806040838503121561314d57600080fd5b823561315881613079565b9150602083013561316881613079565b809150509250929050565b60e060020a634e487b710260009081526041600452602490fd5b604051601f8201601f191681016001604060020a03811182821017156131b5576131b5613173565b604052919050565b60006001604060020a038311156131d6576131d6613173565b6131e9601f8401601f191660200161318d565b90508281528383830111156131fd57600080fd5b828260208301376000602084830101529392505050565b600082601f83011261322557600080fd5b611b09838335602085016131bd565b6000806040838503121561324757600080fd5b82356001604060020a038082111561325e57600080fd5b61326a86838701613214565b9350602085013591508082111561328057600080fd5b5061328d85828601613214565b9150509250929050565b6000602082840312156132a957600080fd5b81356001604060020a038111156132bf57600080fd5b61205084828501613214565b600082601f8301126132dc57600080fd5b813560206001604060020a038211156132f7576132f7613173565b80820261330582820161318d565b928352848101820192828101908785111561331f57600080fd5b83870192505b84831015612e6657823582529183019190830190613325565b6000806040838503121561335157600080fd5b82356001604060020a0381111561336757600080fd5b613373858286016132cb565b95602094909401359450505050565b6000806040838503121561339557600080fd5b82356133a081613079565b915060208301356131688161304e565b600080600080608085870312156133c657600080fd5b84356133d181613079565b935060208501356133e181613079565b92506040850135915060608501356001604060020a0381111561340357600080fd5b8501601f8101871361341457600080fd5b613423878235602084016131bd565b91505092959194509250565b60008060006060848603121561344457600080fd5b833592506020840135915060408401356001604060020a0381111561346857600080fd5b613474868287016132cb565b9150509250925092565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6002810460018216806134c757607f821691505b6020821081036134eb5760e060020a634e487b710260009081526022600452602490fd5b50919050565b60208082526026908201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f20604082015260d060020a6573686172657302606082015260800190565b60e060020a634e487b710260009081526011600452602490fd5b600082198211156135675761356761353a565b500190565b6020808252602b908201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f7420604082015260aa60020a6a191d59481c185e5b595b9d02606082015260800190565b60008160001904831182151516156135d4576135d461353a565b500290565b6000826135fa5760e060020a634e487b710260009081526012600452602490fd5b500490565b60006020828403121561361157600080fd5b5051919050565b60e060020a634e487b710260009081526032600452602490fd5b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6020808252601090820152608260020a6f14185d5cd8589b194e881c185d5cd95902604082015260600190565b600083516136a8818460208801612fb6565b8351908301906136bc818360208801612fb6565b60d960020a64173539b7b7029101908152600501949350505050565b6000828210156136ea576136ea61353a565b500390565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c7265616040820152609260020a6d191e481a5b9a5d1a585b1a5e995902606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f742069604082015260a860020a6a6e697469616c697a696e6702606082015260800190565b60208082526034908201526000805160206138808339815191526040820152606060020a73206973206e6f7420696e697469616c697a696e6702606082015260800190565b600160a060020a038581168252841660208201526040810183905260806060820181905260009061380690830184612fe2565b9695505050505050565b60006020828403121561382257600080fd5b8151611b0981612f5f565b60006020828403121561383f57600080fd5b8151611b098161304e565b60006001820161385c5761385c61353a565b5060010190565b60008251613875818460208701612fb6565b919091019291505056fe455243373231415f5f496e697469616c697a61626c653a20636f6e7472616374ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220b199622ca39bbbc6e2d0304fa508eefe707cbb2ee7ac7fc7453371764944eab764736f6c634300080e0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.