Feature Tip: Add private address tag to any address under My Name Tag !
ERC-1155
Overview
Max Total Supply
98
Holders
20
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Multiplier
Compiler Version
v0.8.13+commit.abaa5c0e
Optimization Enabled:
Yes with 20 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity ^0.8.0; import "@manifoldxyz/libraries-solidity/contracts/access/AdminControl.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "./ERC1155CollectionBase.sol"; contract Multiplier is ERC1155, ERC1155CollectionBase, AdminControl { string public name = "Multipliers"; bool public isSetCollectionUriDisabled = false; constructor(address signingAddress_) ERC1155('') { _setURI("https://gateway.pinata.cloud/ipfs/QmcM6YWyi6WUvJQ7UKGrtWdYiQmScfkEoJFuEQozvVDeAQ"); _initialize( // total supply 3000, // total supply available to purchase 3000, // 0.03 eth public sale price 30000000000000000, // purchase limit (0 for no limit) 0, // transaction limit (0 for no limit) 5, // 0.03 eth presale price 30000000000000000, // presale limit (unused but 0 for no limit) 0, signingAddress_, // use dynamic presale purchase limit true ); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC1155, ERC1155CollectionBase, AdminControl) returns (bool) { return ERC1155CollectionBase.supportsInterface(interfaceId) || ERC1155.supportsInterface(interfaceId) || AdminControl.supportsInterface(interfaceId); } /** * @dev See {IERC1155Collection-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { return ERC1155.balanceOf(owner, TOKEN_ID); } /** * @dev See {IERC1155Collection-withdraw}. */ function withdraw(address payable recipient, uint256 amount) external override adminRequired { _withdraw(recipient, amount); } /** * @dev See {IERC1155Collection-setTransferLocked}. */ function setTransferLocked(bool locked) external override adminRequired { _setTransferLocked(locked); } /** * @dev See {IERC1155Collection-activate}. */ function activate() override external adminRequired { _activate(); } /** * @dev See {IERC1155Collection-deactivate}. */ function deactivate() external override adminRequired { _deactivate(); } /** * @dev See {IERC1155Collection-setCollectionURI}. */ function setCollectionURI(string calldata uri) external override adminRequired { require(isSetCollectionUriDisabled == false); _setURI(uri); } function disableSetCollectionUri() external adminRequired { isSetCollectionUriDisabled = true; } /** * @dev See {IERC1155Collection-burn} */ function burn(address from, uint16 amount) public virtual override { require(from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not owner nor approved"); ERC1155._burn(from, TOKEN_ID, amount); } /** * @dev See {ERC1155CollectionBase-_mint}. */ function _mintERC1155(address to, uint16 amount) internal virtual override { ERC1155._mint(to, TOKEN_ID, amount, ""); } /** * @dev See {ERC1155-_beforeTokenTransfer}. */ function _beforeTokenTransfer(address, address from, address, uint256[] memory, uint256[] memory, bytes memory) internal virtual override { _validateTokenTransferability(from); } /** * @dev Update royalties */ function updateRoyalties(address payable recipient, uint256 bps) external adminRequired { _updateRoyalties(recipient, bps); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; // @author: manifold.xyz import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; import "./ICollectionBase.sol"; /** * @dev ERC1155 Collection Interface */ interface IERC1155Collection is ICollectionBase, IERC165 { struct CollectionState { uint16 transactionLimit; uint16 purchaseMax; uint16 purchaseRemaining; uint256 purchasePrice; uint16 purchaseLimit; uint256 presalePurchasePrice; uint16 presalePurchaseLimit; uint16 purchaseCount; bool active; uint256 startTime; uint256 endTime; uint256 presaleInterval; uint256 claimStartTime; uint256 claimEndTime; bool useDynamicPresalePurchaseLimit; } /** * @dev Activates the contract. */ function activate() external; /** * @dev Deactivate the contract */ function deactivate() external; // /** // * @dev Pre-mint tokens to the owner. Sale must not be active. // * @param amount The number of tokens to mint. // */ // function premint(uint16 amount) external; // /** // * @dev Pre-mint tokens to the list of addresses. Sale must not be active. // * @param amounts The amount of tokens to mint per address. // * @param addresses The list of addresses to mint a token to. // */ // function premint(uint16[] calldata amounts, address[] calldata addresses) external; // /** // * @dev Claim - mint with validation. // * @param amount The number of tokens to mint. // * @param message Signed message to validate input args. // * @param signature Signature of the signer to recover from signed message. // * @param nonce Manifold-generated nonce. // */ // function claim(uint16 amount, bytes32 message, bytes calldata signature, string calldata nonce) external; /** * @dev Purchase - mint with validation. * @param amount The number of tokens to mint. */ function purchase(uint16 amount) external payable; // /** // * @dev Mint reserve tokens to the owner. Sale must be complete. // * @param amount The number of tokens to mint. // */ // function mintReserve(uint16 amount) external; // /** // * @dev Mint reserve tokens to the list of addresses. Sale must be complete. // * @param amounts The amount of tokens to mint per address. // * @param addresses The list of addresses to mint a token to. // */ // function mintReserve(uint16[] calldata amounts, address[] calldata addresses) external; /** * @dev Set the URI for the metadata for the collection. * @param uri The metadata URI. */ function setCollectionURI(string calldata uri) external; /** * @dev returns the collection state */ function state() external view returns (CollectionState memory); /** * @dev Total amount of tokens remaining for the given token id. */ function purchaseRemaining() external view returns (uint16); /** * @dev Withdraw funds (requires contract admin). * @param recipient The address to withdraw funds to * @param amount The amount to withdraw */ function withdraw(address payable recipient, uint256 amount) external; /** * @dev Set whether or not token transfers are locked until end of sale. * @param locked Whether or not transfers are locked */ function setTransferLocked(bool locked) external; /** * @dev Get balance of address. Similar to IERC1155-balanceOf, but doesn't require token ID * @param owner The address to get the token balance of */ function balanceOf(address owner) external view returns (uint256); /** * @dev Destroys `amount` tokens from `from` * @param from The address to remove tokens from * @param amount The amount of tokens to remove */ function burn(address from, uint16 amount) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @author: manifold.xyz /** * @dev Collection Interface */ interface ICollectionBase { event CollectionActivated(uint256 startTime, uint256 endTime, uint256 presaleInterval, uint256 claimStartTime, uint256 claimEndTime); event CollectionDeactivated(); /** * @dev Check if nonce has been used */ function nonceUsed(string memory nonce) external view returns(bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @author: manifold.xyz import "@openzeppelin/contracts/utils/Strings.sol"; import "./IERC1155Collection.sol"; import "./CollectionBase.sol"; /** * ERC1155 Collection Drop Contract (Base) */ abstract contract ERC1155CollectionBase is CollectionBase, IERC1155Collection { // Token ID to mint uint16 internal TOKEN_ID = 0; // Immutable variables that should only be set by the constructor or initializer uint16 public transactionLimit; uint16 public purchaseMax; uint16 public purchaseLimit; uint256 public purchasePrice; uint16 public presalePurchaseLimit; uint256 public presalePurchasePrice; uint16 public maxSupply; bool public useDynamicPresalePurchaseLimit; // Mutable mint state uint16 public purchaseCount; uint16 public reserveCount; mapping(address => uint16) private _mintCount; // Royalty uint256 private _royaltyBps; address payable private _royaltyRecipient; bytes4 private constant _INTERFACE_ID_ROYALTIES_CREATORCORE = 0xbb3bafd6; bytes4 private constant _INTERFACE_ID_ROYALTIES_EIP2981 = 0x2a55205a; bytes4 private constant _INTERFACE_ID_ROYALTIES_RARIBLE = 0xb7799584; // Transfer lock bool public transferLocked; /** * Initializer */ function _initialize(uint16 maxSupply_, uint16 purchaseMax_, uint256 purchasePrice_, uint16 purchaseLimit_, uint16 transactionLimit_, uint256 presalePurchasePrice_, uint16 presalePurchaseLimit_, address signingAddress_, bool useDynamicPresalePurchaseLimit_) internal { require(_signingAddress == address(0), "Already initialized"); require(maxSupply_ >= purchaseMax_, "Invalid input"); maxSupply = maxSupply_; purchaseMax = purchaseMax_; purchasePrice = purchasePrice_; purchaseLimit = purchaseLimit_; transactionLimit = transactionLimit_; presalePurchaseLimit = presalePurchaseLimit_; presalePurchasePrice = presalePurchasePrice_; _signingAddress = signingAddress_; useDynamicPresalePurchaseLimit = useDynamicPresalePurchaseLimit_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165) returns (bool) { return interfaceId == type(IERC1155Collection).interfaceId ||interfaceId == _INTERFACE_ID_ROYALTIES_CREATORCORE || interfaceId == _INTERFACE_ID_ROYALTIES_EIP2981 || interfaceId == _INTERFACE_ID_ROYALTIES_RARIBLE; } /** * @dev See {IERC1155Collection-purchase}. */ function purchase(uint16 amount) external virtual override payable { _validatePurchaseRestrictions(); _validatePrice(amount); require(TOKEN_ID < maxSupply); // Track total mints per address only if necessary if (_shouldUseMintCount()) { _mintCount[msg.sender] += amount; } for(uint i = 0; i < amount; i++) { _mint(msg.sender, 1); TOKEN_ID++; } } /** * @dev See {IERC1155Collection-state} */ function state() external override view returns (CollectionState memory) { // No message sender, no purchase balance uint16 balance = msg.sender == address(0) ? 0 : uint16(_getMintBalance()); return CollectionState(transactionLimit, purchaseMax, purchaseRemaining(), purchasePrice, purchaseLimit, presalePurchasePrice, presalePurchaseLimit, balance, active, startTime, endTime, presaleInterval, claimStartTime, claimEndTime, useDynamicPresalePurchaseLimit); } /** * @dev Get balance of address. Similar to IERC1155-balanceOf, but doesn't require token ID * @param owner The address to get the token balance of */ function balanceOf(address owner) public virtual override view returns (uint256); /** * @dev See {IERC1155Collection-purchaseRemaining}. */ function purchaseRemaining() public virtual override view returns (uint16) { return purchaseMax - purchaseCount; } /** * ROYALTY FUNCTIONS */ function getRoyalties(uint256) external view returns (address payable[] memory recipients, uint256[] memory bps) { if (_royaltyRecipient != address(0x0)) { recipients = new address payable[](1); recipients[0] = _royaltyRecipient; bps = new uint256[](1); bps[0] = _royaltyBps; } return (recipients, bps); } function getFeeRecipients(uint256) external view returns (address payable[] memory recipients) { if (_royaltyRecipient != address(0x0)) { recipients = new address payable[](1); recipients[0] = _royaltyRecipient; } return recipients; } function getFeeBps(uint256) external view returns (uint[] memory bps) { if (_royaltyRecipient != address(0x0)) { bps = new uint256[](1); bps[0] = _royaltyBps; } return bps; } function royaltyInfo(uint256, uint256 value) external view returns (address, uint256) { return (_royaltyRecipient, value*_royaltyBps/10000); } /** * Mint function internal to ERC1155CollectionBase to keep track of state */ function _mint(address to, uint16 amount) internal { purchaseCount += amount; _mintERC1155(to, amount); } /** * @dev A _mint function is required that calls the underlying ERC1155 mint. */ function _mintERC1155(address to, uint16 amount) internal virtual; /** * Validate price (override for custom pricing mechanics) */ function _validatePrice(uint16 amount) internal { require(amount <= transactionLimit); require(msg.value == amount * purchasePrice, "Invalid purchase amount sent"); } /** * Validate price (override for custom pricing mechanics) */ function _validatePresalePrice(uint16 amount) internal virtual { require(msg.value == amount * presalePurchasePrice, "Invalid purchase amount sent"); } /** * If enabled, lock token transfers until after the sale has ended. * * This helps enforce purchase limits, so someone can't buy -> transfer -> buy again * while the token is minting. */ function _validateTokenTransferability(address from) internal view { require(!transferLocked || purchaseRemaining() == 0 || (active && block.timestamp >= endTime) || from == address(0), "Transfer locked until sale ends"); } /** * Set whether or not token transfers are locked till end of sale */ function _setTransferLocked(bool locked) internal { transferLocked = locked; } /** * @dev Update royalties */ function _updateRoyalties(address payable recipient, uint256 bps) internal { _royaltyRecipient = recipient; _royaltyBps = bps; } /** * @dev Return mint count or balanceOf */ function _getMintBalance() internal view returns (uint256) { uint256 balance; if (_shouldUseMintCount()) { balance = _mintCount[msg.sender]; } else { balance = balanceOf(msg.sender); } return balance; } /** * @dev Return whether to use our own mint count vs balanceOf. * * Tokens minted via `premint` and `claim`, for example, don't affect mint count. */ function _shouldUseMintCount() internal view returns (bool) { return !transferLocked && (purchaseLimit > 0 || presalePurchaseLimit > 0); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @author: manifold.xyz import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "./ICollectionBase.sol"; /** * Collection Drop Contract (Base) */ abstract contract CollectionBase is ICollectionBase { using ECDSA for bytes32; using Strings for uint256; // Immutable variables that should only be set by the constructor or initializer address internal _signingAddress; // Message nonces mapping(bytes32 => bool) private _usedNonces; // Sale start/end control bool public active = true; uint256 public startTime; uint256 public endTime; uint256 public presaleInterval; // Claim period start/end control uint256 public claimStartTime; uint256 public claimEndTime; /** * Withdraw funds */ function _withdraw(address payable recipient, uint256 amount) internal { (bool success,) = recipient.call{value:amount}(""); require(success); } /** * Activate the sale */ function _activate() internal virtual { require(!active, "Already active"); active = true; } /** * Deactivate the sale */ function _deactivate() internal virtual { startTime = 0; endTime = 0; active = false; claimStartTime = 0; claimEndTime = 0; emit CollectionDeactivated(); } function _getNonceBytes32(string memory nonce) internal pure returns(bytes32 nonceBytes32) { bytes memory nonceBytes = bytes(nonce); require(nonceBytes.length <= 32, "Invalid nonce"); assembly { nonceBytes32 := mload(add(nonce, 32)) } } /** * Validate claim signature */ function _validateClaimRequest(bytes32 message, bytes calldata signature, string calldata nonce, uint16 amount) internal virtual { _validatePurchaseRequestWithAmount(message, signature, nonce, amount); } /** * Validate claim restrictions */ function _validateClaimRestrictions() internal virtual { require(active, "Inactive"); // require(block.timestamp >= claimStartTime && block.timestamp <= claimEndTime, "Outside claim period."); } /** * Validate purchase signature */ function _validatePurchaseRequest(bytes32 message, bytes calldata signature, string calldata nonce) internal virtual { // Verify nonce usage/re-use bytes32 nonceBytes32 = _getNonceBytes32(nonce); require(!_usedNonces[nonceBytes32], "Cannot replay transaction"); // Verify valid message based on input variables bytes32 expectedMessage = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", (20+bytes(nonce).length).toString(), msg.sender, nonce)); require(message == expectedMessage, "Malformed message"); // Verify signature was performed by the expected signing address address signer = message.recover(signature); require(signer == _signingAddress, "Invalid signature"); _usedNonces[nonceBytes32] = true; } /** * Validate purchase signature with amount */ function _validatePurchaseRequestWithAmount(bytes32 message, bytes calldata signature, string calldata nonce, uint16 amount) internal virtual { // Verify nonce usage/re-use bytes32 nonceBytes32 = _getNonceBytes32(nonce); require(!_usedNonces[nonceBytes32], "Cannot replay transaction"); // Verify valid message based on input variables bytes32 expectedMessage = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", (20+bytes(nonce).length+bytes(uint256(amount).toString()).length).toString(), msg.sender, nonce, uint256(amount).toString())); require(message == expectedMessage, "Malformed message"); // Verify signature was performed by the expected signing address address signer = message.recover(signature); require(signer == _signingAddress, "Invalid signature"); _usedNonces[nonceBytes32] = true; } /** * Perform purchase restriciton checks. Override if more logic is needed */ function _validatePurchaseRestrictions() internal virtual { require(active, "Inactive"); } /** * @dev See {ICollectionBase-nonceUsed}. */ function nonceUsed(string memory nonce) external view override returns(bool) { bytes32 nonceBytes32 = _getNonceBytes32(nonce); return _usedNonces[nonceBytes32]; } /** * @dev Check if currently in presale */ function _isPresale() internal view returns (bool) { return block.timestamp > startTime && block.timestamp - startTime < presaleInterval; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/structs/EnumerableSet.sol) 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. */ 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) { return _values(set._inner); } // 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; 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 on 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; assembly { result := store } return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (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 v4.4.0 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s; uint8 v; assembly { s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) v := add(shr(255, vs), 27) } return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC1155/extensions/IERC1155MetadataURI.sol) pragma solidity ^0.8.0; import "../IERC1155.sol"; /** * @dev Interface of the optional ERC1155MetadataExtension interface, as defined * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. * * _Available since v3.1._ */ interface IERC1155MetadataURI is IERC1155 { /** * @dev Returns the URI for token type `id`. * * If the `\{id\}` substring is present in the URI, it must be replaced by * clients with the actual token type ID. */ function uri(uint256 id) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC1155/IERC1155Receiver.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev _Available since v3.1._ */ interface IERC1155Receiver is IERC165 { /** @dev Handles the receipt of a single ERC1155 token type. This function is called at the end of a `safeTransferFrom` after the balance has been updated. To accept the transfer, this must return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` (i.e. 0xf23a6e61, or its own function selector). @param operator The address which initiated the transfer (i.e. msg.sender) @param from The address which previously owned the token @param id The ID of the token being transferred @param value The amount of tokens being transferred @param data Additional data with no specified format @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed */ function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns (bytes4); /** @dev Handles the receipt of a multiple ERC1155 token types. This function is called at the end of a `safeBatchTransferFrom` after the balances have been updated. To accept the transfer(s), this must return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` (i.e. 0xbc197c81, or its own function selector). @param operator The address which initiated the batch transfer (i.e. msg.sender) @param from The address which previously owned the token @param ids An array containing ids of each token being transferred (order and length must match values array) @param values An array containing amounts of each token being transferred (order and length must match ids array) @param data Additional data with no specified format @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC1155/ERC1155.sol) pragma solidity ^0.8.0; import "./IERC1155.sol"; import "./IERC1155Receiver.sol"; import "./extensions/IERC1155MetadataURI.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */ contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { using Address for address; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json string private _uri; /** * @dev See {_setURI}. */ constructor(string memory uri_) { _setURI(uri_); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC1155).interfaceId || interfaceId == type(IERC1155MetadataURI).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256) public view virtual override returns (string memory) { return _uri; } /** * @dev See {IERC1155-balanceOf}. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) public view virtual override returns (uint256) { require(account != address(0), "ERC1155: balance query for the zero address"); return _balances[id][account]; } /** * @dev See {IERC1155-balanceOfBatch}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] memory accounts, uint256[] memory ids) public view virtual override returns (uint256[] memory) { require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch"); uint256[] memory batchBalances = new uint256[](accounts.length); for (uint256 i = 0; i < accounts.length; ++i) { batchBalances[i] = balanceOf(accounts[i], ids[i]); } return batchBalances; } /** * @dev See {IERC1155-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view virtual override returns (bool) { return _operatorApprovals[account][operator]; } /** * @dev See {IERC1155-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not owner nor approved" ); _safeTransferFrom(from, to, id, amount, data); } /** * @dev See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: transfer caller is not owner nor approved" ); _safeBatchTransferFrom(from, to, ids, amounts, data); } /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, _asSingletonArray(id), _asSingletonArray(amount), data); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; emit TransferSingle(operator, from, to, id, amount); _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, ids, amounts, data); for (uint256 i = 0; i < ids.length; ++i) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; } emit TransferBatch(operator, from, to, ids, amounts); _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data); } /** * @dev Sets a new URI for all token types, by relying on the token type ID * substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * By this mechanism, any occurrence of the `\{id\}` substring in either the * URI or any of the amounts in the JSON file at said URI will be replaced by * clients with the token type ID. * * For example, the `https://token-cdn-domain/\{id\}.json` URI would be * interpreted by clients as * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json` * for token type ID 0x4cce0. * * See {uri}. * * Because these URIs cannot be meaningfully represented by the {URI} event, * this function emits no events. */ function _setURI(string memory newuri) internal virtual { _uri = newuri; } /** * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint( address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), to, _asSingletonArray(id), _asSingletonArray(amount), data); _balances[id][to] += amount; emit TransferSingle(operator, address(0), to, id, amount); _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _mintBatch( address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); for (uint256 i = 0; i < ids.length; i++) { _balances[ids[i]][to] += amounts[i]; } emit TransferBatch(operator, address(0), to, ids, amounts); _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data); } /** * @dev Destroys `amount` tokens of token type `id` from `from` * * Requirements: * * - `from` cannot be the zero address. * - `from` must have at least `amount` tokens of token type `id`. */ function _burn( address from, uint256 id, uint256 amount ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, address(0), _asSingletonArray(id), _asSingletonArray(amount), ""); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } emit TransferSingle(operator, from, address(0), id, amount); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}. * * Requirements: * * - `ids` and `amounts` must have the same length. */ function _burnBatch( address from, uint256[] memory ids, uint256[] memory amounts ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); for (uint256 i = 0; i < ids.length; i++) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } } emit TransferBatch(operator, from, address(0), ids, amounts); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC1155: setting approval status for self"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Hook that is called before any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `id` and `amount` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 amount, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) { if (response != IERC1155Receiver.onERC1155Received.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non ERC1155Receiver implementer"); } } } function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns ( bytes4 response ) { if (response != IERC1155Receiver.onERC1155BatchReceived.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non ERC1155Receiver implementer"); } } } function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) { uint256[] memory array = new uint256[](1); array[0] = element; return array; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.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 Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @author: manifold.xyz import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; /** * @dev Interface for admin control */ interface IAdminControl is IERC165 { event AdminApproved(address indexed account, address indexed sender); event AdminRevoked(address indexed account, address indexed sender); /** * @dev gets address of all admins */ function getAdmins() external view returns (address[] memory); /** * @dev add an admin. Can only be called by contract owner. */ function approveAdmin(address admin) external; /** * @dev remove an admin. Can only be called by contract owner. */ function revokeAdmin(address admin) external; /** * @dev checks whether or not given address is an admin * Returns True if they are */ function isAdmin(address admin) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @author: manifold.xyz import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./IAdminControl.sol"; abstract contract AdminControl is Ownable, IAdminControl, ERC165 { using EnumerableSet for EnumerableSet.AddressSet; // Track registered admins EnumerableSet.AddressSet private _admins; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IAdminControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Only allows approved admins to call the specified function */ modifier adminRequired() { require(owner() == msg.sender || _admins.contains(msg.sender), "AdminControl: Must be owner or admin"); _; } /** * @dev See {IAdminControl-getAdmins}. */ function getAdmins() external view override returns (address[] memory admins) { admins = new address[](_admins.length()); for (uint i = 0; i < _admins.length(); i++) { admins[i] = _admins.at(i); } return admins; } /** * @dev See {IAdminControl-approveAdmin}. */ function approveAdmin(address admin) external override onlyOwner { if (!_admins.contains(admin)) { emit AdminApproved(admin, msg.sender); _admins.add(admin); } } /** * @dev See {IAdminControl-revokeAdmin}. */ function revokeAdmin(address admin) external override onlyOwner { if (_admins.contains(admin)) { emit AdminRevoked(admin, msg.sender); _admins.remove(admin); } } /** * @dev See {IAdminControl-isAdmin}. */ function isAdmin(address admin) public override view returns (bool) { return (owner() == admin || _admins.contains(admin)); } }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 20 }, "evmVersion": "london", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"signingAddress_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"AdminApproved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"AdminRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"startTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"presaleInterval","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"claimStartTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"claimEndTime","type":"uint256"}],"name":"CollectionActivated","type":"event"},{"anonymous":false,"inputs":[],"name":"CollectionDeactivated","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":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[],"name":"activate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"active","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"approveAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint16","name":"amount","type":"uint16"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimEndTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"deactivate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"disableSetCollectionUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"endTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAdmins","outputs":[{"internalType":"address[]","name":"admins","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getFeeBps","outputs":[{"internalType":"uint256[]","name":"bps","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getFeeRecipients","outputs":[{"internalType":"address payable[]","name":"recipients","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getRoyalties","outputs":[{"internalType":"address payable[]","name":"recipients","type":"address[]"},{"internalType":"uint256[]","name":"bps","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"isAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isSetCollectionUriDisabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"nonce","type":"string"}],"name":"nonceUsed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleInterval","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presalePurchaseLimit","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presalePurchasePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"amount","type":"uint16"}],"name":"purchase","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"purchaseCount","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"purchaseLimit","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"purchaseMax","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"purchasePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"purchaseRemaining","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reserveCount","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"revokeAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"value","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":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"name":"setCollectionURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"locked","type":"bool"}],"name":"setTransferLocked","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"state","outputs":[{"components":[{"internalType":"uint16","name":"transactionLimit","type":"uint16"},{"internalType":"uint16","name":"purchaseMax","type":"uint16"},{"internalType":"uint16","name":"purchaseRemaining","type":"uint16"},{"internalType":"uint256","name":"purchasePrice","type":"uint256"},{"internalType":"uint16","name":"purchaseLimit","type":"uint16"},{"internalType":"uint256","name":"presalePurchasePrice","type":"uint256"},{"internalType":"uint16","name":"presalePurchaseLimit","type":"uint16"},{"internalType":"uint16","name":"purchaseCount","type":"uint16"},{"internalType":"bool","name":"active","type":"bool"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"presaleInterval","type":"uint256"},{"internalType":"uint256","name":"claimStartTime","type":"uint256"},{"internalType":"uint256","name":"claimEndTime","type":"uint256"},{"internalType":"bool","name":"useDynamicPresalePurchaseLimit","type":"bool"}],"internalType":"struct IERC1155Collection.CollectionState","name":"","type":"tuple"}],"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":"transactionLimit","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"transferLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"recipient","type":"address"},{"internalType":"uint256","name":"bps","type":"uint256"}],"name":"updateRoyalties","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"useDynamicPresalePurchaseLimit","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6002805460ff19166001179055600c805461ffff1916905560c0604052600b60808190526a4d756c7469706c6965727360a81b60a0908152620000469160169190620002b0565b506017805460ff191690553480156200005e57600080fd5b506040516200379238038062003792833981016040819052620000819162000356565b6040805160208101909152600081526200009b33620000f1565b620000a68162000143565b50620000cb604051806080016040528060508152602001620037426050913962000143565b620000ea610bb880666a94d74f4300006000600582828860016200015c565b50620003c4565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516200015890600b906020840190620002b0565b5050565b6000546001600160a01b031615620001bb5760405162461bcd60e51b815260206004820152601360248201527f416c726561647920696e697469616c697a65640000000000000000000000000060448201526064015b60405180910390fd5b8761ffff168961ffff161015620002055760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081a5b9c1d5d609a1b6044820152606401620001b2565b60108054600c8054600d9a909a5563ffffffff60201b1990991664010000000061ffff9b8c160261ffff60301b1916176601000000000000988b16989098029790971763ffff0000191662010000968a16870217909755600e805461ffff191693891693909317909255600f92909255600080546001600160a01b0319166001600160a01b03909316929092179091559490931662ffffff1990911617921515909102919091179055565b828054620002be9062000388565b90600052602060002090601f016020900481019282620002e257600085556200032d565b82601f10620002fd57805160ff19168380011785556200032d565b828001600101855582156200032d579182015b828111156200032d57825182559160200191906001019062000310565b506200033b9291506200033f565b5090565b5b808211156200033b576000815560010162000340565b6000602082840312156200036957600080fd5b81516001600160a01b03811681146200038157600080fd5b9392505050565b600181811c908216806200039d57607f821691505b602082108103620003be57634e487b7160e01b600052602260045260246000fd5b50919050565b61336e80620003d46000396000f3fe6080604052600436106102535760003560e01c806370a082311161014057806370a08231146105b7578063715018a6146105d757806378e97925146105ec57806381960b5c146106025780638da5cb5b14610618578063923c235b14610645578063a05864af14610665578063a22cb4651461067a578063a6a11bb11461069a578063b2e90d6f146106b0578063b9c4d9fb146106ca578063bb3bafd6146106f7578063c19d93fb14610725578063c8a84a8214610747578063d55f2d9d14610769578063d5abeb0114610789578063defd6c5f146107a4578063e3b9398b146107ba578063e985e9c5146107d0578063efbce03014610819578063f19605d61461082c578063f242432a1461084d578063f2fde38b1461086d578063f3fef3a31461088d578063f4743070146108ad578063fe73ad77146108c857600080fd5b8062fdd58e1461025857806301ffc9a71461028b57806302fb0c5e146102bb57806306fdde03146102d55780630e89341c146102f75780630ebd4c7f146103175780630f15f4c01461034457806312686aae1461035b57806316317c211461037c57806318886657146103b157806324d7806c146103d35780632639f460146103f35780632a55205a146104135780632b85ed9c146104525780632d345670146104745780632eb2c2d6146104945780633197cbb6146104b457806331ae450b146104ca57806335e60bd4146104ec57806340d1d2551461050c5780634e1273f41461052257806351b42b001461054257806355461d6d146105575780636c2f5acd146105775780636d73e66914610597575b600080fd5b34801561026457600080fd5b5061027861027336600461269e565b6108dd565b6040519081526020015b60405180910390f35b34801561029757600080fd5b506102ab6102a63660046126e0565b610979565b6040519015158152602001610282565b3480156102c757600080fd5b506002546102ab9060ff1681565b3480156102e157600080fd5b506102ea6109a2565b604051610282919061274a565b34801561030357600080fd5b506102ea61031236600461275d565b610a30565b34801561032357600080fd5b5061033761033236600461275d565b610ac4565b60405161028291906127b1565b34801561035057600080fd5b50610359610b20565b005b34801561036757600080fd5b506013546102ab90600160a01b900460ff1681565b34801561038857600080fd5b5060105461039e90600160281b900461ffff1681565b60405161ffff9091168152602001610282565b3480156103bd57600080fd5b50600c5461039e90600160301b900461ffff1681565b3480156103df57600080fd5b506102ab6103ee3660046127c4565b610b6a565b3480156103ff57600080fd5b5061035961040e3660046127e1565b610b99565b34801561041f57600080fd5b5061043361042e366004612852565b610c2c565b604080516001600160a01b039093168352602083019190915201610282565b34801561045e57600080fd5b5060105461039e906301000000900461ffff1681565b34801561048057600080fd5b5061035961048f3660046127c4565b610c66565b3480156104a057600080fd5b506103596104af3660046129c7565b610ce9565b3480156104c057600080fd5b5061027860045481565b3480156104d657600080fd5b506104df610d80565b6040516102829190612a74565b3480156104f857600080fd5b50610359610507366004612ad1565b610e2e565b34801561051857600080fd5b5061027860075481565b34801561052e57600080fd5b5061033761053d366004612aec565b610e88565b34801561054e57600080fd5b50610359610fb1565b34801561056357600080fd5b506010546102ab9062010000900460ff1681565b34801561058357600080fd5b5061035961059236600461269e565b610ff9565b3480156105a357600080fd5b506103596105b23660046127c4565b61105d565b3480156105c357600080fd5b506102786105d23660046127c4565b6110dc565b3480156105e357600080fd5b506103596110f1565b3480156105f857600080fd5b5061027860035481565b34801561060e57600080fd5b50610278600f5481565b34801561062457600080fd5b5061062d61112a565b6040516001600160a01b039091168152602001610282565b34801561065157600080fd5b506102ab610660366004612bb8565b611139565b34801561067157600080fd5b5061035961115e565b34801561068657600080fd5b50610359610695366004612c08565b6111ad565b3480156106a657600080fd5b5061027860065481565b3480156106bc57600080fd5b506017546102ab9060ff1681565b3480156106d657600080fd5b506106ea6106e536600461275d565b6111b8565b6040516102829190612c76565b34801561070357600080fd5b5061071761071236600461275d565b611231565b604051610282929190612c89565b34801561073157600080fd5b5061073a6112e5565b6040516102829190612cb7565b34801561075357600080fd5b50600c5461039e90600160201b900461ffff1681565b34801561077557600080fd5b50610359610784366004612db0565b61143c565b34801561079557600080fd5b5060105461039e9061ffff1681565b3480156107b057600080fd5b50610278600d5481565b3480156107c657600080fd5b5061027860055481565b3480156107dc57600080fd5b506102ab6107eb366004612ddc565b6001600160a01b039182166000908152600a6020908152604080832093909416825291909152205460ff1690565b610359610827366004612e15565b61148b565b34801561083857600080fd5b50600c5461039e9062010000900461ffff1681565b34801561085957600080fd5b50610359610868366004612e30565b61155b565b34801561087957600080fd5b506103596108883660046127c4565b6115a0565b34801561089957600080fd5b506103596108a836600461269e565b61163d565b3480156108b957600080fd5b50600e5461039e9061ffff1681565b3480156108d457600080fd5b5061039e611687565b60006001600160a01b03831661094e5760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b5060008181526009602090815260408083206001600160a01b03861684529091529020545b92915050565b6000610984826116b5565b80610993575061099382611721565b80610973575061097382611771565b601680546109af90612e98565b80601f01602080910402602001604051908101604052809291908181526020018280546109db90612e98565b8015610a285780601f106109fd57610100808354040283529160200191610a28565b820191906000526020600020905b815481529060010190602001808311610a0b57829003601f168201915b505050505081565b6060600b8054610a3f90612e98565b80601f0160208091040260200160405190810160405280929190818152602001828054610a6b90612e98565b8015610ab85780601f10610a8d57610100808354040283529160200191610ab8565b820191906000526020600020905b815481529060010190602001808311610a9b57829003601f168201915b50505050509050919050565b6013546060906001600160a01b031615610b1b57604080516001808252818301909252906020808301908036833701905050905060125481600081518110610b0e57610b0e612ed2565b6020026020010181815250505b919050565b33610b2961112a565b6001600160a01b03161480610b445750610b44601433611796565b610b605760405162461bcd60e51b815260040161094590612ee8565b610b686117bb565b565b6000816001600160a01b0316610b7e61112a565b6001600160a01b031614806109735750610973601483611796565b33610ba261112a565b6001600160a01b03161480610bbd5750610bbd601433611796565b610bd95760405162461bcd60e51b815260040161094590612ee8565b60175460ff1615610be957600080fd5b610c2882828080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061180e92505050565b5050565b60135460125460009182916001600160a01b039091169061271090610c519086612f42565b610c5b9190612f61565b915091509250929050565b33610c6f61112a565b6001600160a01b031614610c955760405162461bcd60e51b815260040161094590612f83565b610ca0601482611796565b15610ce65760405133906001600160a01b038316907f7c0c3c84c67c85fcac635147348bfe374c24a1a93d0366d1cfe9d8853cbf89d590600090a3610c28601482611821565b50565b6001600160a01b038516331480610d055750610d0585336107eb565b610d6c5760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b6064820152608401610945565b610d798585858585611836565b5050505050565b6060610d8c6014611a24565b6001600160401b03811115610da357610da3612874565b604051908082528060200260200182016040528015610dcc578160200160208202803683370190505b50905060005b610ddc6014611a24565b811015610e2a57610dee601482611a2e565b828281518110610e0057610e00612ed2565b6001600160a01b039092166020928302919091019091015280610e2281612fb8565b915050610dd2565b5090565b33610e3761112a565b6001600160a01b03161480610e525750610e52601433611796565b610e6e5760405162461bcd60e51b815260040161094590612ee8565b6013805460ff60a01b1916600160a01b8315150217905550565b60608151835114610eed5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610945565b600083516001600160401b03811115610f0857610f08612874565b604051908082528060200260200182016040528015610f31578160200160208202803683370190505b50905060005b8451811015610fa957610f7c858281518110610f5557610f55612ed2565b6020026020010151858381518110610f6f57610f6f612ed2565b60200260200101516108dd565b828281518110610f8e57610f8e612ed2565b6020908102919091010152610fa281612fb8565b9050610f37565b509392505050565b33610fba61112a565b6001600160a01b03161480610fd55750610fd5601433611796565b610ff15760405162461bcd60e51b815260040161094590612ee8565b610b68611a3a565b3361100261112a565b6001600160a01b0316148061101d575061101d601433611796565b6110395760405162461bcd60e51b815260040161094590612ee8565b601380546001600160a01b0319166001600160a01b03841617905560128190555050565b3361106661112a565b6001600160a01b03161461108c5760405162461bcd60e51b815260040161094590612f83565b611097601482611796565b610ce65760405133906001600160a01b038316907f7e1a1a08d52e4ba0e21554733d66165fd5151f99460116223d9e3a608eec5cb190600090a3610c28601482611a83565b600c5460009061097390839061ffff166108dd565b336110fa61112a565b6001600160a01b0316146111205760405162461bcd60e51b815260040161094590612f83565b610b686000611a98565b6008546001600160a01b031690565b60008061114583611aea565b60009081526001602052604090205460ff169392505050565b3361116761112a565b6001600160a01b031614806111825750611182601433611796565b61119e5760405162461bcd60e51b815260040161094590612ee8565b6017805460ff19166001179055565b610c28338383611b3b565b6013546060906001600160a01b031615610b1b576040805160018082528183019092529060208083019080368337505060135482519293506001600160a01b03169183915060009061120c5761120c612ed2565b60200260200101906001600160a01b031690816001600160a01b031681525050919050565b60135460609081906001600160a01b0316156112e0576040805160018082528183019092529060208083019080368337505060135482519294506001600160a01b03169184915060009061128757611287612ed2565b6001600160a01b0392909216602092830291909101820152604080516001808252818301909252918281019080368337019050509050601254816000815181106112d3576112d3612ed2565b6020026020010181815250505b915091565b604080516101e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101829052610160810182905261018081018290526101a081018290526101c081018290529033156113715761136c611c1b565b611374565b60005b604080516101e081018252600c5461ffff62010000820481168352600160201b90910416602082015291925081016113aa611687565b61ffff9081168252600d546020830152600c54600160301b900481166040830152600f546060830152600e54811660808301529290921660a083015260025460ff908116151560c084015260035460e084015260045461010084015260055461012084015260065461014084015260075461016084015260105462010000900416151561018090920191909152919050565b6001600160a01b038216331480611458575061145882336107eb565b6114745760405162461bcd60e51b815260040161094590612fd1565b600c54610c2890839061ffff908116908416611c4d565b611493611db8565b61149c81611df5565b601054600c5461ffff9182169116106114b457600080fd5b6114bc611e70565b156114ff5733600090815260116020526040812080548392906114e490849061ffff1661301a565b92506101000a81548161ffff021916908361ffff1602179055505b60005b8161ffff16811015610c2857611519336001611eab565b600c805461ffff1690600061152d83613040565b91906101000a81548161ffff021916908361ffff16021790555050808061155390612fb8565b915050611502565b6001600160a01b038516331480611577575061157785336107eb565b6115935760405162461bcd60e51b815260040161094590612fd1565b610d798585858585611eee565b336115a961112a565b6001600160a01b0316146115cf5760405162461bcd60e51b815260040161094590612f83565b6001600160a01b0381166116345760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610945565b610ce681611a98565b3361164661112a565b6001600160a01b031614806116615750611661601433611796565b61167d5760405162461bcd60e51b815260040161094590612ee8565b610c28828261200c565b601054600c546000916116b09161ffff6301000000909204821691600160201b90910416613061565b905090565b60006001600160e01b0319821663cb2da2c760e01b14806116e657506001600160e01b03198216635d9dd7eb60e11b145b8061170157506001600160e01b0319821663152a902d60e11b145b8061097357506001600160e01b03198216632dde656160e21b1492915050565b60006001600160e01b03198216636cdb3d1360e11b148061175257506001600160e01b031982166303a24d0760e21b145b8061097357506301ffc9a760e01b6001600160e01b0319831614610973565b60006001600160e01b03198216632a9f3abf60e11b14806109735750610973826116b5565b6001600160a01b038116600090815260018301602052604081205415155b9392505050565b60025460ff16156117ff5760405162461bcd60e51b815260206004820152600e60248201526d416c72656164792061637469766560901b6044820152606401610945565b6002805460ff19166001179055565b8051610c2890600b9060208401906125f9565b60006117b4836001600160a01b038416612071565b81518351146118985760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b6064820152608401610945565b6001600160a01b0384166118be5760405162461bcd60e51b815260040161094590613084565b336118cd818787878787612164565b60005b84518110156119b65760008582815181106118ed576118ed612ed2565b60200260200101519050600085838151811061190b5761190b612ed2565b60209081029190910181015160008481526009835260408082206001600160a01b038e16835290935291909120549091508181101561195c5760405162461bcd60e51b8152600401610945906130c9565b60008381526009602090815260408083206001600160a01b038e8116855292528083208585039055908b1682528120805484929061199b908490613113565b92505081905550505050806119af90612fb8565b90506118d0565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611a0692919061312b565b60405180910390a4611a1c81878787878761216d565b505050505050565b6000610973825490565b60006117b483836122c8565b6000600381905560048190556002805460ff19169055600681905560078190556040517fb02389feab3af620e2374d4d559b436ea226b1e6c9c31fe77dfbff3d40cbe9ba9190a1565b60006117b4836001600160a01b0384166122f2565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600080829050602081511115611b325760405162461bcd60e51b815260206004820152600d60248201526c496e76616c6964206e6f6e636560981b6044820152606401610945565b50506020015190565b816001600160a01b0316836001600160a01b031603611bae5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610945565b6001600160a01b038381166000818152600a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b600080611c26611e70565b15611c445750503360009081526011602052604090205461ffff1690565b610973336110dc565b6001600160a01b038316611caf5760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b6064820152608401610945565b33611cde81856000611cc087612341565b611cc987612341565b60405180602001604052806000815250612164565b60008381526009602090815260408083206001600160a01b038816845290915290205482811015611d5d5760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b6064820152608401610945565b60008481526009602090815260408083206001600160a01b0389811680865291845282852088870390558251898152938401889052909290861691600080516020613319833981519152910160405180910390a45050505050565b60025460ff16610b685760405162461bcd60e51b8152602060048201526008602482015267496e61637469766560c01b6044820152606401610945565b600c5461ffff6201000090910481169082161115611e1257600080fd5b600d54611e239061ffff8316612f42565b3414610ce65760405162461bcd60e51b815260206004820152601c60248201527b125b9d985b1a59081c1d5c98da185cd948185b5bdd5b9d081cd95b9d60221b6044820152606401610945565b601354600090600160a01b900460ff161580156116b05750600c54600160301b900461ffff161515806116b0575050600e5461ffff16151590565b80601060038282829054906101000a900461ffff16611eca919061301a565b92506101000a81548161ffff021916908361ffff160217905550610c28828261238c565b6001600160a01b038416611f145760405162461bcd60e51b815260040161094590613084565b33611f33818787611f2488612341565b611f2d88612341565b87612164565b60008481526009602090815260408083206001600160a01b038a16845290915290205483811015611f765760405162461bcd60e51b8152600401610945906130c9565b60008581526009602090815260408083206001600160a01b038b8116855292528083208785039055908816825281208054869290611fb5908490613113565b909155505060408051868152602081018690526001600160a01b03808916928a82169291861691600080516020613319833981519152910160405180910390a46120038288888888886123b3565b50505050505050565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612059576040519150601f19603f3d011682016040523d82523d6000602084013e61205e565b606091505b505090508061206c57600080fd5b505050565b6000818152600183016020526040812054801561215a57600061209560018361313e565b85549091506000906120a99060019061313e565b905081811461210e5760008660000182815481106120c9576120c9612ed2565b90600052602060002001549050808760000184815481106120ec576120ec612ed2565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061211f5761211f613155565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610973565b6000915050610973565b611a1c8561246e565b6001600160a01b0384163b15611a1c5760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906121b1908990899088908890889060040161316b565b6020604051808303816000875af19250505080156121ec575060408051601f3d908101601f191682019092526121e9918101906131c9565b60015b612298576121f86131e6565b806308c379a003612231575061220c613202565b806122175750612233565b8060405162461bcd60e51b8152600401610945919061274a565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610945565b6001600160e01b0319811663bc197c8160e01b146120035760405162461bcd60e51b81526004016109459061328b565b60008260000182815481106122df576122df612ed2565b9060005260206000200154905092915050565b600081815260018301602052604081205461233957508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610973565b506000610973565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061237b5761237b612ed2565b602090810291909101015292915050565b600c54604080516020810190915260008152610c2891849161ffff91821691851690612508565b6001600160a01b0384163b15611a1c5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906123f790899089908890889088906004016132d3565b6020604051808303816000875af1925050508015612432575060408051601f3d908101601f1916820190925261242f918101906131c9565b60015b61243e576121f86131e6565b6001600160e01b0319811663f23a6e6160e01b146120035760405162461bcd60e51b81526004016109459061328b565b601354600160a01b900460ff161580612490575061248a611687565b61ffff16155b806124aa575060025460ff1680156124aa57506004544210155b806124bc57506001600160a01b038116155b610ce65760405162461bcd60e51b815260206004820152601f60248201527f5472616e73666572206c6f636b656420756e74696c2073616c6520656e6473006044820152606401610945565b6001600160a01b0384166125685760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610945565b3361257981600087611f2488612341565b60008481526009602090815260408083206001600160a01b0389168452909152812080548592906125ab908490613113565b909155505060408051858152602081018590526001600160a01b038088169260009291851691600080516020613319833981519152910160405180910390a4610d79816000878787876123b3565b82805461260590612e98565b90600052602060002090601f016020900481019282612627576000855561266d565b82601f1061264057805160ff191683800117855561266d565b8280016001018555821561266d579182015b8281111561266d578251825591602001919060010190612652565b50610e2a9291505b80821115610e2a5760008155600101612675565b6001600160a01b0381168114610ce657600080fd5b600080604083850312156126b157600080fd5b82356126bc81612689565b946020939093013593505050565b6001600160e01b031981168114610ce657600080fd5b6000602082840312156126f257600080fd5b81356117b4816126ca565b6000815180845260005b8181101561272357602081850181015186830182015201612707565b81811115612735576000602083870101525b50601f01601f19169290920160200192915050565b6020815260006117b460208301846126fd565b60006020828403121561276f57600080fd5b5035919050565b600081518084526020808501945080840160005b838110156127a65781518752958201959082019060010161278a565b509495945050505050565b6020815260006117b46020830184612776565b6000602082840312156127d657600080fd5b81356117b481612689565b600080602083850312156127f457600080fd5b82356001600160401b038082111561280b57600080fd5b818501915085601f83011261281f57600080fd5b81358181111561282e57600080fd5b86602082850101111561284057600080fd5b60209290920196919550909350505050565b6000806040838503121561286557600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b03811182821017156128af576128af612874565b6040525050565b60006001600160401b038211156128cf576128cf612874565b5060051b60200190565b600082601f8301126128ea57600080fd5b813560206128f7826128b6565b604051612904828261288a565b83815260059390931b850182019282810191508684111561292457600080fd5b8286015b8481101561293f5780358352918301918301612928565b509695505050505050565b60006001600160401b0383111561296357612963612874565b60405161297a601f8501601f19166020018261288a565b80915083815284848401111561298f57600080fd5b83836020830137600060208583010152509392505050565b600082601f8301126129b857600080fd5b6117b48383356020850161294a565b600080600080600060a086880312156129df57600080fd5b85356129ea81612689565b945060208601356129fa81612689565b935060408601356001600160401b0380821115612a1657600080fd5b612a2289838a016128d9565b94506060880135915080821115612a3857600080fd5b612a4489838a016128d9565b93506080880135915080821115612a5a57600080fd5b50612a67888289016129a7565b9150509295509295909350565b6020808252825182820181905260009190848201906040850190845b81811015612ab55783516001600160a01b031683529284019291840191600101612a90565b50909695505050505050565b80358015158114610b1b57600080fd5b600060208284031215612ae357600080fd5b6117b482612ac1565b60008060408385031215612aff57600080fd5b82356001600160401b0380821115612b1657600080fd5b818501915085601f830112612b2a57600080fd5b81356020612b37826128b6565b604051612b44828261288a565b83815260059390931b8501820192828101915089841115612b6457600080fd5b948201945b83861015612b8b578535612b7c81612689565b82529482019490820190612b69565b96505086013592505080821115612ba157600080fd5b50612bae858286016128d9565b9150509250929050565b600060208284031215612bca57600080fd5b81356001600160401b03811115612be057600080fd5b8201601f81018413612bf157600080fd5b612c008482356020840161294a565b949350505050565b60008060408385031215612c1b57600080fd5b8235612c2681612689565b9150612c3460208401612ac1565b90509250929050565b600081518084526020808501945080840160005b838110156127a65781516001600160a01b031687529582019590820190600101612c51565b6020815260006117b46020830184612c3d565b604081526000612c9c6040830185612c3d565b8281036020840152612cae8185612776565b95945050505050565b815161ffff1681526101e081016020830151612cd9602084018261ffff169052565b506040830151612cef604084018261ffff169052565b50606083015160608301526080830151612d0f608084018261ffff169052565b5060a083015160a083015260c0830151612d2f60c084018261ffff169052565b5060e0830151612d4560e084018261ffff169052565b506101008381015115159083015261012080840151908301526101408084015190830152610160808401519083015261018080840151908301526101a080840151908301526101c0928301511515929091019190915290565b803561ffff81168114610b1b57600080fd5b60008060408385031215612dc357600080fd5b8235612dce81612689565b9150612c3460208401612d9e565b60008060408385031215612def57600080fd5b8235612dfa81612689565b91506020830135612e0a81612689565b809150509250929050565b600060208284031215612e2757600080fd5b6117b482612d9e565b600080600080600060a08688031215612e4857600080fd5b8535612e5381612689565b94506020860135612e6381612689565b9350604086013592506060860135915060808601356001600160401b03811115612e8c57600080fd5b612a67888289016129a7565b600181811c90821680612eac57607f821691505b602082108103612ecc57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b60208082526024908201527f41646d696e436f6e74726f6c3a204d757374206265206f776e6572206f7220616040820152633236b4b760e11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615612f5c57612f5c612f2c565b500290565b600082612f7e57634e487b7160e01b600052601260045260246000fd5b500490565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060018201612fca57612fca612f2c565b5060010190565b60208082526029908201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260408201526808185c1c1c9bdd995960ba1b606082015260800190565b600061ffff80831681851680830382111561303757613037612f2c565b01949350505050565b600061ffff80831681810361305757613057612f2c565b6001019392505050565b600061ffff8381169083168181101561307c5761307c612f2c565b039392505050565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6000821982111561312657613126612f2c565b500190565b604081526000612c9c6040830185612776565b60008282101561315057613150612f2c565b500390565b634e487b7160e01b600052603160045260246000fd5b6001600160a01b0386811682528516602082015260a06040820181905260009061319790830186612776565b82810360608401526131a98186612776565b905082810360808401526131bd81856126fd565b98975050505050505050565b6000602082840312156131db57600080fd5b81516117b4816126ca565b600060033d11156131ff5760046000803e5060005160e01c5b90565b600060443d10156132105790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561323f57505050505090565b82850191508151818111156132575750505050505090565b843d87010160208285010111156132715750505050505090565b6132806020828601018761288a565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061330d908301846126fd565b97965050505050505056fec3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62a26469706673582212200715a4a50a7cc1f38f58f7137e5a54a2145418cef62603dc55591c8ada4ffaeb64736f6c634300080d003368747470733a2f2f676174657761792e70696e6174612e636c6f75642f697066732f516d634d3659577969365755764a5137554b47727457645969516d5363666b456f4a467545516f7a765644654151000000000000000000000000d7e4f60b01bd776308955568cef9d0342b747875
Deployed Bytecode
0x6080604052600436106102535760003560e01c806370a082311161014057806370a08231146105b7578063715018a6146105d757806378e97925146105ec57806381960b5c146106025780638da5cb5b14610618578063923c235b14610645578063a05864af14610665578063a22cb4651461067a578063a6a11bb11461069a578063b2e90d6f146106b0578063b9c4d9fb146106ca578063bb3bafd6146106f7578063c19d93fb14610725578063c8a84a8214610747578063d55f2d9d14610769578063d5abeb0114610789578063defd6c5f146107a4578063e3b9398b146107ba578063e985e9c5146107d0578063efbce03014610819578063f19605d61461082c578063f242432a1461084d578063f2fde38b1461086d578063f3fef3a31461088d578063f4743070146108ad578063fe73ad77146108c857600080fd5b8062fdd58e1461025857806301ffc9a71461028b57806302fb0c5e146102bb57806306fdde03146102d55780630e89341c146102f75780630ebd4c7f146103175780630f15f4c01461034457806312686aae1461035b57806316317c211461037c57806318886657146103b157806324d7806c146103d35780632639f460146103f35780632a55205a146104135780632b85ed9c146104525780632d345670146104745780632eb2c2d6146104945780633197cbb6146104b457806331ae450b146104ca57806335e60bd4146104ec57806340d1d2551461050c5780634e1273f41461052257806351b42b001461054257806355461d6d146105575780636c2f5acd146105775780636d73e66914610597575b600080fd5b34801561026457600080fd5b5061027861027336600461269e565b6108dd565b6040519081526020015b60405180910390f35b34801561029757600080fd5b506102ab6102a63660046126e0565b610979565b6040519015158152602001610282565b3480156102c757600080fd5b506002546102ab9060ff1681565b3480156102e157600080fd5b506102ea6109a2565b604051610282919061274a565b34801561030357600080fd5b506102ea61031236600461275d565b610a30565b34801561032357600080fd5b5061033761033236600461275d565b610ac4565b60405161028291906127b1565b34801561035057600080fd5b50610359610b20565b005b34801561036757600080fd5b506013546102ab90600160a01b900460ff1681565b34801561038857600080fd5b5060105461039e90600160281b900461ffff1681565b60405161ffff9091168152602001610282565b3480156103bd57600080fd5b50600c5461039e90600160301b900461ffff1681565b3480156103df57600080fd5b506102ab6103ee3660046127c4565b610b6a565b3480156103ff57600080fd5b5061035961040e3660046127e1565b610b99565b34801561041f57600080fd5b5061043361042e366004612852565b610c2c565b604080516001600160a01b039093168352602083019190915201610282565b34801561045e57600080fd5b5060105461039e906301000000900461ffff1681565b34801561048057600080fd5b5061035961048f3660046127c4565b610c66565b3480156104a057600080fd5b506103596104af3660046129c7565b610ce9565b3480156104c057600080fd5b5061027860045481565b3480156104d657600080fd5b506104df610d80565b6040516102829190612a74565b3480156104f857600080fd5b50610359610507366004612ad1565b610e2e565b34801561051857600080fd5b5061027860075481565b34801561052e57600080fd5b5061033761053d366004612aec565b610e88565b34801561054e57600080fd5b50610359610fb1565b34801561056357600080fd5b506010546102ab9062010000900460ff1681565b34801561058357600080fd5b5061035961059236600461269e565b610ff9565b3480156105a357600080fd5b506103596105b23660046127c4565b61105d565b3480156105c357600080fd5b506102786105d23660046127c4565b6110dc565b3480156105e357600080fd5b506103596110f1565b3480156105f857600080fd5b5061027860035481565b34801561060e57600080fd5b50610278600f5481565b34801561062457600080fd5b5061062d61112a565b6040516001600160a01b039091168152602001610282565b34801561065157600080fd5b506102ab610660366004612bb8565b611139565b34801561067157600080fd5b5061035961115e565b34801561068657600080fd5b50610359610695366004612c08565b6111ad565b3480156106a657600080fd5b5061027860065481565b3480156106bc57600080fd5b506017546102ab9060ff1681565b3480156106d657600080fd5b506106ea6106e536600461275d565b6111b8565b6040516102829190612c76565b34801561070357600080fd5b5061071761071236600461275d565b611231565b604051610282929190612c89565b34801561073157600080fd5b5061073a6112e5565b6040516102829190612cb7565b34801561075357600080fd5b50600c5461039e90600160201b900461ffff1681565b34801561077557600080fd5b50610359610784366004612db0565b61143c565b34801561079557600080fd5b5060105461039e9061ffff1681565b3480156107b057600080fd5b50610278600d5481565b3480156107c657600080fd5b5061027860055481565b3480156107dc57600080fd5b506102ab6107eb366004612ddc565b6001600160a01b039182166000908152600a6020908152604080832093909416825291909152205460ff1690565b610359610827366004612e15565b61148b565b34801561083857600080fd5b50600c5461039e9062010000900461ffff1681565b34801561085957600080fd5b50610359610868366004612e30565b61155b565b34801561087957600080fd5b506103596108883660046127c4565b6115a0565b34801561089957600080fd5b506103596108a836600461269e565b61163d565b3480156108b957600080fd5b50600e5461039e9061ffff1681565b3480156108d457600080fd5b5061039e611687565b60006001600160a01b03831661094e5760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b5060008181526009602090815260408083206001600160a01b03861684529091529020545b92915050565b6000610984826116b5565b80610993575061099382611721565b80610973575061097382611771565b601680546109af90612e98565b80601f01602080910402602001604051908101604052809291908181526020018280546109db90612e98565b8015610a285780601f106109fd57610100808354040283529160200191610a28565b820191906000526020600020905b815481529060010190602001808311610a0b57829003601f168201915b505050505081565b6060600b8054610a3f90612e98565b80601f0160208091040260200160405190810160405280929190818152602001828054610a6b90612e98565b8015610ab85780601f10610a8d57610100808354040283529160200191610ab8565b820191906000526020600020905b815481529060010190602001808311610a9b57829003601f168201915b50505050509050919050565b6013546060906001600160a01b031615610b1b57604080516001808252818301909252906020808301908036833701905050905060125481600081518110610b0e57610b0e612ed2565b6020026020010181815250505b919050565b33610b2961112a565b6001600160a01b03161480610b445750610b44601433611796565b610b605760405162461bcd60e51b815260040161094590612ee8565b610b686117bb565b565b6000816001600160a01b0316610b7e61112a565b6001600160a01b031614806109735750610973601483611796565b33610ba261112a565b6001600160a01b03161480610bbd5750610bbd601433611796565b610bd95760405162461bcd60e51b815260040161094590612ee8565b60175460ff1615610be957600080fd5b610c2882828080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061180e92505050565b5050565b60135460125460009182916001600160a01b039091169061271090610c519086612f42565b610c5b9190612f61565b915091509250929050565b33610c6f61112a565b6001600160a01b031614610c955760405162461bcd60e51b815260040161094590612f83565b610ca0601482611796565b15610ce65760405133906001600160a01b038316907f7c0c3c84c67c85fcac635147348bfe374c24a1a93d0366d1cfe9d8853cbf89d590600090a3610c28601482611821565b50565b6001600160a01b038516331480610d055750610d0585336107eb565b610d6c5760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b6064820152608401610945565b610d798585858585611836565b5050505050565b6060610d8c6014611a24565b6001600160401b03811115610da357610da3612874565b604051908082528060200260200182016040528015610dcc578160200160208202803683370190505b50905060005b610ddc6014611a24565b811015610e2a57610dee601482611a2e565b828281518110610e0057610e00612ed2565b6001600160a01b039092166020928302919091019091015280610e2281612fb8565b915050610dd2565b5090565b33610e3761112a565b6001600160a01b03161480610e525750610e52601433611796565b610e6e5760405162461bcd60e51b815260040161094590612ee8565b6013805460ff60a01b1916600160a01b8315150217905550565b60608151835114610eed5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610945565b600083516001600160401b03811115610f0857610f08612874565b604051908082528060200260200182016040528015610f31578160200160208202803683370190505b50905060005b8451811015610fa957610f7c858281518110610f5557610f55612ed2565b6020026020010151858381518110610f6f57610f6f612ed2565b60200260200101516108dd565b828281518110610f8e57610f8e612ed2565b6020908102919091010152610fa281612fb8565b9050610f37565b509392505050565b33610fba61112a565b6001600160a01b03161480610fd55750610fd5601433611796565b610ff15760405162461bcd60e51b815260040161094590612ee8565b610b68611a3a565b3361100261112a565b6001600160a01b0316148061101d575061101d601433611796565b6110395760405162461bcd60e51b815260040161094590612ee8565b601380546001600160a01b0319166001600160a01b03841617905560128190555050565b3361106661112a565b6001600160a01b03161461108c5760405162461bcd60e51b815260040161094590612f83565b611097601482611796565b610ce65760405133906001600160a01b038316907f7e1a1a08d52e4ba0e21554733d66165fd5151f99460116223d9e3a608eec5cb190600090a3610c28601482611a83565b600c5460009061097390839061ffff166108dd565b336110fa61112a565b6001600160a01b0316146111205760405162461bcd60e51b815260040161094590612f83565b610b686000611a98565b6008546001600160a01b031690565b60008061114583611aea565b60009081526001602052604090205460ff169392505050565b3361116761112a565b6001600160a01b031614806111825750611182601433611796565b61119e5760405162461bcd60e51b815260040161094590612ee8565b6017805460ff19166001179055565b610c28338383611b3b565b6013546060906001600160a01b031615610b1b576040805160018082528183019092529060208083019080368337505060135482519293506001600160a01b03169183915060009061120c5761120c612ed2565b60200260200101906001600160a01b031690816001600160a01b031681525050919050565b60135460609081906001600160a01b0316156112e0576040805160018082528183019092529060208083019080368337505060135482519294506001600160a01b03169184915060009061128757611287612ed2565b6001600160a01b0392909216602092830291909101820152604080516001808252818301909252918281019080368337019050509050601254816000815181106112d3576112d3612ed2565b6020026020010181815250505b915091565b604080516101e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101829052610160810182905261018081018290526101a081018290526101c081018290529033156113715761136c611c1b565b611374565b60005b604080516101e081018252600c5461ffff62010000820481168352600160201b90910416602082015291925081016113aa611687565b61ffff9081168252600d546020830152600c54600160301b900481166040830152600f546060830152600e54811660808301529290921660a083015260025460ff908116151560c084015260035460e084015260045461010084015260055461012084015260065461014084015260075461016084015260105462010000900416151561018090920191909152919050565b6001600160a01b038216331480611458575061145882336107eb565b6114745760405162461bcd60e51b815260040161094590612fd1565b600c54610c2890839061ffff908116908416611c4d565b611493611db8565b61149c81611df5565b601054600c5461ffff9182169116106114b457600080fd5b6114bc611e70565b156114ff5733600090815260116020526040812080548392906114e490849061ffff1661301a565b92506101000a81548161ffff021916908361ffff1602179055505b60005b8161ffff16811015610c2857611519336001611eab565b600c805461ffff1690600061152d83613040565b91906101000a81548161ffff021916908361ffff16021790555050808061155390612fb8565b915050611502565b6001600160a01b038516331480611577575061157785336107eb565b6115935760405162461bcd60e51b815260040161094590612fd1565b610d798585858585611eee565b336115a961112a565b6001600160a01b0316146115cf5760405162461bcd60e51b815260040161094590612f83565b6001600160a01b0381166116345760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610945565b610ce681611a98565b3361164661112a565b6001600160a01b031614806116615750611661601433611796565b61167d5760405162461bcd60e51b815260040161094590612ee8565b610c28828261200c565b601054600c546000916116b09161ffff6301000000909204821691600160201b90910416613061565b905090565b60006001600160e01b0319821663cb2da2c760e01b14806116e657506001600160e01b03198216635d9dd7eb60e11b145b8061170157506001600160e01b0319821663152a902d60e11b145b8061097357506001600160e01b03198216632dde656160e21b1492915050565b60006001600160e01b03198216636cdb3d1360e11b148061175257506001600160e01b031982166303a24d0760e21b145b8061097357506301ffc9a760e01b6001600160e01b0319831614610973565b60006001600160e01b03198216632a9f3abf60e11b14806109735750610973826116b5565b6001600160a01b038116600090815260018301602052604081205415155b9392505050565b60025460ff16156117ff5760405162461bcd60e51b815260206004820152600e60248201526d416c72656164792061637469766560901b6044820152606401610945565b6002805460ff19166001179055565b8051610c2890600b9060208401906125f9565b60006117b4836001600160a01b038416612071565b81518351146118985760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b6064820152608401610945565b6001600160a01b0384166118be5760405162461bcd60e51b815260040161094590613084565b336118cd818787878787612164565b60005b84518110156119b65760008582815181106118ed576118ed612ed2565b60200260200101519050600085838151811061190b5761190b612ed2565b60209081029190910181015160008481526009835260408082206001600160a01b038e16835290935291909120549091508181101561195c5760405162461bcd60e51b8152600401610945906130c9565b60008381526009602090815260408083206001600160a01b038e8116855292528083208585039055908b1682528120805484929061199b908490613113565b92505081905550505050806119af90612fb8565b90506118d0565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611a0692919061312b565b60405180910390a4611a1c81878787878761216d565b505050505050565b6000610973825490565b60006117b483836122c8565b6000600381905560048190556002805460ff19169055600681905560078190556040517fb02389feab3af620e2374d4d559b436ea226b1e6c9c31fe77dfbff3d40cbe9ba9190a1565b60006117b4836001600160a01b0384166122f2565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600080829050602081511115611b325760405162461bcd60e51b815260206004820152600d60248201526c496e76616c6964206e6f6e636560981b6044820152606401610945565b50506020015190565b816001600160a01b0316836001600160a01b031603611bae5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610945565b6001600160a01b038381166000818152600a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b600080611c26611e70565b15611c445750503360009081526011602052604090205461ffff1690565b610973336110dc565b6001600160a01b038316611caf5760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b6064820152608401610945565b33611cde81856000611cc087612341565b611cc987612341565b60405180602001604052806000815250612164565b60008381526009602090815260408083206001600160a01b038816845290915290205482811015611d5d5760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b6064820152608401610945565b60008481526009602090815260408083206001600160a01b0389811680865291845282852088870390558251898152938401889052909290861691600080516020613319833981519152910160405180910390a45050505050565b60025460ff16610b685760405162461bcd60e51b8152602060048201526008602482015267496e61637469766560c01b6044820152606401610945565b600c5461ffff6201000090910481169082161115611e1257600080fd5b600d54611e239061ffff8316612f42565b3414610ce65760405162461bcd60e51b815260206004820152601c60248201527b125b9d985b1a59081c1d5c98da185cd948185b5bdd5b9d081cd95b9d60221b6044820152606401610945565b601354600090600160a01b900460ff161580156116b05750600c54600160301b900461ffff161515806116b0575050600e5461ffff16151590565b80601060038282829054906101000a900461ffff16611eca919061301a565b92506101000a81548161ffff021916908361ffff160217905550610c28828261238c565b6001600160a01b038416611f145760405162461bcd60e51b815260040161094590613084565b33611f33818787611f2488612341565b611f2d88612341565b87612164565b60008481526009602090815260408083206001600160a01b038a16845290915290205483811015611f765760405162461bcd60e51b8152600401610945906130c9565b60008581526009602090815260408083206001600160a01b038b8116855292528083208785039055908816825281208054869290611fb5908490613113565b909155505060408051868152602081018690526001600160a01b03808916928a82169291861691600080516020613319833981519152910160405180910390a46120038288888888886123b3565b50505050505050565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612059576040519150601f19603f3d011682016040523d82523d6000602084013e61205e565b606091505b505090508061206c57600080fd5b505050565b6000818152600183016020526040812054801561215a57600061209560018361313e565b85549091506000906120a99060019061313e565b905081811461210e5760008660000182815481106120c9576120c9612ed2565b90600052602060002001549050808760000184815481106120ec576120ec612ed2565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061211f5761211f613155565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610973565b6000915050610973565b611a1c8561246e565b6001600160a01b0384163b15611a1c5760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906121b1908990899088908890889060040161316b565b6020604051808303816000875af19250505080156121ec575060408051601f3d908101601f191682019092526121e9918101906131c9565b60015b612298576121f86131e6565b806308c379a003612231575061220c613202565b806122175750612233565b8060405162461bcd60e51b8152600401610945919061274a565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610945565b6001600160e01b0319811663bc197c8160e01b146120035760405162461bcd60e51b81526004016109459061328b565b60008260000182815481106122df576122df612ed2565b9060005260206000200154905092915050565b600081815260018301602052604081205461233957508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610973565b506000610973565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061237b5761237b612ed2565b602090810291909101015292915050565b600c54604080516020810190915260008152610c2891849161ffff91821691851690612508565b6001600160a01b0384163b15611a1c5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906123f790899089908890889088906004016132d3565b6020604051808303816000875af1925050508015612432575060408051601f3d908101601f1916820190925261242f918101906131c9565b60015b61243e576121f86131e6565b6001600160e01b0319811663f23a6e6160e01b146120035760405162461bcd60e51b81526004016109459061328b565b601354600160a01b900460ff161580612490575061248a611687565b61ffff16155b806124aa575060025460ff1680156124aa57506004544210155b806124bc57506001600160a01b038116155b610ce65760405162461bcd60e51b815260206004820152601f60248201527f5472616e73666572206c6f636b656420756e74696c2073616c6520656e6473006044820152606401610945565b6001600160a01b0384166125685760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610945565b3361257981600087611f2488612341565b60008481526009602090815260408083206001600160a01b0389168452909152812080548592906125ab908490613113565b909155505060408051858152602081018590526001600160a01b038088169260009291851691600080516020613319833981519152910160405180910390a4610d79816000878787876123b3565b82805461260590612e98565b90600052602060002090601f016020900481019282612627576000855561266d565b82601f1061264057805160ff191683800117855561266d565b8280016001018555821561266d579182015b8281111561266d578251825591602001919060010190612652565b50610e2a9291505b80821115610e2a5760008155600101612675565b6001600160a01b0381168114610ce657600080fd5b600080604083850312156126b157600080fd5b82356126bc81612689565b946020939093013593505050565b6001600160e01b031981168114610ce657600080fd5b6000602082840312156126f257600080fd5b81356117b4816126ca565b6000815180845260005b8181101561272357602081850181015186830182015201612707565b81811115612735576000602083870101525b50601f01601f19169290920160200192915050565b6020815260006117b460208301846126fd565b60006020828403121561276f57600080fd5b5035919050565b600081518084526020808501945080840160005b838110156127a65781518752958201959082019060010161278a565b509495945050505050565b6020815260006117b46020830184612776565b6000602082840312156127d657600080fd5b81356117b481612689565b600080602083850312156127f457600080fd5b82356001600160401b038082111561280b57600080fd5b818501915085601f83011261281f57600080fd5b81358181111561282e57600080fd5b86602082850101111561284057600080fd5b60209290920196919550909350505050565b6000806040838503121561286557600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b03811182821017156128af576128af612874565b6040525050565b60006001600160401b038211156128cf576128cf612874565b5060051b60200190565b600082601f8301126128ea57600080fd5b813560206128f7826128b6565b604051612904828261288a565b83815260059390931b850182019282810191508684111561292457600080fd5b8286015b8481101561293f5780358352918301918301612928565b509695505050505050565b60006001600160401b0383111561296357612963612874565b60405161297a601f8501601f19166020018261288a565b80915083815284848401111561298f57600080fd5b83836020830137600060208583010152509392505050565b600082601f8301126129b857600080fd5b6117b48383356020850161294a565b600080600080600060a086880312156129df57600080fd5b85356129ea81612689565b945060208601356129fa81612689565b935060408601356001600160401b0380821115612a1657600080fd5b612a2289838a016128d9565b94506060880135915080821115612a3857600080fd5b612a4489838a016128d9565b93506080880135915080821115612a5a57600080fd5b50612a67888289016129a7565b9150509295509295909350565b6020808252825182820181905260009190848201906040850190845b81811015612ab55783516001600160a01b031683529284019291840191600101612a90565b50909695505050505050565b80358015158114610b1b57600080fd5b600060208284031215612ae357600080fd5b6117b482612ac1565b60008060408385031215612aff57600080fd5b82356001600160401b0380821115612b1657600080fd5b818501915085601f830112612b2a57600080fd5b81356020612b37826128b6565b604051612b44828261288a565b83815260059390931b8501820192828101915089841115612b6457600080fd5b948201945b83861015612b8b578535612b7c81612689565b82529482019490820190612b69565b96505086013592505080821115612ba157600080fd5b50612bae858286016128d9565b9150509250929050565b600060208284031215612bca57600080fd5b81356001600160401b03811115612be057600080fd5b8201601f81018413612bf157600080fd5b612c008482356020840161294a565b949350505050565b60008060408385031215612c1b57600080fd5b8235612c2681612689565b9150612c3460208401612ac1565b90509250929050565b600081518084526020808501945080840160005b838110156127a65781516001600160a01b031687529582019590820190600101612c51565b6020815260006117b46020830184612c3d565b604081526000612c9c6040830185612c3d565b8281036020840152612cae8185612776565b95945050505050565b815161ffff1681526101e081016020830151612cd9602084018261ffff169052565b506040830151612cef604084018261ffff169052565b50606083015160608301526080830151612d0f608084018261ffff169052565b5060a083015160a083015260c0830151612d2f60c084018261ffff169052565b5060e0830151612d4560e084018261ffff169052565b506101008381015115159083015261012080840151908301526101408084015190830152610160808401519083015261018080840151908301526101a080840151908301526101c0928301511515929091019190915290565b803561ffff81168114610b1b57600080fd5b60008060408385031215612dc357600080fd5b8235612dce81612689565b9150612c3460208401612d9e565b60008060408385031215612def57600080fd5b8235612dfa81612689565b91506020830135612e0a81612689565b809150509250929050565b600060208284031215612e2757600080fd5b6117b482612d9e565b600080600080600060a08688031215612e4857600080fd5b8535612e5381612689565b94506020860135612e6381612689565b9350604086013592506060860135915060808601356001600160401b03811115612e8c57600080fd5b612a67888289016129a7565b600181811c90821680612eac57607f821691505b602082108103612ecc57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b60208082526024908201527f41646d696e436f6e74726f6c3a204d757374206265206f776e6572206f7220616040820152633236b4b760e11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615612f5c57612f5c612f2c565b500290565b600082612f7e57634e487b7160e01b600052601260045260246000fd5b500490565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060018201612fca57612fca612f2c565b5060010190565b60208082526029908201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260408201526808185c1c1c9bdd995960ba1b606082015260800190565b600061ffff80831681851680830382111561303757613037612f2c565b01949350505050565b600061ffff80831681810361305757613057612f2c565b6001019392505050565b600061ffff8381169083168181101561307c5761307c612f2c565b039392505050565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6000821982111561312657613126612f2c565b500190565b604081526000612c9c6040830185612776565b60008282101561315057613150612f2c565b500390565b634e487b7160e01b600052603160045260246000fd5b6001600160a01b0386811682528516602082015260a06040820181905260009061319790830186612776565b82810360608401526131a98186612776565b905082810360808401526131bd81856126fd565b98975050505050505050565b6000602082840312156131db57600080fd5b81516117b4816126ca565b600060033d11156131ff5760046000803e5060005160e01c5b90565b600060443d10156132105790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561323f57505050505090565b82850191508151818111156132575750505050505090565b843d87010160208285010111156132715750505050505090565b6132806020828601018761288a565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061330d908301846126fd565b97965050505050505056fec3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62a26469706673582212200715a4a50a7cc1f38f58f7137e5a54a2145418cef62603dc55591c8ada4ffaeb64736f6c634300080d0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000d7e4f60b01bd776308955568cef9d0342b747875
-----Decoded View---------------
Arg [0] : signingAddress_ (address): 0xD7e4f60B01Bd776308955568CEF9D0342B747875
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000d7e4f60b01bd776308955568cef9d0342b747875
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.