Feature Tip: Add private address tag to any address under My Name Tag !
ERC-721
Overview
Max Total Supply
294 FPXMISSION5
Holders
233
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 FPXMISSION5Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Source Code Verified (Exact Match)
Contract Name:
OrderPort721
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "erc721a/contracts/ERC721A.sol"; import "../library/opensea-operatorfilter/v1/FlexibleOperatorFilterer.sol"; import "../library/sealable/v1/Sealable.sol"; /* ____ _ _ | _ \ | | | | | |_) | __ _ ___ ___ | | __ _| |__ ___ | _ < / _` / __|/ _ \ | | / _` | '_ \/ __| | |_) | (_| \__ \ __/ | |___| (_| | |_) \__ \ |____/ \__,_|___/\___| |______\__,_|_.__/|___/ */ pragma solidity ^0.8.7; error ErrNoEffect(); error ErrQuotaExceeded(); error ErrMaxSupplyExceeded(); error ErrNotStarted(); error ErrStartingIndexAlreadySet(); error ErrContractSealed(); error ErrCallerIsNotAllowed(); error ErrContractPaused(); error ErrInvalidArguments(string); error ErrQuotaPerMintExceeded(); /** * @title OrderPortGuard * @author BaseLabs */ contract OrderPortGuard is Ownable { event OrderPortAddressUpdated(address contractAddress); address private _orderPortAddress; constructor(address address_) { _orderPortAddress = address_; } /** * @notice getOrderPortAddress is used to get the address of OrderPort contract. * @return contract address */ function getOrderPortAddress() public view returns (address) { return _orderPortAddress; } /** * @notice setOrderPortAddress is used to set the OrderPort contract address. * @param address_ OrderPort contract address */ function setOrderPortAddress(address address_) external onlyOwner { if (getOrderPortAddress() == address_) revert ErrNoEffect(); _orderPortAddress = address_; emit OrderPortAddressUpdated(address_); } /***********************************| | Modifier | |__________________________________*/ /** * @notice onlyOrderPort is used to restrict the method to be called only by the OrderPort contract. */ modifier onlyOrderPort() { if (getOrderPortAddress() != _msgSender()) revert ErrCallerIsNotAllowed(); _; } } /** * @title OrderPort721 * @author BaseLabs */ contract OrderPort721 is ERC721A, OrderPortGuard, Pausable, ReentrancyGuard, Sealable, FlexibleOperatorFilterer { event Withdraw(address indexed account, uint256 amount); event BaseURIChanged(string newBaseURI); struct Config { uint32 maxToken; string provenanceHash; string baseURI; WhitelistSaleConfig whitelistSale; PublicSaleConfig publicSale; } struct WhitelistSaleConfig { uint256 startTime; uint256 endTime; uint32 quota; uint32 quotaPerMint; } struct PublicSaleConfig { uint256 startTime; uint256 endTime; uint32 quota; uint32 quotaPerMint; } Config private _config; uint256 public startingIndex; constructor( string memory name_, string memory symbol_, address orderPortAddress_, Config memory config_ ) ERC721A(name_, symbol_) OrderPortGuard(orderPortAddress_) { _config = config_; } /***********************************| | Core | |__________________________________*/ /** * @notice airdrop is used to airdrop tokens to the given addresses. * @param addresses_ the addresses to airdrop * @param nums_ number of tokens to airdrop for each address */ function airdrop( address[] calldata addresses_, uint64[] calldata nums_ ) external onlyOwner nonReentrant { if (addresses_.length != nums_.length) revert ErrInvalidArguments("addresses_ and nums_"); if (addresses_.length == 0) revert ErrInvalidArguments("addresses_"); for (uint256 i = 0; i < addresses_.length; ++i) { _mintNFT(addresses_[i], nums_[i]); } } /** * @notice whitelistSale is used for whitelist sale. * @param address_ the address to mint token * @param num_ number of tokens */ function whitelistSale( address address_, uint32 num_ ) external payable onlyOrderPort nonReentrant { if ( !_checkTimestamp( _config.whitelistSale.startTime, _config.whitelistSale.endTime ) ) revert ErrNotStarted(); if (num_ == 0) revert ErrNoEffect(); if ( _config.whitelistSale.quotaPerMint > 0 && num_ > _config.whitelistSale.quotaPerMint ) revert ErrQuotaPerMintExceeded(); if (_config.whitelistSale.quota > 0) { (uint32 whitelistMinted, uint32 publicMinted) = getMinted(address_); whitelistMinted += num_; if (whitelistMinted > _config.whitelistSale.quota) revert ErrQuotaExceeded(); _setMinted(address_, whitelistMinted, publicMinted); } _mintNFT(address_, num_); } /** * @notice publicSale is used for public sale. * @param address_ the address to mint token * @param num_ number of tokens */ function publicSale( address address_, uint32 num_ ) external payable onlyOrderPort nonReentrant { if ( !_checkTimestamp( _config.publicSale.startTime, _config.publicSale.endTime ) ) revert ErrNotStarted(); if (num_ == 0) revert ErrNoEffect(); if ( _config.publicSale.quotaPerMint > 0 && num_ > _config.publicSale.quotaPerMint ) revert ErrQuotaPerMintExceeded(); if (_config.publicSale.quota > 0) { (uint32 whitelistMinted, uint32 publicMinted) = getMinted(address_); publicMinted += num_; if (publicMinted > _config.publicSale.quota) revert ErrQuotaExceeded(); _setMinted(address_, whitelistMinted, publicMinted); } _mintNFT(address_, num_); } /** * @notice internal method, _sale is used to sell tokens * @param address_ the address to mint token * @param num_ number of tokens */ function _mintNFT(address address_, uint64 num_) internal { if (totalMinted() + num_ > _config.maxToken) revert ErrMaxSupplyExceeded(); _safeMint(address_, num_); } /** * @notice issuer withdraws the ETH temporarily stored in the contract through this method. */ function withdraw() external onlyOwner nonReentrant { uint256 balance = address(this).balance; payable(_msgSender()).transfer(balance); emit Withdraw(_msgSender(), balance); } /***********************************| | Setters | |__________________________________*/ /** * @notice setStartingIndex is used to set the starting index * It determines a randomly generated offset to determine the metadata of all blindboxes. */ function setStartingIndex() external onlyOwner { if (startingIndex != 0) revert ErrStartingIndexAlreadySet(); uint256 entropy = uint256( keccak256( abi.encodePacked( blockhash(block.number - 1), block.difficulty, block.timestamp, block.coinbase, tx.origin ) ) ); startingIndex = entropy % _config.maxToken; if (startingIndex == 0) { startingIndex = startingIndex + 1; } } /** * @notice setProvenanceHash is used to set the provenance hash in special cases. * This process is under the supervision of the community. * @param provenanceHash_ provenance hash is used to prove that metadata has not been tampered. */ function setProvenanceHash( string memory provenanceHash_ ) external onlyOwner { _config.provenanceHash = provenanceHash_; } /** * @notice setWhitelistConfig is used to set the whitelist sale config in special cases. * This process is under the supervision of the community. * @param config_ the config of whitelist sale. */ function setWhitelistConfig( WhitelistSaleConfig memory config_ ) external onlyOwner { _config.whitelistSale = config_; } /** * @notice setPublicSaleConfig is used to set the public sale config in special cases. * This process is under the supervision of the community. * @param config_ the config of public sale. */ function setPublicSaleConfig( PublicSaleConfig memory config_ ) external onlyOwner { _config.publicSale = config_; } /** * @notice setBaseURI is used to set the base URI in special cases. * @param baseURI_ baseURI */ function setBaseURI(string calldata baseURI_) external onlyOwner { _config.baseURI = baseURI_; emit BaseURIChanged(baseURI_); } /** * @notice _setMinted is used to set the number of token that minted at whiltelist sale period and public sale period. * @param address_ account address * @param whiltelistMinted_ the number of tokens that minted at whiltelist sale period. * @param publicSaleMinted_ the number of tokens that minted at public sale period. */ function _setMinted( address address_, uint32 whiltelistMinted_, uint32 publicSaleMinted_ ) internal { _setAux(address_, packUint64(whiltelistMinted_, publicSaleMinted_)); } /***********************************| | Getter | |__________________________________*/ /** * @notice getConfig is used to get the contract config. * @return config data */ function getConfig() public view returns (Config memory) { return _config; } /** * @notice _checkTimestamp is used to check whether the current time is appropriate * @param startTime_ the value of startTime * @param endTime_ the value of endTime * @return whether the current time is appropriate */ function _checkTimestamp( uint256 startTime_, uint256 endTime_ ) internal view returns (bool) { if (startTime_ == 0 || startTime_ > block.timestamp) return false; if (endTime_ > 0 && endTime_ < block.timestamp) return false; return true; } /** * @notice _baseURI is used to override the _baseURI method. * @return baseURI */ function _baseURI() internal view virtual override returns (string memory) { return _config.baseURI; } /** * @notice totalMinted is used to return the total number of tokens minted. * Note that it does not decrease as the token is burnt. */ function totalMinted() public view returns (uint256) { return _totalMinted(); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface( bytes4 interfaceId ) public view virtual override(ERC721A) returns (bool) { return ERC721A.supportsInterface(interfaceId); } /** * @notice getMinted is used to get the number of tokens that minted at whiltelist sale period and public sale period. * @param address_ account address * @return whiltelistMinted the number of tokens that minted at whiltelist sale period. * @return publicSaleMinted the number of tokens that minted at public sale period. */ function getMinted( address address_ ) public view returns (uint32 whiltelistMinted, uint32 publicSaleMinted) { return unpackUint64(_getAux(address_)); } /** * @notice packUint64 is used to pack two uint32 numbers into one uint64. */ function packUint64(uint32 a, uint32 b) public pure returns (uint64) { return (uint64(a) << 32) | uint64(b); } /** * @notice unpackUint64 is used to unpack one uint64 into two uint32 numbers. */ function unpackUint64(uint64 c) public pure returns (uint32 a, uint32 b) { return (uint32(c >> 32), uint32(c)); } /***********************************| | Pause | |__________________________________*/ /** * @notice hook function, used to intercept the transfer of token. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual override { super._beforeTokenTransfers(from, to, startTokenId, quantity); if (paused()) revert ErrContractPaused(); } /** * @notice for the purpose of protecting user assets, under extreme conditions, * the circulation of all tokens in the contract needs to be frozen. * This process is under the supervision of the community. */ function emergencyPause() external onlyOwner onlyNotSealed { _pause(); } /** * @notice unpause the contract */ function unpause() external onlyOwner onlyNotSealed { _unpause(); } /** * @notice when the project is stable enough, the issuer will call sealContract * to give up the permission to call emergencyPause and unpause. */ function sealContract() external onlyOwner onlyNotSealed { _sealContract(); } /***********************************| | Operator Filter Registry | |__________________________________*/ /** * @notice setApprovalForAll is used to set an operator's approval for all token transfers. * @param operator The address of the operator to set approval for. * @param approved Whether the operator is approved or not. */ function setApprovalForAll( address operator, bool approved ) public override onlyAllowedOperatorApproval(operator) { super.setApprovalForAll(operator, approved); } /** * @notice approve is used to set an operator's approval for specified token transfers. * @param operator The address of the operator to set approval for. * @param tokenId The token id to set approval for. */ function approve( address operator, uint256 tokenId ) public payable override onlyAllowedOperatorApproval(operator) { super.approve(operator, tokenId); } /** * @notice transferFrom is used to transfer tokens from one account to another. * @param from The address of the account sending the tokens. * @param to The address of the account receiving the tokens. * @param tokenId The ID of the token being transferred. */ function transferFrom( address from, address to, uint256 tokenId ) public payable override onlyAllowedOperator(from) { super.transferFrom(from, to, tokenId); } /** * @notice safeTransferFrom is used to safely transfer tokens from one account to another. * @param from The address of the account sending the tokens. * @param to The address of the account receiving the tokens. * @param tokenId The ID of the token being transferred. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public payable override onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId); } /** * @notice safeTransferFrom is used to safely transfer tokens from one account to another. * @param from The address of the account sending the tokens. * @param to The address of the account receiving the tokens. * @param tokenId The ID of the token being transferred. * @param data Additional data provided with the transfer. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public payable override onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId, data); } /** * @notice owner is used to get the owner address of this contract. * @return the address of the owner of this contract */ function owner() public view virtual override(Ownable, FlexibleOperatorFilterer) returns (address) { return Ownable.owner(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { require(paused(), "Pausable: not paused"); } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {OperatorFilterer} from "./OperatorFilterer.sol"; /** * @title FlexibleOperatorFilterer * @author BaseLabs */ abstract contract FlexibleOperatorFilterer is OperatorFilterer { error ErrOnlyOwner(); address constant DEFAULT_SUBSCRIPTION = address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6); bool public isOperatorFilterRegistryEnabled; mapping(address => bool) public operatorFilterWhitelist; constructor() OperatorFilterer(DEFAULT_SUBSCRIPTION, true) {} modifier onlyAllowedOperator(address from) override { // Check registry code length to facilitate testing in environments without a deployed registry. if ( isOperatorFilterRegistryEnabled && !operatorFilterWhitelist[msg.sender] && address(OPERATOR_FILTER_REGISTRY).code.length > 0 ) { // Allow spending tokens from addresses with balance // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred // from an EOA. if (from == msg.sender) { _; return; } if ( !OPERATOR_FILTER_REGISTRY.isOperatorAllowed( address(this), msg.sender ) ) { revert OperatorNotAllowed(msg.sender); } } _; } modifier onlyAllowedOperatorApproval(address operator) override { // Check registry code length to facilitate testing in environments without a deployed registry. if ( isOperatorFilterRegistryEnabled && !operatorFilterWhitelist[operator] && address(OPERATOR_FILTER_REGISTRY).code.length > 0 ) { if ( !OPERATOR_FILTER_REGISTRY.isOperatorAllowed( address(this), operator ) ) { revert OperatorNotAllowed(operator); } } _; } /** * @notice setOperatorFilterRegistryWhitelist is used to set the whitelist of operator filter registry. * @param state_ If state_ is true, OperatorFilterRegistry for this address will be disabled. */ function setOperatorFilterRegistryWhitelist( address address_, bool state_ ) external { if (msg.sender != owner()) { revert ErrOnlyOwner(); } operatorFilterWhitelist[address_] = state_; } /** * @notice setOperatorFilterRegistryState is used to update the state of isOperatorFilterRegistryEnabled flag. * @param enabled_ If enabled_ is true, OperatorFilterRegistry will be enabled. */ function setOperatorFilterRegistryState(bool enabled_) external { if (msg.sender != owner()) { revert ErrOnlyOwner(); } isOperatorFilterRegistryEnabled = enabled_; } /** * @dev assume the contract has an owner, but leave specific Ownable implementation up to inheriting contract */ function owner() public view virtual returns (address); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; interface IOperatorFilterRegistry { function isOperatorAllowed(address registrant, address operator) external view returns (bool); function register(address registrant) external; function registerAndSubscribe(address registrant, address subscription) external; function registerAndCopyEntries(address registrant, address registrantToCopy) external; function unregister(address addr) external; function updateOperator(address registrant, address operator, bool filtered) external; function updateOperators(address registrant, address[] calldata operators, bool filtered) external; function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external; function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external; function subscribe(address registrant, address registrantToSubscribe) external; function unsubscribe(address registrant, bool copyExistingEntries) external; function subscriptionOf(address addr) external returns (address registrant); function subscribers(address registrant) external returns (address[] memory); function subscriberAt(address registrant, uint256 index) external returns (address); function copyEntriesOf(address registrant, address registrantToCopy) external; function isOperatorFiltered(address registrant, address operator) external returns (bool); function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool); function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool); function filteredOperators(address addr) external returns (address[] memory); function filteredCodeHashes(address addr) external returns (bytes32[] memory); function filteredOperatorAt(address registrant, uint256 index) external returns (address); function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32); function isRegistered(address addr) external returns (bool); function codeHashOf(address addr) external returns (bytes32); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol"; /** * @title OperatorFilterer * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another * registrant's entries in the OperatorFilterRegistry. * @dev This smart contract is meant to be inherited by token contracts so they can use the following: * - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods. * - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods. */ abstract contract OperatorFilterer { error OperatorNotAllowed(address operator); IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY = IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E); constructor(address subscriptionOrRegistrantToCopy, bool subscribe) { // If an inheriting token contract is deployed to a network without the registry deployed, the modifier // will not revert, but the contract will need to be registered with the registry once it is deployed in // order for the modifier to filter addresses. if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { if (subscribe) { OPERATOR_FILTER_REGISTRY.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy); } else { if (subscriptionOrRegistrantToCopy != address(0)) { OPERATOR_FILTER_REGISTRY.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy); } else { OPERATOR_FILTER_REGISTRY.register(address(this)); } } } } modifier onlyAllowedOperator(address from) virtual { // Check registry code length to facilitate testing in environments without a deployed registry. if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { // Allow spending tokens from addresses with balance // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred // from an EOA. if (from == msg.sender) { _; return; } if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), msg.sender)) { revert OperatorNotAllowed(msg.sender); } } _; } modifier onlyAllowedOperatorApproval(address operator) virtual { // Check registry code length to facilitate testing in environments without a deployed registry. if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) { revert OperatorNotAllowed(operator); } } _; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; /// @notice define a set of error types /** * @title Sealable * @author BaseLabs */ contract Sealable { error ErrContractSealed(); event ContractSealed(); /// @notice whether the contract is sealed bool public contractSealed; /** * @notice when the project is stable enough, the issuer will call sealContract * to give up the permission to call emergencyPause and unpause. */ function _sealContract() internal { contractSealed = true; emit ContractSealed(); } /** * @notice function call is only allowed when the contract has not been sealed */ modifier onlyNotSealed() { if (contractSealed) revert ErrContractSealed(); _; } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721A.sol'; /** * @dev Interface of ERC721 token receiver. */ interface ERC721A__IERC721Receiver { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } /** * @title ERC721A * * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721) * Non-Fungible Token Standard, including the Metadata extension. * Optimized for lower gas during batch mints. * * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...) * starting from `_startTokenId()`. * * Assumptions: * * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is IERC721A { // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364). struct TokenApprovalRef { address value; } // ============================================================= // CONSTANTS // ============================================================= // Mask of an entry in packed address data. uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant _BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant _BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant _BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant _BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant _BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant _BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225; // The bit position of `extraData` in packed ownership. uint256 private constant _BITPOS_EXTRA_DATA = 232; // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`. uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1; // The mask of the lower 160 bits for addresses. uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1; // The maximum `quantity` that can be minted with {_mintERC2309}. // This limit is to prevent overflows on the address data entries. // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309} // is required to cause an overflow, which is unrealistic. uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000; // The `Transfer` event signature is given by: // `keccak256(bytes("Transfer(address,address,uint256)"))`. bytes32 private constant _TRANSFER_EVENT_SIGNATURE = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; // ============================================================= // STORAGE // ============================================================= // The next token ID to be minted. uint256 private _currentIndex; // The number of tokens burned. uint256 private _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. // See {_packedOwnershipOf} implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` // - [232..255] `extraData` mapping(uint256 => uint256) private _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) private _packedAddressData; // Mapping from token ID to approved address. mapping(uint256 => TokenApprovalRef) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // ============================================================= // CONSTRUCTOR // ============================================================= constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } // ============================================================= // TOKEN COUNTING OPERATIONS // ============================================================= /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view virtual returns (uint256) { return _currentIndex; } /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() public view virtual override returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than `_currentIndex - _startTokenId()` times. unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view virtual returns (uint256) { // Counter underflow is impossible as `_currentIndex` does not decrement, // and it is initialized to `_startTokenId()`. unchecked { return _currentIndex - _startTokenId(); } } /** * @dev Returns the total number of tokens burned. */ function _totalBurned() internal view virtual returns (uint256) { return _burnCounter; } // ============================================================= // ADDRESS DATA OPERATIONS // ============================================================= /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) public view virtual override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return uint64(_packedAddressData[owner] >> _BITPOS_AUX); } /** * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal virtual { uint256 packed = _packedAddressData[owner]; uint256 auxCasted; // Cast `aux` with assembly to avoid redundant masking. assembly { auxCasted := aux } packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX); _packedAddressData[owner] = packed; } // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { // The interface IDs are constants representing the first 4 bytes // of the XOR of all function selectors in the interface. // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165) // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`) return interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165. interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721. interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata. } // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the token collection symbol. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : ''; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, it can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } // ============================================================= // OWNERSHIPS OPERATIONS // ============================================================= /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { return address(uint160(_packedOwnershipOf(tokenId))); } /** * @dev Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around over time. */ function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnershipOf(tokenId)); } /** * @dev Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnerships[index]); } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal virtual { if (_packedOwnerships[index] == 0) { _packedOwnerships[index] = _packedOwnershipOf(index); } } /** * Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr) if (curr < _currentIndex) { uint256 packed = _packedOwnerships[curr]; // If not burned. if (packed & _BITMASK_BURNED == 0) { // Invariant: // There will always be an initialized ownership slot // (i.e. `ownership.addr != address(0) && ownership.burned == false`) // before an unintialized ownership slot // (i.e. `ownership.addr == address(0) && ownership.burned == false`) // Hence, `curr` will not underflow. // // We can directly compare the packed value. // If the address is zero, packed will be zero. while (packed == 0) { packed = _packedOwnerships[--curr]; } return packed; } } } revert OwnerQueryForNonexistentToken(); } /** * @dev Returns the unpacked `TokenOwnership` struct from `packed`. */ function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) { ownership.addr = address(uint160(packed)); ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP); ownership.burned = packed & _BITMASK_BURNED != 0; ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA); } /** * @dev Packs ownership data into a single uint256. */ function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`. result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags)) } } /** * @dev Returns the `nextInitialized` flag set if `quantity` equals 1. */ function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) { // For branchless setting of the `nextInitialized` flag. assembly { // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`. result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1)) } } // ============================================================= // APPROVAL OPERATIONS // ============================================================= /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * 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) public payable virtual override { address owner = ownerOf(tokenId); if (_msgSenderERC721A() != owner) if (!isApprovedForAll(owner, _msgSenderERC721A())) { revert ApprovalCallerNotOwnerNorApproved(); } _tokenApprovals[tokenId].value = to; emit Approval(owner, to, tokenId); } /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId].value; } /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool approved) public virtual override { _operatorApprovals[_msgSenderERC721A()][operator] = approved; emit ApprovalForAll(_msgSenderERC721A(), operator, approved); } /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted. See {_mint}. */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && // If within bounds, _packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned. } /** * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`. */ function _isSenderApprovedOrOwner( address approvedAddress, address owner, address msgSender ) private pure returns (bool result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean. msgSender := and(msgSender, _BITMASK_ADDRESS) // `msgSender == owner || msgSender == approvedAddress`. result := or(eq(msgSender, owner), eq(msgSender, approvedAddress)) } } /** * @dev Returns the storage slot and value for the approved address of `tokenId`. */ function _getApprovedSlotAndAddress(uint256 tokenId) private view returns (uint256 approvedAddressSlot, address approvedAddress) { TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId]; // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`. assembly { approvedAddressSlot := tokenApproval.slot approvedAddress := sload(approvedAddressSlot) } } // ============================================================= // TRANSFER OPERATIONS // ============================================================= /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) public payable virtual override { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner(); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // We can directly increment and decrement the balances. --_packedAddressData[from]; // Updates: `balance -= 1`. ++_packedAddressData[to]; // Updates: `balance += 1`. // Updates: // - `address` to the next owner. // - `startTimestamp` to the timestamp of transfering. // - `burned` to `false`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( to, _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public payable virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public payable virtual override { transferFrom(from, to, tokenId); if (to.code.length != 0) if (!_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @dev Hook that is called before a set of serially-ordered token IDs * are about to be transferred. This includes minting. * And also called before burning one token. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token IDs * have been transferred. This includes minting. * And also called after one token has been burned. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * `from` - Previous owner of the given token ID. * `to` - Target address that will receive the token. * `tokenId` - Token ID to be transferred. * `_data` - Optional data to send along with the call. * * Returns whether the call correctly returned the expected magic value. */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns ( bytes4 retval ) { return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } // ============================================================= // MINT OPERATIONS // ============================================================= /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event for each mint. */ function _mint(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // `balance` and `numberMinted` have a maximum limit of 2**64. // `tokenId` has a maximum limit of 2**256. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); uint256 toMasked; uint256 end = startTokenId + quantity; // Use assembly to loop and emit the `Transfer` event for gas savings. // The duplicated `log4` removes an extra check and reduces stack juggling. // The assembly, together with the surrounding Solidity code, have been // delicately arranged to nudge the compiler into producing optimized opcodes. assembly { // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. toMasked := and(to, _BITMASK_ADDRESS) // Emit the `Transfer` event. log4( 0, // Start of data (0, since no data). 0, // End of data (0, since no data). _TRANSFER_EVENT_SIGNATURE, // Signature. 0, // `address(0)`. toMasked, // `to`. startTokenId // `tokenId`. ) // The `iszero(eq(,))` check ensures that large values of `quantity` // that overflows uint256 will make the loop run out of gas. // The compiler will optimize the `iszero` away for performance. for { let tokenId := add(startTokenId, 1) } iszero(eq(tokenId, end)) { tokenId := add(tokenId, 1) } { // Emit the `Transfer` event. Similar to above. log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId) } } if (toMasked == 0) revert MintToZeroAddress(); _currentIndex = end; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * This function is intended for efficient minting only during contract creation. * * It emits only one {ConsecutiveTransfer} as defined in * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309), * instead of a sequence of {Transfer} event(s). * * Calling this function outside of contract creation WILL make your contract * non-compliant with the ERC721 standard. * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309 * {ConsecutiveTransfer} event is only permissible during contract creation. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {ConsecutiveTransfer} event. */ function _mintERC2309(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are unrealistic due to the above check for `quantity` to be below the limit. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to); _currentIndex = startTokenId + quantity; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * See {_mint}. * * Emits a {Transfer} event for each mint. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal virtual { _mint(to, quantity); unchecked { if (to.code.length != 0) { uint256 end = _currentIndex; uint256 index = end - quantity; do { if (!_checkContractOnERC721Received(address(0), to, index++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (index < end); // Reentrancy protection. if (_currentIndex != end) revert(); } } } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal virtual { _safeMint(to, quantity, ''); } // ============================================================= // BURN OPERATIONS // ============================================================= /** * @dev Equivalent to `_burn(tokenId, false)`. */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); address from = address(uint160(prevOwnershipPacked)); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); if (approvalCheck) { // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // Updates: // - `balance -= 1`. // - `numberBurned += 1`. // // We can directly decrement the balance, and increment the number burned. // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`. _packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1; // Updates: // - `address` to the last owner. // - `startTimestamp` to the timestamp of burning. // - `burned` to `true`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( from, (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } // ============================================================= // EXTRA DATA OPERATIONS // ============================================================= /** * @dev Directly sets the extra data for the ownership data `index`. */ function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual { uint256 packed = _packedOwnerships[index]; if (packed == 0) revert OwnershipNotInitializedForExtraData(); uint256 extraDataCasted; // Cast `extraData` with assembly to avoid redundant masking. assembly { extraDataCasted := extraData } packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA); _packedOwnerships[index] = packed; } /** * @dev Called during each token transfer to set the 24bit `extraData` field. * Intended to be overridden by the cosumer contract. * * `previousExtraData` - the value of `extraData` before transfer. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _extraData( address from, address to, uint24 previousExtraData ) internal view virtual returns (uint24) {} /** * @dev Returns the next extra data for the packed ownership data. * The returned result is shifted into position. */ function _nextExtraData( address from, address to, uint256 prevOwnershipPacked ) private view returns (uint256) { uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA); return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA; } // ============================================================= // OTHER OPERATIONS // ============================================================= /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { return msg.sender; } /** * @dev Converts a uint256 to its ASCII string decimal representation. */ function _toString(uint256 value) internal pure virtual returns (string memory str) { assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), but // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned. // We will need 1 word for the trailing zeros padding, 1 word for the length, // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0. let m := add(mload(0x40), 0xa0) // Update the free memory pointer to allocate. mstore(0x40, m) // Assign the `str` to the end. str := sub(m, 0x20) // Zeroize the slot after the string. mstore(str, 0) // Cache the end of the memory to calculate the length later. let end := str // We write the string from rightmost digit to leftmost digit. // The following is essentially a do-while loop that also handles the zero case. // prettier-ignore for { let temp := value } 1 {} { str := sub(str, 1) // Write the character to the pointer. // The ASCII index of the '0' character is 48. mstore8(str, add(48, mod(temp, 10))) // Keep dividing `temp` until zero. temp := div(temp, 10) // prettier-ignore if iszero(temp) { break } } let length := sub(end, str) // Move the pointer 32 bytes leftwards to make room for the length. str := sub(str, 0x20) // Store the length. mstore(str, length) } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; /** * @dev Interface of ERC721A. */ interface IERC721A { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * The token does not exist. */ error ApprovalQueryForNonexistentToken(); /** * Cannot query the balance for the zero address. */ error BalanceQueryForZeroAddress(); /** * Cannot mint to the zero address. */ error MintToZeroAddress(); /** * The quantity of tokens minted must be more than zero. */ error MintZeroQuantity(); /** * The token does not exist. */ error OwnerQueryForNonexistentToken(); /** * The caller must own the token or be an approved operator. */ error TransferCallerNotOwnerNorApproved(); /** * The token must be owned by `from`. */ error TransferFromIncorrectOwner(); /** * Cannot safely transfer to a contract that does not implement the * ERC721Receiver interface. */ error TransferToNonERC721ReceiverImplementer(); /** * Cannot transfer to the zero address. */ error TransferToZeroAddress(); /** * The token does not exist. */ error URIQueryForNonexistentToken(); /** * The `quantity` minted with ERC2309 exceeds the safety limit. */ error MintERC2309QuantityExceedsLimit(); /** * The `extraData` cannot be set on an unintialized ownership slot. */ error OwnershipNotInitializedForExtraData(); // ============================================================= // STRUCTS // ============================================================= struct TokenOwnership { // The address of the owner. address addr; // Stores the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}. uint24 extraData; } // ============================================================= // TOKEN COUNTERS // ============================================================= /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() external view returns (uint256); // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); // ============================================================= // IERC721 // ============================================================= /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables * (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, * checking first that contract recipients are aware of the ERC721 protocol * to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move * this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external payable; /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Transfers `tokenId` from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} * whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external payable; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) external view returns (bool); // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); // ============================================================= // IERC2309 // ============================================================= /** * @dev Emitted when tokens in `fromTokenId` to `toTokenId` * (inclusive) is transferred from `from` to `to`, as defined in the * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard. * * See {_mintERC2309} for more details. */ event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"address","name":"orderPortAddress_","type":"address"},{"components":[{"internalType":"uint32","name":"maxToken","type":"uint32"},{"internalType":"string","name":"provenanceHash","type":"string"},{"internalType":"string","name":"baseURI","type":"string"},{"components":[{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint32","name":"quota","type":"uint32"},{"internalType":"uint32","name":"quotaPerMint","type":"uint32"}],"internalType":"struct OrderPort721.WhitelistSaleConfig","name":"whitelistSale","type":"tuple"},{"components":[{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint32","name":"quota","type":"uint32"},{"internalType":"uint32","name":"quotaPerMint","type":"uint32"}],"internalType":"struct OrderPort721.PublicSaleConfig","name":"publicSale","type":"tuple"}],"internalType":"struct OrderPort721.Config","name":"config_","type":"tuple"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"ErrCallerIsNotAllowed","type":"error"},{"inputs":[],"name":"ErrContractPaused","type":"error"},{"inputs":[],"name":"ErrContractSealed","type":"error"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"ErrInvalidArguments","type":"error"},{"inputs":[],"name":"ErrMaxSupplyExceeded","type":"error"},{"inputs":[],"name":"ErrNoEffect","type":"error"},{"inputs":[],"name":"ErrNotStarted","type":"error"},{"inputs":[],"name":"ErrOnlyOwner","type":"error"},{"inputs":[],"name":"ErrQuotaExceeded","type":"error"},{"inputs":[],"name":"ErrQuotaPerMintExceeded","type":"error"},{"inputs":[],"name":"ErrStartingIndexAlreadySet","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"newBaseURI","type":"string"}],"name":"BaseURIChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[],"name":"ContractSealed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"contractAddress","type":"address"}],"name":"OrderPortAddressUpdated","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":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"OPERATOR_FILTER_REGISTRY","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses_","type":"address[]"},{"internalType":"uint64[]","name":"nums_","type":"uint64[]"}],"name":"airdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractSealed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"emergencyPause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getConfig","outputs":[{"components":[{"internalType":"uint32","name":"maxToken","type":"uint32"},{"internalType":"string","name":"provenanceHash","type":"string"},{"internalType":"string","name":"baseURI","type":"string"},{"components":[{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint32","name":"quota","type":"uint32"},{"internalType":"uint32","name":"quotaPerMint","type":"uint32"}],"internalType":"struct OrderPort721.WhitelistSaleConfig","name":"whitelistSale","type":"tuple"},{"components":[{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint32","name":"quota","type":"uint32"},{"internalType":"uint32","name":"quotaPerMint","type":"uint32"}],"internalType":"struct OrderPort721.PublicSaleConfig","name":"publicSale","type":"tuple"}],"internalType":"struct OrderPort721.Config","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"address_","type":"address"}],"name":"getMinted","outputs":[{"internalType":"uint32","name":"whiltelistMinted","type":"uint32"},{"internalType":"uint32","name":"publicSaleMinted","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getOrderPortAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isOperatorFilterRegistryEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"operatorFilterWhitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":[{"internalType":"uint32","name":"a","type":"uint32"},{"internalType":"uint32","name":"b","type":"uint32"}],"name":"packUint64","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"address_","type":"address"},{"internalType":"uint32","name":"num_","type":"uint32"}],"name":"publicSale","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"sealContract","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":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"enabled_","type":"bool"}],"name":"setOperatorFilterRegistryState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"address_","type":"address"},{"internalType":"bool","name":"state_","type":"bool"}],"name":"setOperatorFilterRegistryWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"address_","type":"address"}],"name":"setOrderPortAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"provenanceHash_","type":"string"}],"name":"setProvenanceHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint32","name":"quota","type":"uint32"},{"internalType":"uint32","name":"quotaPerMint","type":"uint32"}],"internalType":"struct OrderPort721.PublicSaleConfig","name":"config_","type":"tuple"}],"name":"setPublicSaleConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setStartingIndex","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint32","name":"quota","type":"uint32"},{"internalType":"uint32","name":"quotaPerMint","type":"uint32"}],"internalType":"struct OrderPort721.WhitelistSaleConfig","name":"config_","type":"tuple"}],"name":"setWhitelistConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startingIndex","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":[],"name":"totalMinted","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":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"c","type":"uint64"}],"name":"unpackUint64","outputs":[{"internalType":"uint32","name":"a","type":"uint32"},{"internalType":"uint32","name":"b","type":"uint32"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"address_","type":"address"},{"internalType":"uint32","name":"num_","type":"uint32"}],"name":"whitelistSale","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060405162003552380380620035528339810160408190526200003491620004a7565b733cc6cdda760b79bafa08df41ecfa224f810dceb6600183868660026200005c83826200067e565b5060036200006b82826200067e565b505060008055506200007d33620002bf565b600980546001600160a81b0319166001600160a01b039092169190911790556001600a556daaeb6d7670e522a718067333cd4e3b15620001e65780156200013457604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b1580156200011557600080fd5b505af11580156200012a573d6000803e3d6000fd5b50505050620001e6565b6001600160a01b03821615620001855760405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af290390604401620000fa565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e48690602401600060405180830381600087803b158015620001cc57600080fd5b505af1158015620001e1573d6000803e3d6000fd5b505050505b50508051600d805463ffffffff191663ffffffff9092169190911781556020820151829190600e906200021a90826200067e565b50604082015160028201906200023190826200067e565b506060828101518051600384015560208082015160048501556040808301516005860180549486015163ffffffff9283166001600160401b031996871617640100000000918416820217909155608090970151805160068801559283015160078701559082015160089095018054929094015194811691909216179216909202179055506200074a92505050565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b634e487b7160e01b600052604160045260246000fd5b60405160a081016001600160401b03811182821017156200034c576200034c62000311565b60405290565b604051601f8201601f191681016001600160401b03811182821017156200037d576200037d62000311565b604052919050565b600082601f8301126200039757600080fd5b81516001600160401b03811115620003b357620003b362000311565b6020620003c9601f8301601f1916820162000352565b8281528582848701011115620003de57600080fd5b60005b83811015620003fe578581018301518282018401528201620003e1565b506000928101909101919091529392505050565b805163ffffffff811681146200042757600080fd5b919050565b6000608082840312156200043f57600080fd5b604051608081016001600160401b038111828210171562000464576200046462000311565b80604052508091508251815260208301516020820152620004886040840162000412565b60408201526200049b6060840162000412565b60608201525092915050565b60008060008060808587031215620004be57600080fd5b84516001600160401b0380821115620004d657600080fd5b620004e48883890162000385565b95506020870151915080821115620004fb57600080fd5b620005098883890162000385565b604088015190955091506001600160a01b03821682146200052957600080fd5b6060870151919350808211156200053f57600080fd5b9086019061016082890312156200055557600080fd5b6200055f62000327565b6200056a8362000412565b81526020830151828111156200057f57600080fd5b6200058d8a82860162000385565b602083015250604083015182811115620005a657600080fd5b620005b48a82860162000385565b604083015250620005c989606085016200042c565b6060820152620005dd8960e085016200042c565b60808201529598949750929550505050565b600181811c908216806200060457607f821691505b6020821081036200062557634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200067957600081815260208120601f850160051c81016020861015620006545750805b601f850160051c820191505b81811015620006755782815560010162000660565b5050505b505050565b81516001600160401b038111156200069a576200069a62000311565b620006b281620006ab8454620005ef565b846200062b565b602080601f831160018114620006ea5760008415620006d15750858301515b600019600386901b1c1916600185901b17855562000675565b600085815260208120601f198616915b828110156200071b57888601518255948401946001909101908401620006fa565b50858210156200073a5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b612df8806200075a6000396000f3fe6080604052600436106102675760003560e01c80636352211e11610144578063b6501637116100b6578063cb774d471161007a578063cb774d4714610724578063ce5a57f61461073a578063dcaf16011461074d578063e985e9c51461076d578063e9866550146107b6578063f2fde38b146107cb57600080fd5b8063b6501637146106a2578063b88d4fde146106bc578063c3f909d4146106cf578063c7411c5e146106f1578063c87b56dd1461070457600080fd5b80638da5cb5b116101085780638da5cb5b146106055780638e3450391461061a57806395d89b411461063857806396215e921461064d578063a22cb4651461066d578063a2309ff81461068d57600080fd5b80636352211e1461057b57806368bd580e1461059b57806370a08231146105b0578063715018a6146105d05780638316cd72146105e557600080fd5b80633ccfd60b116101dd5780634ac88d9c116101a15780634ac88d9c146104a157806351858e27146104e757806355f804b3146104fc57806358875e6f1461051c5780635b4b606a1461053c5780635c975abb1461055c57600080fd5b80633ccfd60b146104235780633f4ba83a1461043857806341f434341461044d57806342842e0e1461046f57806346ee58691461048257600080fd5b806318160ddd1161022f57806318160ddd146103305780631aefa8841461035357806323b872dd14610373578063277de3f91461038657806332dd47f5146103b65780633cbefe241461040357600080fd5b806301ffc9a71461026c57806306fdde03146102a1578063081812fc146102c3578063095ea7b3146102fb5780631096952314610310575b600080fd5b34801561027857600080fd5b5061028c610287366004612427565b6107eb565b60405190151581526020015b60405180910390f35b3480156102ad57600080fd5b506102b66107fc565b6040516102989190612494565b3480156102cf57600080fd5b506102e36102de3660046124a7565b61088e565b6040516001600160a01b039091168152602001610298565b61030e6103093660046124dc565b6108d2565b005b34801561031c57600080fd5b5061030e61032b366004612591565b6109db565b34801561033c57600080fd5b50600154600054035b604051908152602001610298565b34801561035f57600080fd5b5061030e61036e3660046125e7565b6109f3565b61030e61038136600461261e565b610a57565b34801561039257600080fd5b5061028c6103a136600461265a565b600c6020526000908152604090205460ff1681565b3480156103c257600080fd5b506103eb6103d1366004612689565b63ffffffff1660209190911b67ffffffff00000000161790565b6040516001600160401b039091168152602001610298565b34801561040f57600080fd5b5061030e61041e3660046126bc565b610b62565b34801561042f57600080fd5b5061030e610bb5565b34801561044457600080fd5b5061030e610c37565b34801561045957600080fd5b506102e36daaeb6d7670e522a718067333cd4e81565b61030e61047d36600461261e565b610c6b565b34801561048e57600080fd5b50600b5461028c90610100900460ff1681565b3480156104ad57600080fd5b506104ca6104bc3660046126d9565b63ffffffff602082901c1691565b6040805163ffffffff938416815292909116602083015201610298565b3480156104f357600080fd5b5061030e610d6b565b34801561050857600080fd5b5061030e610517366004612702565b610d9f565b34801561052857600080fd5b5061030e61053736600461265a565b610df2565b34801561054857600080fd5b5061030e6105573660046127e6565b610e91565b34801561056857600080fd5b50600954600160a01b900460ff1661028c565b34801561058757600080fd5b506102e36105963660046124a7565b610ede565b3480156105a757600080fd5b5061030e610ee9565b3480156105bc57600080fd5b506103456105cb36600461265a565b610f1d565b3480156105dc57600080fd5b5061030e610f6b565b3480156105f157600080fd5b5061030e6106003660046127e6565b610f7d565b34801561061157600080fd5b506102e3610fca565b34801561062657600080fd5b506009546001600160a01b03166102e3565b34801561064457600080fd5b506102b6610fe3565b34801561065957600080fd5b506104ca61066836600461265a565b610ff2565b34801561067957600080fd5b5061030e6106883660046125e7565b611023565b34801561069957600080fd5b50600054610345565b3480156106ae57600080fd5b50600b5461028c9060ff1681565b61030e6106ca366004612802565b611122565b3480156106db57600080fd5b506106e4611230565b604051610298919061287d565b61030e6106ff366004612942565b6113fa565b34801561071057600080fd5b506102b661071f3660046124a7565b611550565b34801561073057600080fd5b5061034560165481565b61030e610748366004612942565b6115d4565b34801561075957600080fd5b5061030e6107683660046129a9565b611702565b34801561077957600080fd5b5061028c610788366004612a14565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b3480156107c257600080fd5b5061030e611814565b3480156107d757600080fd5b5061030e6107e636600461265a565b6118d8565b60006107f68261194e565b92915050565b60606002805461080b90612a3e565b80601f016020809104026020016040519081016040528092919081815260200182805461083790612a3e565b80156108845780601f1061085957610100808354040283529160200191610884565b820191906000526020600020905b81548152906001019060200180831161086757829003601f168201915b5050505050905090565b60006108998261199c565b6108b6576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600b548290610100900460ff16801561090457506001600160a01b0381166000908152600c602052604090205460ff16155b801561091e57506daaeb6d7670e522a718067333cd4e3b15155b156109cc57604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa15801561097b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099f9190612a78565b6109cc57604051633b79c77360e21b81526001600160a01b03821660048201526024015b60405180910390fd5b6109d683836119c3565b505050565b6109e3611a63565b600e6109ef8282612adb565b5050565b6109fb610fca565b6001600160a01b0316336001600160a01b031614610a2c57604051632775e0d560e11b815260040160405180910390fd5b6001600160a01b03919091166000908152600c60205260409020805460ff1916911515919091179055565b600b548390610100900460ff168015610a805750336000908152600c602052604090205460ff16155b8015610a9a57506daaeb6d7670e522a718067333cd4e3b15155b15610b5157336001600160a01b03821603610abf57610aba848484611ac2565b610b5c565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015610b0e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b329190612a78565b610b5157604051633b79c77360e21b81523360048201526024016109c3565b610b5c848484611ac2565b50505050565b610b6a610fca565b6001600160a01b0316336001600160a01b031614610b9b57604051632775e0d560e11b815260040160405180910390fd5b600b80549115156101000261ff0019909216919091179055565b610bbd611a63565b610bc5611c68565b6040514790339082156108fc029083906000818181858888f19350505050158015610bf4573d6000803e3d6000fd5b5060405181815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a94243649060200160405180910390a250610c356001600a55565b565b610c3f611a63565b600b5460ff1615610c635760405163dfde68b560e01b815260040160405180910390fd5b610c35611cc1565b600b548390610100900460ff168015610c945750336000908152600c602052604090205460ff16155b8015610cae57506daaeb6d7670e522a718067333cd4e3b15155b15610d6057336001600160a01b03821603610cce57610aba848484611d16565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015610d1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d419190612a78565b610d6057604051633b79c77360e21b81523360048201526024016109c3565b610b5c848484611d16565b610d73611a63565b600b5460ff1615610d975760405163dfde68b560e01b815260040160405180910390fd5b610c35611d31565b610da7611a63565b600f610db4828483612b9a565b507f5411e8ebf1636d9e83d5fc4900bf80cbac82e8790da2a4c94db4895e889eedf68282604051610de6929190612c59565b60405180910390a15050565b610dfa611a63565b806001600160a01b0316610e166009546001600160a01b031690565b6001600160a01b031603610e3d57604051630d68bb3760e11b815260040160405180910390fd5b600980546001600160a01b0319166001600160a01b0383169081179091556040519081527fefb3c18e62e7147abd3462437bc9c3e7dae85b65bddce17bc384ee915118427d9060200160405180910390a150565b610e99611a63565b8051601355602081015160145560408101516015805460609093015163ffffffff908116600160201b0267ffffffffffffffff19909416921691909117919091179055565b60006107f682611d74565b610ef1611a63565b600b5460ff1615610f155760405163dfde68b560e01b815260040160405180910390fd5b610c35611ddb565b60006001600160a01b038216610f46576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600560205260409020546001600160401b031690565b610f73611a63565b610c356000611e13565b610f85611a63565b8051601055602081015160115560408101516012805460609093015163ffffffff908116600160201b0267ffffffffffffffff19909416921691909117919091179055565b6000610fde6008546001600160a01b031690565b905090565b60606003805461080b90612a3e565b60008061101a6104bc846001600160a01b031660009081526005602052604090205460c01c90565b91509150915091565b600b548290610100900460ff16801561105557506001600160a01b0381166000908152600c602052604090205460ff16155b801561106f57506daaeb6d7670e522a718067333cd4e3b15155b1561111857604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa1580156110cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110f09190612a78565b61111857604051633b79c77360e21b81526001600160a01b03821660048201526024016109c3565b6109d68383611e65565b600b548490610100900460ff16801561114b5750336000908152600c602052604090205460ff16155b801561116557506daaeb6d7670e522a718067333cd4e3b15155b1561121d57336001600160a01b0382160361118b5761118685858585611ed1565b611229565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa1580156111da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111fe9190612a78565b61121d57604051633b79c77360e21b81523360048201526024016109c3565b61122985858585611ed1565b5050505050565b61123861238a565b6040805160a08101909152600d805463ffffffff168252600e805460208401919061126290612a3e565b80601f016020809104026020016040519081016040528092919081815260200182805461128e90612a3e565b80156112db5780601f106112b0576101008083540402835291602001916112db565b820191906000526020600020905b8154815290600101906020018083116112be57829003601f168201915b505050505081526020016002820180546112f490612a3e565b80601f016020809104026020016040519081016040528092919081815260200182805461132090612a3e565b801561136d5780601f106113425761010080835404028352916020019161136d565b820191906000526020600020905b81548152906001019060200180831161135057829003601f168201915b50505091835250506040805160808082018352600385015482526004850154602083810191909152600586015463ffffffff80821685870152600160201b9182900481166060808701919091528388019590955285519384018652600688015484526007880154928401929092526008909601548082168386015295909504909416908401520152919050565b6009546001600160a01b03163314611425576040516309aae7f160e21b815260040160405180910390fd5b61142d611c68565b60135460145461143d9190611f15565b61145a5760405163227d67e160e01b815260040160405180910390fd5b8063ffffffff1660000361148157604051630d68bb3760e11b815260040160405180910390fd5b601554600160201b900463ffffffff16158015906114b1575060155463ffffffff600160201b9091048116908216115b156114cf57604051630115da9760e41b815260040160405180910390fd5b60155463ffffffff1615611536576000806114e984610ff2565b90925090506114f88382612c9e565b60155490915063ffffffff908116908216111561152857604051632dbd1e5f60e11b815260040160405180910390fd5b611533848383611f55565b50505b611546828263ffffffff16611fa2565b6109ef6001600a55565b606061155b8261199c565b61157857604051630a14c4b560e41b815260040160405180910390fd5b6000611582611ffa565b905080516000036115a257604051806020016040528060008152506115cd565b806115ac8461200c565b6040516020016115bd929190612cc2565b6040516020818303038152906040525b9392505050565b6009546001600160a01b031633146115ff576040516309aae7f160e21b815260040160405180910390fd5b611607611c68565b6010546011546116179190611f15565b6116345760405163227d67e160e01b815260040160405180910390fd5b8063ffffffff1660000361165b57604051630d68bb3760e11b815260040160405180910390fd5b601254600160201b900463ffffffff161580159061168b575060125463ffffffff600160201b9091048116908216115b156116a957604051630115da9760e41b815260040160405180910390fd5b60125463ffffffff1615611536576000806116c384610ff2565b90925090506116d28383612c9e565b60125490925063ffffffff908116908316111561152857604051632dbd1e5f60e11b815260040160405180910390fd5b61170a611a63565b611712611c68565b82811461175957604051631c7b3a3160e31b81526020600482015260146024820152736164647265737365735f20616e64206e756d735f60601b60448201526064016109c3565b600083900361179857604051631c7b3a3160e31b815260206004820152600a6024820152696164647265737365735f60b01b60448201526064016109c3565b60005b83811015611809576117f98585838181106117b8576117b8612cf1565b90506020020160208101906117cd919061265a565b8484848181106117df576117df612cf1565b90506020020160208101906117f491906126d9565b611fa2565b61180281612d07565b905061179b565b50610b5c6001600a55565b61181c611a63565b6016541561183d57604051633aa6224360e11b815260040160405180910390fd5b600061184a600143612d20565b60408051914060208301524490820152426060808301919091526bffffffffffffffffffffffff1941821b811660808401523290911b16609482015260a80160408051601f198184030181529190528051602090910120600d549091506118b79063ffffffff1682612d33565b60168190556000036118d5576016546118d1906001612d55565b6016555b50565b6118e0611a63565b6001600160a01b0381166119455760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016109c3565b6118d581611e13565b60006301ffc9a760e01b6001600160e01b03198316148061197f57506380ac58cd60e01b6001600160e01b03198316145b806107f65750506001600160e01b031916635b5e139f60e01b1490565b60008054821080156107f6575050600090815260046020526040902054600160e01b161590565b60006119ce82610ede565b9050336001600160a01b03821614611a07576119ea8133610788565b611a07576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b33611a6c610fca565b6001600160a01b031614610c355760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109c3565b6000611acd82611d74565b9050836001600160a01b0316816001600160a01b031614611b005760405162a1148160e81b815260040160405180910390fd5b60008281526006602052604090208054338082146001600160a01b03881690911417611b4d57611b308633610788565b611b4d57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516611b7457604051633a954ecd60e21b815260040160405180910390fd5b611b818686866001612050565b8015611b8c57600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b84169003611c1e57600184016000818152600460205260408120549003611c1c576000548114611c1c5760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b6002600a5403611cba5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109c3565b6002600a55565b611cc961207b565b6009805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6109d683838360405180602001604052806000815250611122565b611d396120cb565b6009805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611cf93390565b600081600054811015611dc25760008181526004602052604081205490600160e01b82169003611dc0575b806000036115cd575060001901600081815260046020526040902054611d9f565b505b604051636f96cda160e11b815260040160405180910390fd5b600b805460ff191660011790556040517fa0058887862c892ade184993a48c672897bca2e36ebf7fa2b4703d4805fc3a0190600090a1565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b611edc848484610a57565b6001600160a01b0383163b15610b5c57611ef884848484612118565b610b5c576040516368d2bf6b60e11b815260040160405180910390fd5b6000821580611f2357504283115b15611f30575060006107f6565b600082118015611f3f57504282105b15611f4c575060006107f6565b50600192915050565b6109d68367ffffffff00000000602085901b1663ffffffff8416176001600160a01b03909116600090815260056020526040902080546001600160c01b031660c09290921b919091179055565b600d5463ffffffff166001600160401b038216611fbe60005490565b611fc89190612d55565b1115611fe75760405163b746b1c960e01b815260040160405180910390fd5b6109ef82826001600160401b0316612204565b6060600d600201805461080b90612a3e565b606060a06040510180604052602081039150506000815280825b600183039250600a81066030018353600a9004806120265750819003601f19909101908152919050565b600954600160a01b900460ff1615610b5c57604051638ac5553d60e01b815260040160405180910390fd5b600954600160a01b900460ff16610c355760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016109c3565b600954600160a01b900460ff1615610c355760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016109c3565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a029061214d903390899088908890600401612d68565b6020604051808303816000875af1925050508015612188575060408051601f3d908101601f1916820190925261218591810190612da5565b60015b6121e6573d8080156121b6576040519150601f19603f3d011682016040523d82523d6000602084013e6121bb565b606091505b5080516000036121de576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b6109ef828260405180602001604052806000815250612223838361227f565b6001600160a01b0383163b156109d6576000548281035b61224d6000868380600101945086612118565b61226a576040516368d2bf6b60e11b815260040160405180910390fd5b81811061223a57816000541461122957600080fd5b60008054908290036122a45760405163b562e8dd60e01b815260040160405180910390fd5b6122b16000848385612050565b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b81811461236057808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101612328565b508160000361238157604051622e076360e81b815260040160405180910390fd5b60005550505050565b6040518060a00160405280600063ffffffff16815260200160608152602001606081526020016123e760405180608001604052806000815260200160008152602001600063ffffffff168152602001600063ffffffff1681525090565b81526040805160808101825260008082526020828101829052928201819052606082015291015290565b6001600160e01b0319811681146118d557600080fd5b60006020828403121561243957600080fd5b81356115cd81612411565b60005b8381101561245f578181015183820152602001612447565b50506000910152565b60008151808452612480816020860160208601612444565b601f01601f19169290920160200192915050565b6020815260006115cd6020830184612468565b6000602082840312156124b957600080fd5b5035919050565b80356001600160a01b03811681146124d757600080fd5b919050565b600080604083850312156124ef57600080fd5b6124f8836124c0565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b038084111561253657612536612506565b604051601f8501601f19908116603f0116810190828211818310171561255e5761255e612506565b8160405280935085815286868601111561257757600080fd5b858560208301376000602087830101525050509392505050565b6000602082840312156125a357600080fd5b81356001600160401b038111156125b957600080fd5b8201601f810184136125ca57600080fd5b6121fc8482356020840161251c565b80151581146118d557600080fd5b600080604083850312156125fa57600080fd5b612603836124c0565b91506020830135612613816125d9565b809150509250929050565b60008060006060848603121561263357600080fd5b61263c846124c0565b925061264a602085016124c0565b9150604084013590509250925092565b60006020828403121561266c57600080fd5b6115cd826124c0565b803563ffffffff811681146124d757600080fd5b6000806040838503121561269c57600080fd5b6126a583612675565b91506126b360208401612675565b90509250929050565b6000602082840312156126ce57600080fd5b81356115cd816125d9565b6000602082840312156126eb57600080fd5b81356001600160401b03811681146115cd57600080fd5b6000806020838503121561271557600080fd5b82356001600160401b038082111561272c57600080fd5b818501915085601f83011261274057600080fd5b81358181111561274f57600080fd5b86602082850101111561276157600080fd5b60209290920196919550909350505050565b60006080828403121561278557600080fd5b604051608081018181106001600160401b03821117156127a7576127a7612506565b806040525080915082358152602083013560208201526127c960408401612675565b60408201526127da60608401612675565b60608201525092915050565b6000608082840312156127f857600080fd5b6115cd8383612773565b6000806000806080858703121561281857600080fd5b612821856124c0565b935061282f602086016124c0565b92506040850135915060608501356001600160401b0381111561285157600080fd5b8501601f8101871361286257600080fd5b6128718782356020840161251c565b91505092959194509250565b6020815263ffffffff82511660208201526000602083015161016060408401526128ab610180840182612468565b90506040840151601f198483030160608501526128c88282612468565b60608681015180516080880152602081015160a0880152604081015163ffffffff90811660c08901529181015190911660e0870152909250905050608084015180516101008501526020810151610120850152604081015163ffffffff908116610140860152606082015116610160850152509392505050565b6000806040838503121561295557600080fd5b6126a5836124c0565b60008083601f84011261297057600080fd5b5081356001600160401b0381111561298757600080fd5b6020830191508360208260051b85010111156129a257600080fd5b9250929050565b600080600080604085870312156129bf57600080fd5b84356001600160401b03808211156129d657600080fd5b6129e28883890161295e565b909650945060208701359150808211156129fb57600080fd5b50612a088782880161295e565b95989497509550505050565b60008060408385031215612a2757600080fd5b612a30836124c0565b91506126b3602084016124c0565b600181811c90821680612a5257607f821691505b602082108103612a7257634e487b7160e01b600052602260045260246000fd5b50919050565b600060208284031215612a8a57600080fd5b81516115cd816125d9565b601f8211156109d657600081815260208120601f850160051c81016020861015612abc5750805b601f850160051c820191505b81811015611c6057828155600101612ac8565b81516001600160401b03811115612af457612af4612506565b612b0881612b028454612a3e565b84612a95565b602080601f831160018114612b3d5760008415612b255750858301515b600019600386901b1c1916600185901b178555611c60565b600085815260208120601f198616915b82811015612b6c57888601518255948401946001909101908401612b4d565b5085821015612b8a5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6001600160401b03831115612bb157612bb1612506565b612bc583612bbf8354612a3e565b83612a95565b6000601f841160018114612bf95760008515612be15750838201355b600019600387901b1c1916600186901b178355611229565b600083815260209020601f19861690835b82811015612c2a5786850135825560209485019460019092019101612c0a565b5086821015612c475760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b634e487b7160e01b600052601160045260246000fd5b63ffffffff818116838216019080821115612cbb57612cbb612c88565b5092915050565b60008351612cd4818460208801612444565b835190830190612ce8818360208801612444565b01949350505050565b634e487b7160e01b600052603260045260246000fd5b600060018201612d1957612d19612c88565b5060010190565b818103818111156107f6576107f6612c88565b600082612d5057634e487b7160e01b600052601260045260246000fd5b500690565b808201808211156107f6576107f6612c88565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612d9b90830184612468565b9695505050505050565b600060208284031215612db757600080fd5b81516115cd8161241156fea26469706673582212209a3a225b9eff8743965fafc7ac3e406fdaf889d0a12ab8f3f6011f27b6e7f6fc64736f6c63430008110033000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000cef0c4346969735c7316e591c12115f13e224f4a0000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000c465058204d495353494f4e350000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b4650584d495353494f4e35000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022b000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000063f585300000000000000000000000000000000000000000000000000000000063f6d6b0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000063f6d6b00000000000000000000000000000000000000000000000000000000063f8283000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000004039333764613930336231626439653338343962336238326261386634313962366633653439346630656466323565386164363263643863326432326361343962000000000000000000000000000000000000000000000000000000000000005168747470733a2f2f697066732e696f2f697066732f626166796265696472756c7a62666c6b69343465366c6d726c787665706f6769746634626935746e3665687534626c356d756779643368796261342f000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106102675760003560e01c80636352211e11610144578063b6501637116100b6578063cb774d471161007a578063cb774d4714610724578063ce5a57f61461073a578063dcaf16011461074d578063e985e9c51461076d578063e9866550146107b6578063f2fde38b146107cb57600080fd5b8063b6501637146106a2578063b88d4fde146106bc578063c3f909d4146106cf578063c7411c5e146106f1578063c87b56dd1461070457600080fd5b80638da5cb5b116101085780638da5cb5b146106055780638e3450391461061a57806395d89b411461063857806396215e921461064d578063a22cb4651461066d578063a2309ff81461068d57600080fd5b80636352211e1461057b57806368bd580e1461059b57806370a08231146105b0578063715018a6146105d05780638316cd72146105e557600080fd5b80633ccfd60b116101dd5780634ac88d9c116101a15780634ac88d9c146104a157806351858e27146104e757806355f804b3146104fc57806358875e6f1461051c5780635b4b606a1461053c5780635c975abb1461055c57600080fd5b80633ccfd60b146104235780633f4ba83a1461043857806341f434341461044d57806342842e0e1461046f57806346ee58691461048257600080fd5b806318160ddd1161022f57806318160ddd146103305780631aefa8841461035357806323b872dd14610373578063277de3f91461038657806332dd47f5146103b65780633cbefe241461040357600080fd5b806301ffc9a71461026c57806306fdde03146102a1578063081812fc146102c3578063095ea7b3146102fb5780631096952314610310575b600080fd5b34801561027857600080fd5b5061028c610287366004612427565b6107eb565b60405190151581526020015b60405180910390f35b3480156102ad57600080fd5b506102b66107fc565b6040516102989190612494565b3480156102cf57600080fd5b506102e36102de3660046124a7565b61088e565b6040516001600160a01b039091168152602001610298565b61030e6103093660046124dc565b6108d2565b005b34801561031c57600080fd5b5061030e61032b366004612591565b6109db565b34801561033c57600080fd5b50600154600054035b604051908152602001610298565b34801561035f57600080fd5b5061030e61036e3660046125e7565b6109f3565b61030e61038136600461261e565b610a57565b34801561039257600080fd5b5061028c6103a136600461265a565b600c6020526000908152604090205460ff1681565b3480156103c257600080fd5b506103eb6103d1366004612689565b63ffffffff1660209190911b67ffffffff00000000161790565b6040516001600160401b039091168152602001610298565b34801561040f57600080fd5b5061030e61041e3660046126bc565b610b62565b34801561042f57600080fd5b5061030e610bb5565b34801561044457600080fd5b5061030e610c37565b34801561045957600080fd5b506102e36daaeb6d7670e522a718067333cd4e81565b61030e61047d36600461261e565b610c6b565b34801561048e57600080fd5b50600b5461028c90610100900460ff1681565b3480156104ad57600080fd5b506104ca6104bc3660046126d9565b63ffffffff602082901c1691565b6040805163ffffffff938416815292909116602083015201610298565b3480156104f357600080fd5b5061030e610d6b565b34801561050857600080fd5b5061030e610517366004612702565b610d9f565b34801561052857600080fd5b5061030e61053736600461265a565b610df2565b34801561054857600080fd5b5061030e6105573660046127e6565b610e91565b34801561056857600080fd5b50600954600160a01b900460ff1661028c565b34801561058757600080fd5b506102e36105963660046124a7565b610ede565b3480156105a757600080fd5b5061030e610ee9565b3480156105bc57600080fd5b506103456105cb36600461265a565b610f1d565b3480156105dc57600080fd5b5061030e610f6b565b3480156105f157600080fd5b5061030e6106003660046127e6565b610f7d565b34801561061157600080fd5b506102e3610fca565b34801561062657600080fd5b506009546001600160a01b03166102e3565b34801561064457600080fd5b506102b6610fe3565b34801561065957600080fd5b506104ca61066836600461265a565b610ff2565b34801561067957600080fd5b5061030e6106883660046125e7565b611023565b34801561069957600080fd5b50600054610345565b3480156106ae57600080fd5b50600b5461028c9060ff1681565b61030e6106ca366004612802565b611122565b3480156106db57600080fd5b506106e4611230565b604051610298919061287d565b61030e6106ff366004612942565b6113fa565b34801561071057600080fd5b506102b661071f3660046124a7565b611550565b34801561073057600080fd5b5061034560165481565b61030e610748366004612942565b6115d4565b34801561075957600080fd5b5061030e6107683660046129a9565b611702565b34801561077957600080fd5b5061028c610788366004612a14565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b3480156107c257600080fd5b5061030e611814565b3480156107d757600080fd5b5061030e6107e636600461265a565b6118d8565b60006107f68261194e565b92915050565b60606002805461080b90612a3e565b80601f016020809104026020016040519081016040528092919081815260200182805461083790612a3e565b80156108845780601f1061085957610100808354040283529160200191610884565b820191906000526020600020905b81548152906001019060200180831161086757829003601f168201915b5050505050905090565b60006108998261199c565b6108b6576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600b548290610100900460ff16801561090457506001600160a01b0381166000908152600c602052604090205460ff16155b801561091e57506daaeb6d7670e522a718067333cd4e3b15155b156109cc57604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa15801561097b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099f9190612a78565b6109cc57604051633b79c77360e21b81526001600160a01b03821660048201526024015b60405180910390fd5b6109d683836119c3565b505050565b6109e3611a63565b600e6109ef8282612adb565b5050565b6109fb610fca565b6001600160a01b0316336001600160a01b031614610a2c57604051632775e0d560e11b815260040160405180910390fd5b6001600160a01b03919091166000908152600c60205260409020805460ff1916911515919091179055565b600b548390610100900460ff168015610a805750336000908152600c602052604090205460ff16155b8015610a9a57506daaeb6d7670e522a718067333cd4e3b15155b15610b5157336001600160a01b03821603610abf57610aba848484611ac2565b610b5c565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015610b0e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b329190612a78565b610b5157604051633b79c77360e21b81523360048201526024016109c3565b610b5c848484611ac2565b50505050565b610b6a610fca565b6001600160a01b0316336001600160a01b031614610b9b57604051632775e0d560e11b815260040160405180910390fd5b600b80549115156101000261ff0019909216919091179055565b610bbd611a63565b610bc5611c68565b6040514790339082156108fc029083906000818181858888f19350505050158015610bf4573d6000803e3d6000fd5b5060405181815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a94243649060200160405180910390a250610c356001600a55565b565b610c3f611a63565b600b5460ff1615610c635760405163dfde68b560e01b815260040160405180910390fd5b610c35611cc1565b600b548390610100900460ff168015610c945750336000908152600c602052604090205460ff16155b8015610cae57506daaeb6d7670e522a718067333cd4e3b15155b15610d6057336001600160a01b03821603610cce57610aba848484611d16565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015610d1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d419190612a78565b610d6057604051633b79c77360e21b81523360048201526024016109c3565b610b5c848484611d16565b610d73611a63565b600b5460ff1615610d975760405163dfde68b560e01b815260040160405180910390fd5b610c35611d31565b610da7611a63565b600f610db4828483612b9a565b507f5411e8ebf1636d9e83d5fc4900bf80cbac82e8790da2a4c94db4895e889eedf68282604051610de6929190612c59565b60405180910390a15050565b610dfa611a63565b806001600160a01b0316610e166009546001600160a01b031690565b6001600160a01b031603610e3d57604051630d68bb3760e11b815260040160405180910390fd5b600980546001600160a01b0319166001600160a01b0383169081179091556040519081527fefb3c18e62e7147abd3462437bc9c3e7dae85b65bddce17bc384ee915118427d9060200160405180910390a150565b610e99611a63565b8051601355602081015160145560408101516015805460609093015163ffffffff908116600160201b0267ffffffffffffffff19909416921691909117919091179055565b60006107f682611d74565b610ef1611a63565b600b5460ff1615610f155760405163dfde68b560e01b815260040160405180910390fd5b610c35611ddb565b60006001600160a01b038216610f46576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600560205260409020546001600160401b031690565b610f73611a63565b610c356000611e13565b610f85611a63565b8051601055602081015160115560408101516012805460609093015163ffffffff908116600160201b0267ffffffffffffffff19909416921691909117919091179055565b6000610fde6008546001600160a01b031690565b905090565b60606003805461080b90612a3e565b60008061101a6104bc846001600160a01b031660009081526005602052604090205460c01c90565b91509150915091565b600b548290610100900460ff16801561105557506001600160a01b0381166000908152600c602052604090205460ff16155b801561106f57506daaeb6d7670e522a718067333cd4e3b15155b1561111857604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa1580156110cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110f09190612a78565b61111857604051633b79c77360e21b81526001600160a01b03821660048201526024016109c3565b6109d68383611e65565b600b548490610100900460ff16801561114b5750336000908152600c602052604090205460ff16155b801561116557506daaeb6d7670e522a718067333cd4e3b15155b1561121d57336001600160a01b0382160361118b5761118685858585611ed1565b611229565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa1580156111da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111fe9190612a78565b61121d57604051633b79c77360e21b81523360048201526024016109c3565b61122985858585611ed1565b5050505050565b61123861238a565b6040805160a08101909152600d805463ffffffff168252600e805460208401919061126290612a3e565b80601f016020809104026020016040519081016040528092919081815260200182805461128e90612a3e565b80156112db5780601f106112b0576101008083540402835291602001916112db565b820191906000526020600020905b8154815290600101906020018083116112be57829003601f168201915b505050505081526020016002820180546112f490612a3e565b80601f016020809104026020016040519081016040528092919081815260200182805461132090612a3e565b801561136d5780601f106113425761010080835404028352916020019161136d565b820191906000526020600020905b81548152906001019060200180831161135057829003601f168201915b50505091835250506040805160808082018352600385015482526004850154602083810191909152600586015463ffffffff80821685870152600160201b9182900481166060808701919091528388019590955285519384018652600688015484526007880154928401929092526008909601548082168386015295909504909416908401520152919050565b6009546001600160a01b03163314611425576040516309aae7f160e21b815260040160405180910390fd5b61142d611c68565b60135460145461143d9190611f15565b61145a5760405163227d67e160e01b815260040160405180910390fd5b8063ffffffff1660000361148157604051630d68bb3760e11b815260040160405180910390fd5b601554600160201b900463ffffffff16158015906114b1575060155463ffffffff600160201b9091048116908216115b156114cf57604051630115da9760e41b815260040160405180910390fd5b60155463ffffffff1615611536576000806114e984610ff2565b90925090506114f88382612c9e565b60155490915063ffffffff908116908216111561152857604051632dbd1e5f60e11b815260040160405180910390fd5b611533848383611f55565b50505b611546828263ffffffff16611fa2565b6109ef6001600a55565b606061155b8261199c565b61157857604051630a14c4b560e41b815260040160405180910390fd5b6000611582611ffa565b905080516000036115a257604051806020016040528060008152506115cd565b806115ac8461200c565b6040516020016115bd929190612cc2565b6040516020818303038152906040525b9392505050565b6009546001600160a01b031633146115ff576040516309aae7f160e21b815260040160405180910390fd5b611607611c68565b6010546011546116179190611f15565b6116345760405163227d67e160e01b815260040160405180910390fd5b8063ffffffff1660000361165b57604051630d68bb3760e11b815260040160405180910390fd5b601254600160201b900463ffffffff161580159061168b575060125463ffffffff600160201b9091048116908216115b156116a957604051630115da9760e41b815260040160405180910390fd5b60125463ffffffff1615611536576000806116c384610ff2565b90925090506116d28383612c9e565b60125490925063ffffffff908116908316111561152857604051632dbd1e5f60e11b815260040160405180910390fd5b61170a611a63565b611712611c68565b82811461175957604051631c7b3a3160e31b81526020600482015260146024820152736164647265737365735f20616e64206e756d735f60601b60448201526064016109c3565b600083900361179857604051631c7b3a3160e31b815260206004820152600a6024820152696164647265737365735f60b01b60448201526064016109c3565b60005b83811015611809576117f98585838181106117b8576117b8612cf1565b90506020020160208101906117cd919061265a565b8484848181106117df576117df612cf1565b90506020020160208101906117f491906126d9565b611fa2565b61180281612d07565b905061179b565b50610b5c6001600a55565b61181c611a63565b6016541561183d57604051633aa6224360e11b815260040160405180910390fd5b600061184a600143612d20565b60408051914060208301524490820152426060808301919091526bffffffffffffffffffffffff1941821b811660808401523290911b16609482015260a80160408051601f198184030181529190528051602090910120600d549091506118b79063ffffffff1682612d33565b60168190556000036118d5576016546118d1906001612d55565b6016555b50565b6118e0611a63565b6001600160a01b0381166119455760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016109c3565b6118d581611e13565b60006301ffc9a760e01b6001600160e01b03198316148061197f57506380ac58cd60e01b6001600160e01b03198316145b806107f65750506001600160e01b031916635b5e139f60e01b1490565b60008054821080156107f6575050600090815260046020526040902054600160e01b161590565b60006119ce82610ede565b9050336001600160a01b03821614611a07576119ea8133610788565b611a07576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b33611a6c610fca565b6001600160a01b031614610c355760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109c3565b6000611acd82611d74565b9050836001600160a01b0316816001600160a01b031614611b005760405162a1148160e81b815260040160405180910390fd5b60008281526006602052604090208054338082146001600160a01b03881690911417611b4d57611b308633610788565b611b4d57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516611b7457604051633a954ecd60e21b815260040160405180910390fd5b611b818686866001612050565b8015611b8c57600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b84169003611c1e57600184016000818152600460205260408120549003611c1c576000548114611c1c5760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b6002600a5403611cba5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109c3565b6002600a55565b611cc961207b565b6009805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6109d683838360405180602001604052806000815250611122565b611d396120cb565b6009805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611cf93390565b600081600054811015611dc25760008181526004602052604081205490600160e01b82169003611dc0575b806000036115cd575060001901600081815260046020526040902054611d9f565b505b604051636f96cda160e11b815260040160405180910390fd5b600b805460ff191660011790556040517fa0058887862c892ade184993a48c672897bca2e36ebf7fa2b4703d4805fc3a0190600090a1565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b611edc848484610a57565b6001600160a01b0383163b15610b5c57611ef884848484612118565b610b5c576040516368d2bf6b60e11b815260040160405180910390fd5b6000821580611f2357504283115b15611f30575060006107f6565b600082118015611f3f57504282105b15611f4c575060006107f6565b50600192915050565b6109d68367ffffffff00000000602085901b1663ffffffff8416176001600160a01b03909116600090815260056020526040902080546001600160c01b031660c09290921b919091179055565b600d5463ffffffff166001600160401b038216611fbe60005490565b611fc89190612d55565b1115611fe75760405163b746b1c960e01b815260040160405180910390fd5b6109ef82826001600160401b0316612204565b6060600d600201805461080b90612a3e565b606060a06040510180604052602081039150506000815280825b600183039250600a81066030018353600a9004806120265750819003601f19909101908152919050565b600954600160a01b900460ff1615610b5c57604051638ac5553d60e01b815260040160405180910390fd5b600954600160a01b900460ff16610c355760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016109c3565b600954600160a01b900460ff1615610c355760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016109c3565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a029061214d903390899088908890600401612d68565b6020604051808303816000875af1925050508015612188575060408051601f3d908101601f1916820190925261218591810190612da5565b60015b6121e6573d8080156121b6576040519150601f19603f3d011682016040523d82523d6000602084013e6121bb565b606091505b5080516000036121de576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b6109ef828260405180602001604052806000815250612223838361227f565b6001600160a01b0383163b156109d6576000548281035b61224d6000868380600101945086612118565b61226a576040516368d2bf6b60e11b815260040160405180910390fd5b81811061223a57816000541461122957600080fd5b60008054908290036122a45760405163b562e8dd60e01b815260040160405180910390fd5b6122b16000848385612050565b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b81811461236057808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101612328565b508160000361238157604051622e076360e81b815260040160405180910390fd5b60005550505050565b6040518060a00160405280600063ffffffff16815260200160608152602001606081526020016123e760405180608001604052806000815260200160008152602001600063ffffffff168152602001600063ffffffff1681525090565b81526040805160808101825260008082526020828101829052928201819052606082015291015290565b6001600160e01b0319811681146118d557600080fd5b60006020828403121561243957600080fd5b81356115cd81612411565b60005b8381101561245f578181015183820152602001612447565b50506000910152565b60008151808452612480816020860160208601612444565b601f01601f19169290920160200192915050565b6020815260006115cd6020830184612468565b6000602082840312156124b957600080fd5b5035919050565b80356001600160a01b03811681146124d757600080fd5b919050565b600080604083850312156124ef57600080fd5b6124f8836124c0565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b038084111561253657612536612506565b604051601f8501601f19908116603f0116810190828211818310171561255e5761255e612506565b8160405280935085815286868601111561257757600080fd5b858560208301376000602087830101525050509392505050565b6000602082840312156125a357600080fd5b81356001600160401b038111156125b957600080fd5b8201601f810184136125ca57600080fd5b6121fc8482356020840161251c565b80151581146118d557600080fd5b600080604083850312156125fa57600080fd5b612603836124c0565b91506020830135612613816125d9565b809150509250929050565b60008060006060848603121561263357600080fd5b61263c846124c0565b925061264a602085016124c0565b9150604084013590509250925092565b60006020828403121561266c57600080fd5b6115cd826124c0565b803563ffffffff811681146124d757600080fd5b6000806040838503121561269c57600080fd5b6126a583612675565b91506126b360208401612675565b90509250929050565b6000602082840312156126ce57600080fd5b81356115cd816125d9565b6000602082840312156126eb57600080fd5b81356001600160401b03811681146115cd57600080fd5b6000806020838503121561271557600080fd5b82356001600160401b038082111561272c57600080fd5b818501915085601f83011261274057600080fd5b81358181111561274f57600080fd5b86602082850101111561276157600080fd5b60209290920196919550909350505050565b60006080828403121561278557600080fd5b604051608081018181106001600160401b03821117156127a7576127a7612506565b806040525080915082358152602083013560208201526127c960408401612675565b60408201526127da60608401612675565b60608201525092915050565b6000608082840312156127f857600080fd5b6115cd8383612773565b6000806000806080858703121561281857600080fd5b612821856124c0565b935061282f602086016124c0565b92506040850135915060608501356001600160401b0381111561285157600080fd5b8501601f8101871361286257600080fd5b6128718782356020840161251c565b91505092959194509250565b6020815263ffffffff82511660208201526000602083015161016060408401526128ab610180840182612468565b90506040840151601f198483030160608501526128c88282612468565b60608681015180516080880152602081015160a0880152604081015163ffffffff90811660c08901529181015190911660e0870152909250905050608084015180516101008501526020810151610120850152604081015163ffffffff908116610140860152606082015116610160850152509392505050565b6000806040838503121561295557600080fd5b6126a5836124c0565b60008083601f84011261297057600080fd5b5081356001600160401b0381111561298757600080fd5b6020830191508360208260051b85010111156129a257600080fd5b9250929050565b600080600080604085870312156129bf57600080fd5b84356001600160401b03808211156129d657600080fd5b6129e28883890161295e565b909650945060208701359150808211156129fb57600080fd5b50612a088782880161295e565b95989497509550505050565b60008060408385031215612a2757600080fd5b612a30836124c0565b91506126b3602084016124c0565b600181811c90821680612a5257607f821691505b602082108103612a7257634e487b7160e01b600052602260045260246000fd5b50919050565b600060208284031215612a8a57600080fd5b81516115cd816125d9565b601f8211156109d657600081815260208120601f850160051c81016020861015612abc5750805b601f850160051c820191505b81811015611c6057828155600101612ac8565b81516001600160401b03811115612af457612af4612506565b612b0881612b028454612a3e565b84612a95565b602080601f831160018114612b3d5760008415612b255750858301515b600019600386901b1c1916600185901b178555611c60565b600085815260208120601f198616915b82811015612b6c57888601518255948401946001909101908401612b4d565b5085821015612b8a5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6001600160401b03831115612bb157612bb1612506565b612bc583612bbf8354612a3e565b83612a95565b6000601f841160018114612bf95760008515612be15750838201355b600019600387901b1c1916600186901b178355611229565b600083815260209020601f19861690835b82811015612c2a5786850135825560209485019460019092019101612c0a565b5086821015612c475760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b634e487b7160e01b600052601160045260246000fd5b63ffffffff818116838216019080821115612cbb57612cbb612c88565b5092915050565b60008351612cd4818460208801612444565b835190830190612ce8818360208801612444565b01949350505050565b634e487b7160e01b600052603260045260246000fd5b600060018201612d1957612d19612c88565b5060010190565b818103818111156107f6576107f6612c88565b600082612d5057634e487b7160e01b600052601260045260246000fd5b500690565b808201808211156107f6576107f6612c88565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612d9b90830184612468565b9695505050505050565b600060208284031215612db757600080fd5b81516115cd8161241156fea26469706673582212209a3a225b9eff8743965fafc7ac3e406fdaf889d0a12ab8f3f6011f27b6e7f6fc64736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000cef0c4346969735c7316e591c12115f13e224f4a0000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000c465058204d495353494f4e350000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b4650584d495353494f4e35000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022b000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000063f585300000000000000000000000000000000000000000000000000000000063f6d6b0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000063f6d6b00000000000000000000000000000000000000000000000000000000063f8283000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000004039333764613930336231626439653338343962336238326261386634313962366633653439346630656466323565386164363263643863326432326361343962000000000000000000000000000000000000000000000000000000000000005168747470733a2f2f697066732e696f2f697066732f626166796265696472756c7a62666c6b69343465366c6d726c787665706f6769746634626935746e3665687534626c356d756779643368796261342f000000000000000000000000000000
-----Decoded View---------------
Arg [0] : name_ (string): FPX MISSION5
Arg [1] : symbol_ (string): FPXMISSION5
Arg [2] : orderPortAddress_ (address): 0xceF0c4346969735C7316e591C12115F13E224f4A
Arg [3] : config_ (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]
-----Encoded View---------------
26 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [2] : 000000000000000000000000cef0c4346969735c7316e591c12115f13e224f4a
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [4] : 000000000000000000000000000000000000000000000000000000000000000c
Arg [5] : 465058204d495353494f4e350000000000000000000000000000000000000000
Arg [6] : 000000000000000000000000000000000000000000000000000000000000000b
Arg [7] : 4650584d495353494f4e35000000000000000000000000000000000000000000
Arg [8] : 000000000000000000000000000000000000000000000000000000000000022b
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000160
Arg [10] : 00000000000000000000000000000000000000000000000000000000000001c0
Arg [11] : 0000000000000000000000000000000000000000000000000000000063f58530
Arg [12] : 0000000000000000000000000000000000000000000000000000000063f6d6b0
Arg [13] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [14] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [15] : 0000000000000000000000000000000000000000000000000000000063f6d6b0
Arg [16] : 0000000000000000000000000000000000000000000000000000000063f82830
Arg [17] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [18] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [19] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [20] : 3933376461393033623162643965333834396233623832626138663431396236
Arg [21] : 6633653439346630656466323565386164363263643863326432326361343962
Arg [22] : 0000000000000000000000000000000000000000000000000000000000000051
Arg [23] : 68747470733a2f2f697066732e696f2f697066732f626166796265696472756c
Arg [24] : 7a62666c6b69343465366c6d726c787665706f6769746634626935746e366568
Arg [25] : 7534626c356d756779643368796261342f000000000000000000000000000000
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.