Feature Tip: Add private address tag to any address under My Name Tag !
ERC-20
Overview
Max Total Supply
3,333 STBC
Holders
64
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 0 Decimals)
Balance
1 STBCValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
TheSadTimesBirthCertificate
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity >=0.8.10 <0.9.0; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "./IMetadataProxy.sol"; import "./utils/DefaultOperatorFilterer.sol"; string constant ErrMaxMint = "Cannot mint more than 1 per address"; string constant ErrMaxSupply = "Exceeds max supply"; string constant ErrNotTheBoss = "Not the boss"; string constant ErrNotSheepOwner = "Not sheep's owner"; string constant ErrNotValidList = "Not a valid list type"; string constant ErrTokenDoesNotExist = "Token does not exist"; /// @title TheSadTimesBirthCertificate /// @author TrakonXYZ (https://trakon.xyz) contract TheSadTimesBirthCertificate is ERC721A, ERC2981, Ownable, DefaultOperatorFilterer { using MerkleProof for bytes32[]; // // Events // event GoingToWork(uint256 indexed tokenId); event LeaveOfAbsence(uint256 indexed tokenId); event Rewarded(uint256 indexed sheep, address indexed human, uint256 karma); event TheBossTransferred( address indexed thePreviousBoss, address indexed theNewBoss ); /// @notice Tracks the working periods of the sheep throughout their career. /// @dev 2 uint128 to pack into one word (32 bytes) to reduce the working storage /// costs. A uint128 is ample size for a timestamp and for time saved. struct WorkPeriod { // Current period start time. uint128 currentStartTime; // Banked time (in seconds) for every work period other than current. uint128 timeBanked; } /// /// Working properties. /// mapping(uint256 => bool) private swappingSheep; mapping(uint256 => WorkPeriod) public sheepWorkPeriods; bool public isWorkingOpen = false; /// /// Minting and token properties. /// uint256 public constant maxSupply = 3333; uint256 private constant mintAmount = 1; /// @notice Keeps track of humans who were rewarded during mint /// and the amount of karma given. mapping(address => uint256) public rewardedHumans; /// @notice Keeps track of sheep that were rewarded during mint /// and the amount of karma given. mapping(uint256 => uint256) public rewardedSheep; /// @notice A mapping of merkle roots for the different /// list types. There is an allowlist and a guaranteed list. mapping(uint8 => bytes32) public merkleRoots; uint8 public constant GUARRANTEED_LIST_TYPE = 1; uint8 public constant ALLOW_LIST_TYPE = 2; uint8 public currentListType; /// /// Metadata properties. /// IMetadataProxy public metadataProxy; bool private isMetadataLocked; string metadataFallbackUrl; /// /// The Boss. /// address public theBoss; constructor( address _regionalManager, address _theBoss, uint96 feeBasisPoints, string memory _fallbackUrl ) ERC721A("TheSadTimesBirthCertificate", "STBC") { // Regional manager does all the dirty work. _transferOwnership(_regionalManager); // Set up the boss. theBoss = _theBoss; _setDefaultRoyalty(theBoss, feeBasisPoints); // The Boss always wins. _mint(theBoss, 333); // Set default metadata url. metadataFallbackUrl = _fallbackUrl; } // // Minting methods. // /// @notice Updates the Merkle root for the given list type. function updateListRoot(uint8 listType, bytes32 root) external onlyOwner { require( listType == GUARRANTEED_LIST_TYPE || listType == ALLOW_LIST_TYPE, ErrNotValidList ); merkleRoots[listType] = root; } /// @notice Updates the current list that is available to mint. /// @dev Allows initial list type to turn off minting. function updateCurrentListType(uint8 listType) external onlyOwner { require( listType == 0 || listType == GUARRANTEED_LIST_TYPE || listType == ALLOW_LIST_TYPE, ErrNotValidList ); currentListType = listType; } /// @notice Mint a single token using a given list's proof. /// A human is tracked as rewarded if they provide a non-zero /// value in the transaction. function mint(bytes32[] calldata proof, uint8 listType) external payable { require(listType <= currentListType, "Mint for list type is closed"); require(_totalMinted() + mintAmount <= maxSupply, ErrMaxSupply); bytes32 listRoot = merkleRoots[listType]; require(_numberMinted(msg.sender) < mintAmount, ErrMaxMint); bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); require(proof.verifyCalldata(listRoot, leaf), "Must be in list"); uint256 tokenId = _nextTokenId(); _mint(msg.sender, mintAmount); if (msg.value > 0) { rewardedHumans[msg.sender] = msg.value; rewardedSheep[tokenId] = msg.value; emit Rewarded({ human: msg.sender, sheep: tokenId, karma: msg.value }); } } /// @dev Starts counting from token ID 1. function _startTokenId() internal pure override returns (uint256) { return 1; } // // Working methods. // function enableWorking() external onlyOwner { isWorkingOpen = true; } /// @notice Allows working or leave of absence sheep to be transferred by /// owner. function transferSheep(address _to, uint256 tokenId) external { swappingSheep[tokenId] = true; safeTransferFrom(msg.sender, _to, tokenId); delete swappingSheep[tokenId]; } /// @dev Ensures that working sheep cannot be transferred unless called /// by the transferSheep method. Note that quantity is unused here /// as quantity > 1 is only possible during mint in ERC721A contract. We /// handle that case by performing a no-op during the mint transfer. function _beforeTokenTransfers( address _from, address, uint256 tokenId, uint256 ) internal view override { if (_from == address(0)) { // noop during mints. return; } WorkPeriod memory workPeriod = sheepWorkPeriods[tokenId]; require( workPeriod.currentStartTime == 0 || swappingSheep[tokenId], "Cannot transfer while working" ); } /// @notice Toggle sheep working for multiple tokens. function toggleSheepWorking(uint256[] calldata tokenIds) external { uint256 tokenIdsLength = tokenIds.length; for (uint256 i = 0; i < tokenIdsLength; ++i) { _toggleSheepWorking(tokenIds[i]); } } /// @notice Toggle sheep working for a single token. function toggleSheepWorking(uint256 tokenId) external { _toggleSheepWorking(tokenId); } /// @notice Allows the regional manager to fire a sheep if a sheep's owner /// intentionally lists a sheep on a marketplace while working. /// If sheep are good, then the admin never has to use this. function fireSheep(uint256 tokenId) external onlyOwner { require(sheepWorkPeriods[tokenId].currentStartTime > 0, "Not working"); WorkPeriod storage workPeriod = sheepWorkPeriods[tokenId]; _setSheepToLeaveOfAbsence(tokenId, workPeriod); } /// @dev Sheep working logic for external methods. Determines the working /// status of a sheep and toggles their status. If moving from /// working to leave of absence, adds the current working time to the overall /// working time. function _toggleSheepWorking(uint256 tokenId) private { require(isWorkingOpen, "Working not opened"); require(msg.sender == ownerOf(tokenId), ErrNotSheepOwner); WorkPeriod storage workPeriod = sheepWorkPeriods[tokenId]; // Set sheep to working. if (workPeriod.currentStartTime == 0) { workPeriod.currentStartTime = uint128(block.timestamp); emit GoingToWork(tokenId); return; } _setSheepToLeaveOfAbsence(tokenId, workPeriod); } /// @dev Helper function extracted out to be used in both the fireSheep /// method and in the _toggleSheepWorking method. function _setSheepToLeaveOfAbsence( uint256 tokenId, WorkPeriod storage workPeriod ) private { workPeriod.timeBanked += uint128(block.timestamp) - workPeriod.currentStartTime; workPeriod.currentStartTime = 0; emit LeaveOfAbsence(tokenId); } /// @notice Returns the total working time in seconds (including current working). function totalWorkingTime(uint256 tokenId) public view returns (uint128) { require(_exists(tokenId), ErrTokenDoesNotExist); return sheepWorkPeriods[tokenId].timeBanked + currentWorkingTime(tokenId); } /// @dev Returns the current working time in seconds. A return value of 0 /// is equivalent to leave of absence state. function currentWorkingTime(uint256 tokenId) public view returns (uint128) { require(_exists(tokenId), ErrTokenDoesNotExist); return sheepWorkPeriods[tokenId].currentStartTime > 0 ? uint128(block.timestamp) - sheepWorkPeriods[tokenId].currentStartTime : 0; } /// /// The Boss methods. /// modifier onlyTheBoss() { require(msg.sender == theBoss, ErrNotTheBoss); _; } /// @notice The Boss is allowed to withdraw balance from contract. function withdraw() external onlyTheBoss { (bool sent, ) = payable(theBoss).call{value: address(this).balance}(""); require(sent, "Withdraw failed"); } /// @notice Implements royalty fees. /// @dev See ERC2981. function updateRoyalty(uint96 feeBasisPoints) external onlyTheBoss { _setDefaultRoyalty(theBoss, feeBasisPoints); } /// @notice Only the boss can transfer to another boss. /// @dev Also sets the new default royalty receiver in ERC2981 but keeps /// the royalty fee unchanged. function transferTheBoss(address theNewBoss) external onlyTheBoss { address thePreviousBoss = theBoss; theBoss = theNewBoss; // We only use a default royalty. // To get the original royalty fee from the public method, // we pass in an unused token id as well as the _feeDenominator value. // This gets us the royalty fraction which is the royalty fee. (, uint256 royaltyFeeInBasisPoints) = royaltyInfo(0, 10000); _setDefaultRoyalty(theBoss, uint96(royaltyFeeInBasisPoints)); emit TheBossTransferred({ thePreviousBoss: thePreviousBoss, theNewBoss: theNewBoss }); } /// @notice Set the new metadata proxy contract. Reverts if the metadata /// has been locked. function setMetadataProxy(address _contract) external onlyOwner { require( !isMetadataLocked, "Metadata is locked to current proxy contract" ); metadataProxy = IMetadataProxy(_contract); } /// @dev Locks metadata to proxy contract for good. One way operation. function lockMetadata() external onlyOwner { isMetadataLocked = true; } /// @dev Fallback URL for the metadata. function setFallbackUrl(string memory _fallbackUrl) external onlyOwner { metadataFallbackUrl = _fallbackUrl; } /// @dev See {ERC721-tokenURI}. function tokenURI(uint256 tokenId) public view override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); return address(metadataProxy) != address(0) ? metadataProxy.tokenURI( tokenId, this.totalWorkingTime(tokenId) ) : metadataFallbackUrl; } /// /// Contract overrides. /// /// @dev See {IERC165-supportsInterface}. function supportsInterface(bytes4 interfaceId) public view override(ERC721A, ERC2981) returns (bool) { return super.supportsInterface(interfaceId); } /// /// OperatorFilterer required overrides. /// @dev See {OperatorFilterer} /// function transferFrom( address from, address to, uint256 tokenId ) public payable override onlyAllowedOperator { super.transferFrom(from, to, tokenId); } function safeTransferFrom( address from, address to, uint256 tokenId ) public payable override onlyAllowedOperator { super.safeTransferFrom(from, to, tokenId); } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public payable override onlyAllowedOperator { super.safeTransferFrom(from, to, tokenId, data); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {OperatorFilterer} from "./OperatorFilterer.sol"; contract DefaultOperatorFilterer is OperatorFilterer { address constant DEFAULT_SUBSCRIPTION = address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6); constructor() OperatorFilterer(DEFAULT_SUBSCRIPTION, true) {} }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.15 <0.9.0; interface IMetadataProxy { function tokenURI(uint256 tokenId, uint128 workingPeriod) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The tree and the proofs can be generated using our * https://github.com/OpenZeppelin/merkle-tree[JavaScript library]. * You will find a quickstart guide in the readme. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. * OpenZeppelin's JavaScript library generates merkle trees that are safe * against this attack out of the box. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Calldata version of {verify} * * _Available since v4.7._ */ function verifyCalldata( bytes32[] calldata proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} * * _Available since v4.7._ */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false * respectively. * * CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer). * * _Available since v4.7._ */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof}. * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/common/ERC2981.sol) pragma solidity ^0.8.0; import "../../interfaces/IERC2981.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information. * * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first. * * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the * fee is specified in basis points by default. * * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. * * _Available since v4.5._ */ abstract contract ERC2981 is IERC2981, ERC165 { struct RoyaltyInfo { address receiver; uint96 royaltyFraction; } RoyaltyInfo private _defaultRoyaltyInfo; mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } /** * @inheritdoc IERC2981 */ function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) { RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId]; if (royalty.receiver == address(0)) { royalty = _defaultRoyaltyInfo; } uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator(); return (royalty.receiver, royaltyAmount); } /** * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an * override. */ function _feeDenominator() internal pure virtual returns (uint96) { return 10000; } /** * @dev Sets the royalty information that all ids in this contract will default to. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: invalid receiver"); _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Removes default royalty information. */ function _deleteDefaultRoyalty() internal virtual { delete _defaultRoyaltyInfo; } /** * @dev Sets the royalty information for a specific token id, overriding the global default. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setTokenRoyalty( uint256 tokenId, address receiver, uint96 feeNumerator ) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: Invalid parameters"); _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Resets royalty information for the token id back to the global default. */ function _resetTokenRoyalty(uint256 tokenId) internal virtual { delete _tokenRoyaltyInfo[tokenId]; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (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 // 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); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol"; contract OperatorFilterer { error OperatorNotAllowed(address operator); IOperatorFilterRegistry constant operatorFilterRegistry = 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(operatorFilterRegistry).code.length > 0) { if (subscribe) { operatorFilterRegistry.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy); } else { if (subscriptionOrRegistrantToCopy != address(0)) { operatorFilterRegistry.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy); } else { operatorFilterRegistry.register(address(this)); } } } } modifier onlyAllowedOperator() virtual { // Check registry code length to facilitate testing in environments without a deployed registry. if (address(operatorFilterRegistry).code.length > 0) { if (!operatorFilterRegistry.isOperatorAllowed(address(this), msg.sender)) { revert OperatorNotAllowed(msg.sender); } } _; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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 {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; interface IOperatorFilterRegistry { function isOperatorAllowed(address registrant, address operator) external returns (bool); function register(address registrant) external; function registerAndSubscribe(address registrant, address subscription) external; function registerAndCopyEntries( address registrant, address registrantToCopy ) 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 // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/structs/EnumerableSet.sol) // This file was procedurally generated from scripts/generate/templates/EnumerableSet.js. pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure * unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an * array of EnumerableSet. * ==== */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastValue; // Update the index for the moved value set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { bytes32[] memory store = _values(set._inner); bytes32[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values in the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } }
{ "optimizer": { "enabled": true, "runs": 1000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_regionalManager","type":"address"},{"internalType":"address","name":"_theBoss","type":"address"},{"internalType":"uint96","name":"feeBasisPoints","type":"uint96"},{"internalType":"string","name":"_fallbackUrl","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[{"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":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"GoingToWork","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"LeaveOfAbsence","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":true,"internalType":"uint256","name":"sheep","type":"uint256"},{"indexed":true,"internalType":"address","name":"human","type":"address"},{"indexed":false,"internalType":"uint256","name":"karma","type":"uint256"}],"name":"Rewarded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"thePreviousBoss","type":"address"},{"indexed":true,"internalType":"address","name":"theNewBoss","type":"address"}],"name":"TheBossTransferred","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"},{"inputs":[],"name":"ALLOW_LIST_TYPE","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GUARRANTEED_LIST_TYPE","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","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":"currentListType","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"currentWorkingTime","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"enableWorking","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"fireSheep","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":[{"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":"isWorkingOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"","type":"uint8"}],"name":"merkleRoots","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"metadataProxy","outputs":[{"internalType":"contract IMetadataProxy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"},{"internalType":"uint8","name":"listType","type":"uint8"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewardedHumans","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rewardedSheep","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_fallbackUrl","type":"string"}],"name":"setFallbackUrl","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"}],"name":"setMetadataProxy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"sheepWorkPeriods","outputs":[{"internalType":"uint128","name":"currentStartTime","type":"uint128"},{"internalType":"uint128","name":"timeBanked","type":"uint128"}],"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":[],"name":"theBoss","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"toggleSheepWorking","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"toggleSheepWorking","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"totalWorkingTime","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"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":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferSheep","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"theNewBoss","type":"address"}],"name":"transferTheBoss","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"listType","type":"uint8"}],"name":"updateCurrentListType","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"listType","type":"uint8"},{"internalType":"bytes32","name":"root","type":"bytes32"}],"name":"updateListRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint96","name":"feeBasisPoints","type":"uint96"}],"name":"updateRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052600d805460ff191690553480156200001b57600080fd5b50604051620035b9380380620035b98339810160408190526200003e91620005c3565b733cc6cdda760b79bafa08df41ecfa224f810dceb660016040518060400160405280601b81526020017f54686553616454696d6573426972746843657274696669636174650000000000815250604051806040016040528060048152602001635354424360e01b8152508160029081620000b991906200076c565b506003620000c882826200076c565b5050600160005550620000db336200028b565b6daaeb6d7670e522a718067333cd4e3b15620002205780156200016e57604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b1580156200014f57600080fd5b505af115801562000164573d6000803e3d6000fd5b5050505062000220565b6001600160a01b03821615620001bf5760405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af29039060440162000134565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e48690602401600060405180830381600087803b1580156200020657600080fd5b505af11580156200021b573d6000803e3d6000fd5b505050505b506200022e9050846200028b565b601380546001600160a01b0319166001600160a01b038516908117909155620002589083620002dd565b60135462000272906001600160a01b031661014d620003e2565b60126200028082826200076c565b505050505062000838565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6127106001600160601b0382161115620003515760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b60648201526084015b60405180910390fd5b6001600160a01b038216620003a95760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c696420726563656976657200000000000000604482015260640162000348565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600855565b6000805490829003620004085760405163b562e8dd60e01b815260040160405180910390fd5b620004176000848385620004d6565b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b17831790558284019083908390600080516020620035998339815191528180a4600183015b818114620004a6578083600060008051602062003599833981519152600080a46001016200047d565b5081600003620004c857604051622e076360e81b815260040160405180910390fd5b60005550505050565b505050565b6001600160a01b038416156200058a576000828152600c60209081526040918290208251808401909352546001600160801b03808216808552600160801b909204169183019190915215806200053a57506000838152600b602052604090205460ff165b620005885760405162461bcd60e51b815260206004820152601d60248201527f43616e6e6f74207472616e73666572207768696c6520776f726b696e67000000604482015260640162000348565b505b50505050565b80516001600160a01b0381168114620005a857600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60008060008060808587031215620005da57600080fd5b620005e58562000590565b93506020620005f681870162000590565b60408701519094506001600160601b03811681146200061457600080fd5b60608701519093506001600160401b03808211156200063257600080fd5b818801915088601f8301126200064757600080fd5b8151818111156200065c576200065c620005ad565b604051601f8201601f19908116603f01168101908382118183101715620006875762000687620005ad565b816040528281528b86848701011115620006a057600080fd5b600093505b82841015620006c45784840186015181850187015292850192620006a5565b600086848301015280965050505050505092959194509250565b600181811c90821680620006f357607f821691505b6020821081036200071457634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620004d157600081815260208120601f850160051c81016020861015620007435750805b601f850160051c820191505b8181101562000764578281556001016200074f565b505050505050565b81516001600160401b03811115620007885762000788620005ad565b620007a081620007998454620006de565b846200071a565b602080601f831160018114620007d85760008415620007bf5750858301515b600019600386901b1c1916600185901b17855562000764565b600085815260208120601f198616915b828110156200080957888601518255948401946001909101908401620007e8565b5085821015620008285787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b612d5180620008486000396000f3fe6080604052600436106102f25760003560e01c806372ec6ef71161018f578063a7f4692f116100e1578063d5abeb011161008a578063e985e9c511610064578063e985e9c51461087f578063f2fde38b146108c8578063fbd928a8146108e857600080fd5b8063d5abeb0114610829578063d759e9531461083f578063e5ad0b2b1461085f57600080fd5b8063b88d4fde116100bb578063b88d4fde146107dc578063be6e8fac146107ef578063c87b56dd1461080957600080fd5b8063a7f4692f1461077a578063a8175ff41461079a578063ae4e4e47146107af57600080fd5b80638ca579661161014357806395d89b411161011d57806395d89b4114610730578063989bdbb614610745578063a22cb4651461075a57600080fd5b80638ca57966146106d85780638da5cb5b146106f85780639218b0451461071657600080fd5b80638073a255116101745780638073a2551461067357806381174ebf146106935780638a184308146106b857600080fd5b806372ec6ef7146106335780637cb543ca1461065357600080fd5b80633d25e23a116102485780634c3c6c8f116101fc5780636d590739116101d65780636d5907391461059d57806370a08231146105fe578063715018a61461061e57600080fd5b80634c3c6c8f146105305780636352211e146105455780636d04ad0f1461056557600080fd5b8063410809771161022d57806341080977146104c357806341e5fb40146104f057806342842e0e1461051d57600080fd5b80633d25e23a146104905780633eee5eb8146104b057600080fd5b8063196311ca116102aa5780632a55205a116102845780632a55205a1461041c5780632d9822cb1461045b5780633ccfd60b1461047b57600080fd5b8063196311ca146103c257806323b872dd146103e2578063289ea7f4146103f557600080fd5b8063081812fc116102db578063081812fc1461034e578063095ea7b31461038657806318160ddd1461039b57600080fd5b806301ffc9a7146102f757806306fdde031461032c575b600080fd5b34801561030357600080fd5b50610317610312366004612537565b610908565b60405190151581526020015b60405180910390f35b34801561033857600080fd5b50610341610919565b60405161032391906125a4565b34801561035a57600080fd5b5061036e6103693660046125b7565b6109ab565b6040516001600160a01b039091168152602001610323565b6103996103943660046125ec565b610a08565b005b3480156103a757600080fd5b5060015460005403600019015b604051908152602001610323565b3480156103ce57600080fd5b506103996103dd3660046125ec565b610aeb565b6103996103f0366004612616565b610b28565b34801561040157600080fd5b5061040a600181565b60405160ff9091168152602001610323565b34801561042857600080fd5b5061043c610437366004612652565b610be6565b604080516001600160a01b039093168352602083019190915201610323565b34801561046757600080fd5b50610399610476366004612674565b610ca3565b34801561048757600080fd5b50610399610d8c565b34801561049c57600080fd5b506103996104ab366004612674565b610e82565b6103996104be3660046126e5565b610f49565b3480156104cf57600080fd5b506103b46104de366004612674565b600e6020526000908152604090205481565b3480156104fc57600080fd5b506103b461050b366004612739565b60106020526000908152604090205481565b61039961052b366004612616565b611196565b34801561053c57600080fd5b5061040a600281565b34801561055157600080fd5b5061036e6105603660046125b7565b61124a565b34801561057157600080fd5b506105856105803660046125b7565b611255565b6040516001600160801b039091168152602001610323565b3480156105a957600080fd5b506105de6105b83660046125b7565b600c602052600090815260409020546001600160801b0380821691600160801b90041682565b604080516001600160801b03938416815292909116602083015201610323565b34801561060a57600080fd5b506103b4610619366004612674565b6112fa565b34801561062a57600080fd5b50610399611362565b34801561063f57600080fd5b5060135461036e906001600160a01b031681565b34801561065f57600080fd5b5061039961066e366004612754565b611376565b34801561067f57600080fd5b5061039961068e3660046125b7565b6113fe565b34801561069f57600080fd5b5060115461036e9061010090046001600160a01b031681565b3480156106c457600080fd5b506103996106d3366004612770565b611407565b3480156106e457600080fd5b506103996106f3366004612739565b61144a565b34801561070457600080fd5b50600a546001600160a01b031661036e565b34801561072257600080fd5b50600d546103179060ff1681565b34801561073c57600080fd5b506103416114de565b34801561075157600080fd5b506103996114ed565b34801561076657600080fd5b506103996107753660046127c0565b611525565b34801561078657600080fd5b506105856107953660046125b7565b611591565b3480156107a657600080fd5b50610399611623565b3480156107bb57600080fd5b506103b46107ca3660046125b7565b600f6020526000908152604090205481565b6103996107ea3660046128a4565b61163a565b3480156107fb57600080fd5b5060115461040a9060ff1681565b34801561081557600080fd5b506103416108243660046125b7565b6116ef565b34801561083557600080fd5b506103b4610d0581565b34801561084b57600080fd5b5061039961085a3660046125b7565b6118db565b34801561086b57600080fd5b5061039961087a366004612920565b611963565b34801561088b57600080fd5b5061031761089a36600461294e565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b3480156108d457600080fd5b506103996108e3366004612674565b6119c9565b3480156108f457600080fd5b50610399610903366004612981565b611a56565b600061091382611a6a565b92915050565b606060028054610928906129ca565b80601f0160208091040260200160405190810160405280929190818152602001828054610954906129ca565b80156109a15780601f10610976576101008083540402835291602001916109a1565b820191906000526020600020905b81548152906001019060200180831161098457829003601f168201915b5050505050905090565b60006109b682611ad1565b6109ec576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6000610a138261124a565b9050336001600160a01b03821614610a82576001600160a01b038116600090815260076020908152604080832033845290915290205460ff16610a82576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260066020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000818152600b60205260409020805460ff19166001179055610b0f338383611196565b6000908152600b60205260409020805460ff1916905550565b6daaeb6d7670e522a718067333cd4e3b15610bd657604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c6171134906044016020604051808303816000875af1158015610b8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bb29190612a04565b610bd657604051633b79c77360e21b81523360048201526024015b60405180910390fd5b610be1838383611b06565b505050565b60008281526009602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046bffffffffffffffffffffffff16928201929092528291610c655750604080518082019091526008546001600160a01b0381168252600160a01b90046bffffffffffffffffffffffff1660208201525b602081015160009061271090610c89906bffffffffffffffffffffffff1687612a37565b610c939190612a4e565b91519350909150505b9250929050565b60135460408051808201909152600c81526b4e6f742074686520626f737360a01b6020820152906001600160a01b03163314610cf25760405162461bcd60e51b8152600401610bcd91906125a4565b50601380546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831617909255166000610d2d81612710610be6565b601354909250610d4791506001600160a01b031682611d11565b826001600160a01b0316826001600160a01b03167fcdfe30ff65a30c50c1151ebbcda38b60adc8a84e89172d89a0b7b43c92f8cdba60405160405180910390a3505050565b60135460408051808201909152600c81526b4e6f742074686520626f737360a01b6020820152906001600160a01b03163314610ddb5760405162461bcd60e51b8152600401610bcd91906125a4565b506013546040516000916001600160a01b03169047908381818185875af1925050503d8060008114610e29576040519150601f19603f3d011682016040523d82523d6000602084013e610e2e565b606091505b5050905080610e7f5760405162461bcd60e51b815260206004820152600f60248201527f5769746864726177206661696c656400000000000000000000000000000000006044820152606401610bcd565b50565b610e8a611e2b565b601154600160a81b900460ff1615610f0a5760405162461bcd60e51b815260206004820152602c60248201527f4d65746164617461206973206c6f636b656420746f2063757272656e7420707260448201527f6f787920636f6e747261637400000000000000000000000000000000000000006064820152608401610bcd565b601180546001600160a01b03909216610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff909216919091179055565b60115460ff9081169082161115610fa25760405162461bcd60e51b815260206004820152601c60248201527f4d696e7420666f72206c697374207479706520697320636c6f736564000000006044820152606401610bcd565b610d056001610fb46000546000190190565b610fbe9190612a70565b11156040518060400160405280601281526020017f45786365656473206d617820737570706c790000000000000000000000000000815250906110145760405162461bcd60e51b8152600401610bcd91906125a4565b5060ff81166000908152601060205260409020546001611057336001600160a01b03166000908152600560205260409081902054901c67ffffffffffffffff1690565b10604051806060016040528060238152602001612cf9602391399061108f5760405162461bcd60e51b8152600401610bcd91906125a4565b506040516bffffffffffffffffffffffff193360601b16602082015260009060340160408051601f19818403018152919052805160209091012090506110d785858484611e85565b6111235760405162461bcd60e51b815260206004820152600f60248201527f4d75737420626520696e206c69737400000000000000000000000000000000006044820152606401610bcd565b600054611131336001611e9f565b341561118e57336000818152600e602090815260408083203490819055858452600f8352928190208390555191825283917f6d46424d7308d93179bbc5c8c01e098e8353dad13aff9809fd8a881a69feaa3a910160405180910390a35b505050505050565b6daaeb6d7670e522a718067333cd4e3b1561123f57604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c6171134906044016020604051808303816000875af11580156111fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112209190612a04565b61123f57604051633b79c77360e21b8152336004820152602401610bcd565b610be1838383611fdd565b600061091382611ff8565b600061126082611ad1565b6040518060400160405280601481526020017f546f6b656e20646f6573206e6f74206578697374000000000000000000000000815250906112b45760405162461bcd60e51b8152600401610bcd91906125a4565b506000828152600c60205260409020546001600160801b03166112d8576000610913565b6000828152600c6020526040902054610913906001600160801b031642612a83565b60006001600160a01b03821661133c576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b61136a611e2b565b6113746000612087565b565b61137e611e2b565b60ff821660011480611393575060ff82166002145b6040518060400160405280601581526020017f4e6f7420612076616c6964206c69737420747970650000000000000000000000815250906113e75760405162461bcd60e51b8152600401610bcd91906125a4565b5060ff909116600090815260106020526040902055565b610e7f816120e6565b8060005b818110156114445761143484848381811061142857611428612aaa565b905060200201356120e6565b61143d81612ac0565b905061140b565b50505050565b611452611e2b565b60ff81161580611465575060ff81166001145b80611473575060ff81166002145b6040518060400160405280601581526020017f4e6f7420612076616c6964206c69737420747970650000000000000000000000815250906114c75760405162461bcd60e51b8152600401610bcd91906125a4565b506011805460ff191660ff92909216919091179055565b606060038054610928906129ca565b6114f5611e2b565b601180547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff16600160a81b179055565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600061159c82611ad1565b6040518060400160405280601481526020017f546f6b656e20646f6573206e6f74206578697374000000000000000000000000815250906115f05760405162461bcd60e51b8152600401610bcd91906125a4565b506115fa82611255565b6000838152600c60205260409020546109139190600160801b90046001600160801b0316612ad9565b61162b611e2b565b600d805460ff19166001179055565b6daaeb6d7670e522a718067333cd4e3b156116e357604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c6171134906044016020604051808303816000875af11580156116a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116c49190612a04565b6116e357604051633b79c77360e21b8152336004820152602401610bcd565b61144484848484612228565b60606116fa82611ad1565b611730576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60115461010090046001600160a01b03166117d55760128054611752906129ca565b80601f016020809104026020016040519081016040528092919081815260200182805461177e906129ca565b80156117cb5780601f106117a0576101008083540402835291602001916117cb565b820191906000526020600020905b8154815290600101906020018083116117ae57829003601f168201915b5050505050610913565b6011546040517fa7f4692f000000000000000000000000000000000000000000000000000000008152600481018490526101009091046001600160a01b03169063bd6d0032908490309063a7f4692f90602401602060405180830381865afa158015611845573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118699190612af9565b6040516001600160e01b031960e085901b16815260048101929092526001600160801b03166024820152604401600060405180830381865afa1580156118b3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526109139190810190612b22565b6118e3611e2b565b6000818152600c60205260409020546001600160801b03166119475760405162461bcd60e51b815260206004820152600b60248201527f4e6f7420776f726b696e670000000000000000000000000000000000000000006044820152606401610bcd565b6000818152600c6020526040902061195f828261226c565b5050565b60135460408051808201909152600c81526b4e6f742074686520626f737360a01b6020820152906001600160a01b031633146119b25760405162461bcd60e51b8152600401610bcd91906125a4565b50601354610e7f906001600160a01b031682611d11565b6119d1611e2b565b6001600160a01b038116611a4d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610bcd565b610e7f81612087565b611a5e611e2b565b601261195f8282612bdf565b60006001600160e01b031982167f2a55205a00000000000000000000000000000000000000000000000000000000148061091357507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614610913565b600081600111158015611ae5575060005482105b8015610913575050600090815260046020526040902054600160e01b161590565b6000611b1182611ff8565b9050836001600160a01b0316816001600160a01b031614611b5e576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526006602052604090208054338082146001600160a01b03881690911417611be1576001600160a01b038616600090815260076020908152604080832033845290915290205460ff16611be1576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038516611c21576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611c2e868686600161230c565b8015611c3957600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b84169003611ccb57600184016000818152600460205260408120549003611cc9576000548114611cc95760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461118e565b6127106bffffffffffffffffffffffff82161115611d975760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c2065786365656460448201527f2073616c655072696365000000000000000000000000000000000000000000006064820152608401610bcd565b6001600160a01b038216611ded5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610bcd565b604080518082019091526001600160a01b039092168083526bffffffffffffffffffffffff9091166020909201829052600160a01b90910217600855565b600a546001600160a01b031633146113745760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610bcd565b600082611e938686856123c1565b1490505b949350505050565b6000805490829003611edd576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611eea600084838561230c565b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b818114611f9957808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101611f61565b5081600003611fd4576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005550505050565b610be18383836040518060200160405280600081525061163a565b60008180600111612055576000548110156120555760008181526004602052604081205490600160e01b82169003612053575b8060000361204c57506000190160008181526004602052604090205461202b565b9392505050565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600a80546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600d5460ff166121385760405162461bcd60e51b815260206004820152601260248201527f576f726b696e67206e6f74206f70656e656400000000000000000000000000006044820152606401610bcd565b6121418161124a565b6001600160a01b0316336001600160a01b0316146040518060400160405280601181526020017f4e6f742073686565702773206f776e6572000000000000000000000000000000815250906121a95760405162461bcd60e51b8152600401610bcd91906125a4565b506000818152600c60205260408120805490916001600160801b03909116900361221e5780546fffffffffffffffffffffffffffffffff1916426001600160801b031617815560405182907fcb73884550ab62536ccb1e8c8f83d915bd8c252180245a28db539ed8d48a1ea590600090a25050565b61195f828261226c565b612233848484610b28565b6001600160a01b0383163b156114445761224f8484848461240d565b611444576040516368d2bf6b60e11b815260040160405180910390fd5b8054612281906001600160801b031642612a83565b815482906010906122a3908490600160801b90046001600160801b0316612ad9565b82546001600160801b039182166101009390930a92830291909202199091161790555080546fffffffffffffffffffffffffffffffff1916815560405182907f872d69f42605a3e694119d1eaa7b4f2ceeccd7c8cf59af07fdf76db92b90c85790600090a25050565b6001600160a01b03841615611444576000828152600c60209081526040918290208251808401909352546001600160801b03808216808552600160801b9092041691830191909152158061236e57506000838152600b602052604090205460ff165b6123ba5760405162461bcd60e51b815260206004820152601d60248201527f43616e6e6f74207472616e73666572207768696c6520776f726b696e670000006044820152606401610bcd565b5050505050565b600081815b84811015612404576123f0828787848181106123e4576123e4612aaa565b905060200201356124f5565b9150806123fc81612ac0565b9150506123c6565b50949350505050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290612442903390899088908890600401612c9f565b6020604051808303816000875af192505050801561247d575060408051601f3d908101601f1916820190925261247a91810190612cdb565b60015b6124db573d8080156124ab576040519150601f19603f3d011682016040523d82523d6000602084013e6124b0565b606091505b5080516000036124d3576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611e97565b600081831061251157600082815260208490526040902061204c565b5060009182526020526040902090565b6001600160e01b031981168114610e7f57600080fd5b60006020828403121561254957600080fd5b813561204c81612521565b60005b8381101561256f578181015183820152602001612557565b50506000910152565b60008151808452612590816020860160208601612554565b601f01601f19169290920160200192915050565b60208152600061204c6020830184612578565b6000602082840312156125c957600080fd5b5035919050565b80356001600160a01b03811681146125e757600080fd5b919050565b600080604083850312156125ff57600080fd5b612608836125d0565b946020939093013593505050565b60008060006060848603121561262b57600080fd5b612634846125d0565b9250612642602085016125d0565b9150604084013590509250925092565b6000806040838503121561266557600080fd5b50508035926020909101359150565b60006020828403121561268657600080fd5b61204c826125d0565b60008083601f8401126126a157600080fd5b50813567ffffffffffffffff8111156126b957600080fd5b6020830191508360208260051b8501011115610c9c57600080fd5b803560ff811681146125e757600080fd5b6000806000604084860312156126fa57600080fd5b833567ffffffffffffffff81111561271157600080fd5b61271d8682870161268f565b90945092506127309050602085016126d4565b90509250925092565b60006020828403121561274b57600080fd5b61204c826126d4565b6000806040838503121561276757600080fd5b612608836126d4565b6000806020838503121561278357600080fd5b823567ffffffffffffffff81111561279a57600080fd5b6127a68582860161268f565b90969095509350505050565b8015158114610e7f57600080fd5b600080604083850312156127d357600080fd5b6127dc836125d0565b915060208301356127ec816127b2565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612836576128366127f7565b604052919050565b600067ffffffffffffffff821115612858576128586127f7565b50601f01601f191660200190565b60006128796128748461283e565b61280d565b905082815283838301111561288d57600080fd5b828260208301376000602084830101529392505050565b600080600080608085870312156128ba57600080fd5b6128c3856125d0565b93506128d1602086016125d0565b925060408501359150606085013567ffffffffffffffff8111156128f457600080fd5b8501601f8101871361290557600080fd5b61291487823560208401612866565b91505092959194509250565b60006020828403121561293257600080fd5b81356bffffffffffffffffffffffff8116811461204c57600080fd5b6000806040838503121561296157600080fd5b61296a836125d0565b9150612978602084016125d0565b90509250929050565b60006020828403121561299357600080fd5b813567ffffffffffffffff8111156129aa57600080fd5b8201601f810184136129bb57600080fd5b611e9784823560208401612866565b600181811c908216806129de57607f821691505b6020821081036129fe57634e487b7160e01b600052602260045260246000fd5b50919050565b600060208284031215612a1657600080fd5b815161204c816127b2565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761091357610913612a21565b600082612a6b57634e487b7160e01b600052601260045260246000fd5b500490565b8082018082111561091357610913612a21565b6001600160801b03828116828216039080821115612aa357612aa3612a21565b5092915050565b634e487b7160e01b600052603260045260246000fd5b600060018201612ad257612ad2612a21565b5060010190565b6001600160801b03818116838216019080821115612aa357612aa3612a21565b600060208284031215612b0b57600080fd5b81516001600160801b038116811461204c57600080fd5b600060208284031215612b3457600080fd5b815167ffffffffffffffff811115612b4b57600080fd5b8201601f81018413612b5c57600080fd5b8051612b6a6128748261283e565b818152856020838501011115612b7f57600080fd5b612b90826020830160208601612554565b95945050505050565b601f821115610be157600081815260208120601f850160051c81016020861015612bc05750805b601f850160051c820191505b8181101561118e57828155600101612bcc565b815167ffffffffffffffff811115612bf957612bf96127f7565b612c0d81612c0784546129ca565b84612b99565b602080601f831160018114612c425760008415612c2a5750858301515b600019600386901b1c1916600185901b17855561118e565b600085815260208120601f198616915b82811015612c7157888601518255948401946001909101908401612c52565b5085821015612c8f5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60006001600160a01b03808716835280861660208401525083604083015260806060830152612cd16080830184612578565b9695505050505050565b600060208284031215612ced57600080fd5b815161204c8161252156fe43616e6e6f74206d696e74206d6f7265207468616e2031207065722061646472657373a26469706673582212203b2ff67267f7b0b8cd225dddc2dca977f55ea6ba8f61f49d2e62eb8de49fe69a64736f6c63430008110033ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef000000000000000000000000766606538ab13ea7234c2b1379a83448f2974c7c000000000000000000000000132fd3fbb000c0612191c5c1a71173f7a99d021200000000000000000000000000000000000000000000000000000000000002ee0000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000002d68747470733a2f2f74686573616474696d65732e636f6d2f6d657461646174612f64656661756c742e6a736f6e00000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106102f25760003560e01c806372ec6ef71161018f578063a7f4692f116100e1578063d5abeb011161008a578063e985e9c511610064578063e985e9c51461087f578063f2fde38b146108c8578063fbd928a8146108e857600080fd5b8063d5abeb0114610829578063d759e9531461083f578063e5ad0b2b1461085f57600080fd5b8063b88d4fde116100bb578063b88d4fde146107dc578063be6e8fac146107ef578063c87b56dd1461080957600080fd5b8063a7f4692f1461077a578063a8175ff41461079a578063ae4e4e47146107af57600080fd5b80638ca579661161014357806395d89b411161011d57806395d89b4114610730578063989bdbb614610745578063a22cb4651461075a57600080fd5b80638ca57966146106d85780638da5cb5b146106f85780639218b0451461071657600080fd5b80638073a255116101745780638073a2551461067357806381174ebf146106935780638a184308146106b857600080fd5b806372ec6ef7146106335780637cb543ca1461065357600080fd5b80633d25e23a116102485780634c3c6c8f116101fc5780636d590739116101d65780636d5907391461059d57806370a08231146105fe578063715018a61461061e57600080fd5b80634c3c6c8f146105305780636352211e146105455780636d04ad0f1461056557600080fd5b8063410809771161022d57806341080977146104c357806341e5fb40146104f057806342842e0e1461051d57600080fd5b80633d25e23a146104905780633eee5eb8146104b057600080fd5b8063196311ca116102aa5780632a55205a116102845780632a55205a1461041c5780632d9822cb1461045b5780633ccfd60b1461047b57600080fd5b8063196311ca146103c257806323b872dd146103e2578063289ea7f4146103f557600080fd5b8063081812fc116102db578063081812fc1461034e578063095ea7b31461038657806318160ddd1461039b57600080fd5b806301ffc9a7146102f757806306fdde031461032c575b600080fd5b34801561030357600080fd5b50610317610312366004612537565b610908565b60405190151581526020015b60405180910390f35b34801561033857600080fd5b50610341610919565b60405161032391906125a4565b34801561035a57600080fd5b5061036e6103693660046125b7565b6109ab565b6040516001600160a01b039091168152602001610323565b6103996103943660046125ec565b610a08565b005b3480156103a757600080fd5b5060015460005403600019015b604051908152602001610323565b3480156103ce57600080fd5b506103996103dd3660046125ec565b610aeb565b6103996103f0366004612616565b610b28565b34801561040157600080fd5b5061040a600181565b60405160ff9091168152602001610323565b34801561042857600080fd5b5061043c610437366004612652565b610be6565b604080516001600160a01b039093168352602083019190915201610323565b34801561046757600080fd5b50610399610476366004612674565b610ca3565b34801561048757600080fd5b50610399610d8c565b34801561049c57600080fd5b506103996104ab366004612674565b610e82565b6103996104be3660046126e5565b610f49565b3480156104cf57600080fd5b506103b46104de366004612674565b600e6020526000908152604090205481565b3480156104fc57600080fd5b506103b461050b366004612739565b60106020526000908152604090205481565b61039961052b366004612616565b611196565b34801561053c57600080fd5b5061040a600281565b34801561055157600080fd5b5061036e6105603660046125b7565b61124a565b34801561057157600080fd5b506105856105803660046125b7565b611255565b6040516001600160801b039091168152602001610323565b3480156105a957600080fd5b506105de6105b83660046125b7565b600c602052600090815260409020546001600160801b0380821691600160801b90041682565b604080516001600160801b03938416815292909116602083015201610323565b34801561060a57600080fd5b506103b4610619366004612674565b6112fa565b34801561062a57600080fd5b50610399611362565b34801561063f57600080fd5b5060135461036e906001600160a01b031681565b34801561065f57600080fd5b5061039961066e366004612754565b611376565b34801561067f57600080fd5b5061039961068e3660046125b7565b6113fe565b34801561069f57600080fd5b5060115461036e9061010090046001600160a01b031681565b3480156106c457600080fd5b506103996106d3366004612770565b611407565b3480156106e457600080fd5b506103996106f3366004612739565b61144a565b34801561070457600080fd5b50600a546001600160a01b031661036e565b34801561072257600080fd5b50600d546103179060ff1681565b34801561073c57600080fd5b506103416114de565b34801561075157600080fd5b506103996114ed565b34801561076657600080fd5b506103996107753660046127c0565b611525565b34801561078657600080fd5b506105856107953660046125b7565b611591565b3480156107a657600080fd5b50610399611623565b3480156107bb57600080fd5b506103b46107ca3660046125b7565b600f6020526000908152604090205481565b6103996107ea3660046128a4565b61163a565b3480156107fb57600080fd5b5060115461040a9060ff1681565b34801561081557600080fd5b506103416108243660046125b7565b6116ef565b34801561083557600080fd5b506103b4610d0581565b34801561084b57600080fd5b5061039961085a3660046125b7565b6118db565b34801561086b57600080fd5b5061039961087a366004612920565b611963565b34801561088b57600080fd5b5061031761089a36600461294e565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b3480156108d457600080fd5b506103996108e3366004612674565b6119c9565b3480156108f457600080fd5b50610399610903366004612981565b611a56565b600061091382611a6a565b92915050565b606060028054610928906129ca565b80601f0160208091040260200160405190810160405280929190818152602001828054610954906129ca565b80156109a15780601f10610976576101008083540402835291602001916109a1565b820191906000526020600020905b81548152906001019060200180831161098457829003601f168201915b5050505050905090565b60006109b682611ad1565b6109ec576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6000610a138261124a565b9050336001600160a01b03821614610a82576001600160a01b038116600090815260076020908152604080832033845290915290205460ff16610a82576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260066020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000818152600b60205260409020805460ff19166001179055610b0f338383611196565b6000908152600b60205260409020805460ff1916905550565b6daaeb6d7670e522a718067333cd4e3b15610bd657604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c6171134906044016020604051808303816000875af1158015610b8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bb29190612a04565b610bd657604051633b79c77360e21b81523360048201526024015b60405180910390fd5b610be1838383611b06565b505050565b60008281526009602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046bffffffffffffffffffffffff16928201929092528291610c655750604080518082019091526008546001600160a01b0381168252600160a01b90046bffffffffffffffffffffffff1660208201525b602081015160009061271090610c89906bffffffffffffffffffffffff1687612a37565b610c939190612a4e565b91519350909150505b9250929050565b60135460408051808201909152600c81526b4e6f742074686520626f737360a01b6020820152906001600160a01b03163314610cf25760405162461bcd60e51b8152600401610bcd91906125a4565b50601380546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831617909255166000610d2d81612710610be6565b601354909250610d4791506001600160a01b031682611d11565b826001600160a01b0316826001600160a01b03167fcdfe30ff65a30c50c1151ebbcda38b60adc8a84e89172d89a0b7b43c92f8cdba60405160405180910390a3505050565b60135460408051808201909152600c81526b4e6f742074686520626f737360a01b6020820152906001600160a01b03163314610ddb5760405162461bcd60e51b8152600401610bcd91906125a4565b506013546040516000916001600160a01b03169047908381818185875af1925050503d8060008114610e29576040519150601f19603f3d011682016040523d82523d6000602084013e610e2e565b606091505b5050905080610e7f5760405162461bcd60e51b815260206004820152600f60248201527f5769746864726177206661696c656400000000000000000000000000000000006044820152606401610bcd565b50565b610e8a611e2b565b601154600160a81b900460ff1615610f0a5760405162461bcd60e51b815260206004820152602c60248201527f4d65746164617461206973206c6f636b656420746f2063757272656e7420707260448201527f6f787920636f6e747261637400000000000000000000000000000000000000006064820152608401610bcd565b601180546001600160a01b03909216610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff909216919091179055565b60115460ff9081169082161115610fa25760405162461bcd60e51b815260206004820152601c60248201527f4d696e7420666f72206c697374207479706520697320636c6f736564000000006044820152606401610bcd565b610d056001610fb46000546000190190565b610fbe9190612a70565b11156040518060400160405280601281526020017f45786365656473206d617820737570706c790000000000000000000000000000815250906110145760405162461bcd60e51b8152600401610bcd91906125a4565b5060ff81166000908152601060205260409020546001611057336001600160a01b03166000908152600560205260409081902054901c67ffffffffffffffff1690565b10604051806060016040528060238152602001612cf9602391399061108f5760405162461bcd60e51b8152600401610bcd91906125a4565b506040516bffffffffffffffffffffffff193360601b16602082015260009060340160408051601f19818403018152919052805160209091012090506110d785858484611e85565b6111235760405162461bcd60e51b815260206004820152600f60248201527f4d75737420626520696e206c69737400000000000000000000000000000000006044820152606401610bcd565b600054611131336001611e9f565b341561118e57336000818152600e602090815260408083203490819055858452600f8352928190208390555191825283917f6d46424d7308d93179bbc5c8c01e098e8353dad13aff9809fd8a881a69feaa3a910160405180910390a35b505050505050565b6daaeb6d7670e522a718067333cd4e3b1561123f57604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c6171134906044016020604051808303816000875af11580156111fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112209190612a04565b61123f57604051633b79c77360e21b8152336004820152602401610bcd565b610be1838383611fdd565b600061091382611ff8565b600061126082611ad1565b6040518060400160405280601481526020017f546f6b656e20646f6573206e6f74206578697374000000000000000000000000815250906112b45760405162461bcd60e51b8152600401610bcd91906125a4565b506000828152600c60205260409020546001600160801b03166112d8576000610913565b6000828152600c6020526040902054610913906001600160801b031642612a83565b60006001600160a01b03821661133c576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b61136a611e2b565b6113746000612087565b565b61137e611e2b565b60ff821660011480611393575060ff82166002145b6040518060400160405280601581526020017f4e6f7420612076616c6964206c69737420747970650000000000000000000000815250906113e75760405162461bcd60e51b8152600401610bcd91906125a4565b5060ff909116600090815260106020526040902055565b610e7f816120e6565b8060005b818110156114445761143484848381811061142857611428612aaa565b905060200201356120e6565b61143d81612ac0565b905061140b565b50505050565b611452611e2b565b60ff81161580611465575060ff81166001145b80611473575060ff81166002145b6040518060400160405280601581526020017f4e6f7420612076616c6964206c69737420747970650000000000000000000000815250906114c75760405162461bcd60e51b8152600401610bcd91906125a4565b506011805460ff191660ff92909216919091179055565b606060038054610928906129ca565b6114f5611e2b565b601180547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff16600160a81b179055565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600061159c82611ad1565b6040518060400160405280601481526020017f546f6b656e20646f6573206e6f74206578697374000000000000000000000000815250906115f05760405162461bcd60e51b8152600401610bcd91906125a4565b506115fa82611255565b6000838152600c60205260409020546109139190600160801b90046001600160801b0316612ad9565b61162b611e2b565b600d805460ff19166001179055565b6daaeb6d7670e522a718067333cd4e3b156116e357604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c6171134906044016020604051808303816000875af11580156116a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116c49190612a04565b6116e357604051633b79c77360e21b8152336004820152602401610bcd565b61144484848484612228565b60606116fa82611ad1565b611730576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60115461010090046001600160a01b03166117d55760128054611752906129ca565b80601f016020809104026020016040519081016040528092919081815260200182805461177e906129ca565b80156117cb5780601f106117a0576101008083540402835291602001916117cb565b820191906000526020600020905b8154815290600101906020018083116117ae57829003601f168201915b5050505050610913565b6011546040517fa7f4692f000000000000000000000000000000000000000000000000000000008152600481018490526101009091046001600160a01b03169063bd6d0032908490309063a7f4692f90602401602060405180830381865afa158015611845573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118699190612af9565b6040516001600160e01b031960e085901b16815260048101929092526001600160801b03166024820152604401600060405180830381865afa1580156118b3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526109139190810190612b22565b6118e3611e2b565b6000818152600c60205260409020546001600160801b03166119475760405162461bcd60e51b815260206004820152600b60248201527f4e6f7420776f726b696e670000000000000000000000000000000000000000006044820152606401610bcd565b6000818152600c6020526040902061195f828261226c565b5050565b60135460408051808201909152600c81526b4e6f742074686520626f737360a01b6020820152906001600160a01b031633146119b25760405162461bcd60e51b8152600401610bcd91906125a4565b50601354610e7f906001600160a01b031682611d11565b6119d1611e2b565b6001600160a01b038116611a4d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610bcd565b610e7f81612087565b611a5e611e2b565b601261195f8282612bdf565b60006001600160e01b031982167f2a55205a00000000000000000000000000000000000000000000000000000000148061091357507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614610913565b600081600111158015611ae5575060005482105b8015610913575050600090815260046020526040902054600160e01b161590565b6000611b1182611ff8565b9050836001600160a01b0316816001600160a01b031614611b5e576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526006602052604090208054338082146001600160a01b03881690911417611be1576001600160a01b038616600090815260076020908152604080832033845290915290205460ff16611be1576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038516611c21576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611c2e868686600161230c565b8015611c3957600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b84169003611ccb57600184016000818152600460205260408120549003611cc9576000548114611cc95760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461118e565b6127106bffffffffffffffffffffffff82161115611d975760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c2065786365656460448201527f2073616c655072696365000000000000000000000000000000000000000000006064820152608401610bcd565b6001600160a01b038216611ded5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610bcd565b604080518082019091526001600160a01b039092168083526bffffffffffffffffffffffff9091166020909201829052600160a01b90910217600855565b600a546001600160a01b031633146113745760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610bcd565b600082611e938686856123c1565b1490505b949350505050565b6000805490829003611edd576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611eea600084838561230c565b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b818114611f9957808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101611f61565b5081600003611fd4576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005550505050565b610be18383836040518060200160405280600081525061163a565b60008180600111612055576000548110156120555760008181526004602052604081205490600160e01b82169003612053575b8060000361204c57506000190160008181526004602052604090205461202b565b9392505050565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600a80546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600d5460ff166121385760405162461bcd60e51b815260206004820152601260248201527f576f726b696e67206e6f74206f70656e656400000000000000000000000000006044820152606401610bcd565b6121418161124a565b6001600160a01b0316336001600160a01b0316146040518060400160405280601181526020017f4e6f742073686565702773206f776e6572000000000000000000000000000000815250906121a95760405162461bcd60e51b8152600401610bcd91906125a4565b506000818152600c60205260408120805490916001600160801b03909116900361221e5780546fffffffffffffffffffffffffffffffff1916426001600160801b031617815560405182907fcb73884550ab62536ccb1e8c8f83d915bd8c252180245a28db539ed8d48a1ea590600090a25050565b61195f828261226c565b612233848484610b28565b6001600160a01b0383163b156114445761224f8484848461240d565b611444576040516368d2bf6b60e11b815260040160405180910390fd5b8054612281906001600160801b031642612a83565b815482906010906122a3908490600160801b90046001600160801b0316612ad9565b82546001600160801b039182166101009390930a92830291909202199091161790555080546fffffffffffffffffffffffffffffffff1916815560405182907f872d69f42605a3e694119d1eaa7b4f2ceeccd7c8cf59af07fdf76db92b90c85790600090a25050565b6001600160a01b03841615611444576000828152600c60209081526040918290208251808401909352546001600160801b03808216808552600160801b9092041691830191909152158061236e57506000838152600b602052604090205460ff165b6123ba5760405162461bcd60e51b815260206004820152601d60248201527f43616e6e6f74207472616e73666572207768696c6520776f726b696e670000006044820152606401610bcd565b5050505050565b600081815b84811015612404576123f0828787848181106123e4576123e4612aaa565b905060200201356124f5565b9150806123fc81612ac0565b9150506123c6565b50949350505050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290612442903390899088908890600401612c9f565b6020604051808303816000875af192505050801561247d575060408051601f3d908101601f1916820190925261247a91810190612cdb565b60015b6124db573d8080156124ab576040519150601f19603f3d011682016040523d82523d6000602084013e6124b0565b606091505b5080516000036124d3576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611e97565b600081831061251157600082815260208490526040902061204c565b5060009182526020526040902090565b6001600160e01b031981168114610e7f57600080fd5b60006020828403121561254957600080fd5b813561204c81612521565b60005b8381101561256f578181015183820152602001612557565b50506000910152565b60008151808452612590816020860160208601612554565b601f01601f19169290920160200192915050565b60208152600061204c6020830184612578565b6000602082840312156125c957600080fd5b5035919050565b80356001600160a01b03811681146125e757600080fd5b919050565b600080604083850312156125ff57600080fd5b612608836125d0565b946020939093013593505050565b60008060006060848603121561262b57600080fd5b612634846125d0565b9250612642602085016125d0565b9150604084013590509250925092565b6000806040838503121561266557600080fd5b50508035926020909101359150565b60006020828403121561268657600080fd5b61204c826125d0565b60008083601f8401126126a157600080fd5b50813567ffffffffffffffff8111156126b957600080fd5b6020830191508360208260051b8501011115610c9c57600080fd5b803560ff811681146125e757600080fd5b6000806000604084860312156126fa57600080fd5b833567ffffffffffffffff81111561271157600080fd5b61271d8682870161268f565b90945092506127309050602085016126d4565b90509250925092565b60006020828403121561274b57600080fd5b61204c826126d4565b6000806040838503121561276757600080fd5b612608836126d4565b6000806020838503121561278357600080fd5b823567ffffffffffffffff81111561279a57600080fd5b6127a68582860161268f565b90969095509350505050565b8015158114610e7f57600080fd5b600080604083850312156127d357600080fd5b6127dc836125d0565b915060208301356127ec816127b2565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612836576128366127f7565b604052919050565b600067ffffffffffffffff821115612858576128586127f7565b50601f01601f191660200190565b60006128796128748461283e565b61280d565b905082815283838301111561288d57600080fd5b828260208301376000602084830101529392505050565b600080600080608085870312156128ba57600080fd5b6128c3856125d0565b93506128d1602086016125d0565b925060408501359150606085013567ffffffffffffffff8111156128f457600080fd5b8501601f8101871361290557600080fd5b61291487823560208401612866565b91505092959194509250565b60006020828403121561293257600080fd5b81356bffffffffffffffffffffffff8116811461204c57600080fd5b6000806040838503121561296157600080fd5b61296a836125d0565b9150612978602084016125d0565b90509250929050565b60006020828403121561299357600080fd5b813567ffffffffffffffff8111156129aa57600080fd5b8201601f810184136129bb57600080fd5b611e9784823560208401612866565b600181811c908216806129de57607f821691505b6020821081036129fe57634e487b7160e01b600052602260045260246000fd5b50919050565b600060208284031215612a1657600080fd5b815161204c816127b2565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761091357610913612a21565b600082612a6b57634e487b7160e01b600052601260045260246000fd5b500490565b8082018082111561091357610913612a21565b6001600160801b03828116828216039080821115612aa357612aa3612a21565b5092915050565b634e487b7160e01b600052603260045260246000fd5b600060018201612ad257612ad2612a21565b5060010190565b6001600160801b03818116838216019080821115612aa357612aa3612a21565b600060208284031215612b0b57600080fd5b81516001600160801b038116811461204c57600080fd5b600060208284031215612b3457600080fd5b815167ffffffffffffffff811115612b4b57600080fd5b8201601f81018413612b5c57600080fd5b8051612b6a6128748261283e565b818152856020838501011115612b7f57600080fd5b612b90826020830160208601612554565b95945050505050565b601f821115610be157600081815260208120601f850160051c81016020861015612bc05750805b601f850160051c820191505b8181101561118e57828155600101612bcc565b815167ffffffffffffffff811115612bf957612bf96127f7565b612c0d81612c0784546129ca565b84612b99565b602080601f831160018114612c425760008415612c2a5750858301515b600019600386901b1c1916600185901b17855561118e565b600085815260208120601f198616915b82811015612c7157888601518255948401946001909101908401612c52565b5085821015612c8f5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60006001600160a01b03808716835280861660208401525083604083015260806060830152612cd16080830184612578565b9695505050505050565b600060208284031215612ced57600080fd5b815161204c8161252156fe43616e6e6f74206d696e74206d6f7265207468616e2031207065722061646472657373a26469706673582212203b2ff67267f7b0b8cd225dddc2dca977f55ea6ba8f61f49d2e62eb8de49fe69a64736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000766606538ab13ea7234c2b1379a83448f2974c7c000000000000000000000000132fd3fbb000c0612191c5c1a71173f7a99d021200000000000000000000000000000000000000000000000000000000000002ee0000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000002d68747470733a2f2f74686573616474696d65732e636f6d2f6d657461646174612f64656661756c742e6a736f6e00000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _regionalManager (address): 0x766606538Ab13ea7234c2b1379a83448f2974C7C
Arg [1] : _theBoss (address): 0x132fd3Fbb000C0612191C5c1A71173f7a99d0212
Arg [2] : feeBasisPoints (uint96): 750
Arg [3] : _fallbackUrl (string): https://thesadtimes.com/metadata/default.json
-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 000000000000000000000000766606538ab13ea7234c2b1379a83448f2974c7c
Arg [1] : 000000000000000000000000132fd3fbb000c0612191c5c1a71173f7a99d0212
Arg [2] : 00000000000000000000000000000000000000000000000000000000000002ee
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [4] : 000000000000000000000000000000000000000000000000000000000000002d
Arg [5] : 68747470733a2f2f74686573616474696d65732e636f6d2f6d65746164617461
Arg [6] : 2f64656661756c742e6a736f6e00000000000000000000000000000000000000
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.