Feature Tip: Add private address tag to any address under My Name Tag !
ERC-1155
Overview
Max Total Supply
175
Holders
21
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:
Oz
Compiler Version
v0.8.11+commit.d7f03943
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 Oz is ERC1155, ERC1155CollectionBase { uint TOKEN_ID_TO_ASSIGN = 0; constructor(address signingAddress_) ERC1155('') { _initialize( // total supply 175, // total supply available to purchase 175, // 0.01 eth public sale price 0, // purchase limit (0 for no limit) 0, // transaction limit (0 for no limit) 0, // 0.01 eth presale price 0, // 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) 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-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 { _setURI(uri); } /** * @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 , address, uint256[] memory, uint256[] memory, bytes memory) internal virtual override { _validateTokenTransferability(); } /** * @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 Purchase - mint with validation. * @param amount The number of tokens to mint. */ function purchase(uint16 amount) 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 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); }
// 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 "@manifoldxyz/libraries-solidity/contracts/access/AdminControl.sol"; import "./IERC1155Collection.sol"; import "./CollectionBase.sol"; /** * ERC1155 Collection Drop Contract (Base) */ abstract contract ERC1155CollectionBase is CollectionBase, IERC1155Collection, AdminControl { // 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, AdminControl) 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 adminRequired { _validatePurchaseRestrictions(); _validatePrice(amount); // 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(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() internal view { require(!transferLocked, "Transfer locked"); } /** * 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; 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"); // require(block.timestamp >= startTime, "Purchasing not active"); } /** * @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); } function _safeTransferFrom( address to, uint256 id, uint256 amount ) public virtual { require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); uint256 fromBalance = _balances[id][msg.sender]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][msg.sender] = fromBalance - amount; } _balances[id][to] += amount; emit TransferSingle(operator, msg.sender, to, id, amount); } /** * @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":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"_safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"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":[],"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":"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":"maxSupply","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"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":"nonpayable","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":[],"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
6080604052600e805461ffff1916905560006016553480156200002157600080fd5b5060405162003170380380620031708339810160408190526200004491620002ec565b6040805160208101909152600081526200005e3362000087565b6200006981620000d9565b506200008060af80600080808080886001620000f2565b506200035b565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8051620000ee90600b90602084019062000246565b5050565b6000546001600160a01b031615620001515760405162461bcd60e51b815260206004820152601360248201527f416c726561647920696e697469616c697a65640000000000000000000000000060448201526064015b60405180910390fd5b8761ffff168961ffff1610156200019b5760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081a5b9c1d5d609a1b604482015260640162000148565b60128054600e8054600f9a909a5563ffffffff60201b1990991664010000000061ffff9b8c160261ffff60301b1916176601000000000000988b16989098029790971763ffff0000191662010000968a168702179097556010805461ffff191693891693909317909255601192909255600080546001600160a01b0319166001600160a01b03909316929092179091559490931662ffffff1990911617921515909102919091179055565b82805462000254906200031e565b90600052602060002090601f016020900481019282620002785760008555620002c3565b82601f106200029357805160ff1916838001178555620002c3565b82800160010185558215620002c3579182015b82811115620002c3578251825591602001919060010190620002a6565b50620002d1929150620002d5565b5090565b5b80821115620002d15760008155600101620002d6565b600060208284031215620002ff57600080fd5b81516001600160a01b03811681146200031757600080fd5b9392505050565b600181811c908216806200033357607f821691505b602082108114156200035557634e487b7160e01b600052602260045260246000fd5b50919050565b612e05806200036b6000396000f3fe608060405234801561001057600080fd5b50600436106102345760003560e01c806370a082311161013757806370a0823114610438578063715018a61461044b57806378e979251461045357806381960b5c1461045c5780638da5cb5b14610465578063923c235b14610485578063a22cb46514610498578063a6a11bb1146104ab578063b9c4d9fb146104b4578063bb3bafd6146104d4578063c19d93fb146104f5578063c8a84a821461050a578063d053b3e21461051f578063d5abeb0114610532578063defd6c5f14610540578063e3b9398b14610549578063e985e9c514610552578063efbce0301461058e578063f19605d6146105a1578063f242432a146105b5578063f2fde38b146105c8578063f3fef3a3146105db578063f4743070146105ee578063fe73ad77146105fc57600080fd5b8062fdd58e1461023957806301ffc9a71461025f57806302fb0c5e146102825780630e89341c1461028f5780630ebd4c7f146102af5780630f15f4c0146102cf57806312686aae146102d957806316317c21146102ed578063188866571461031557806324d7806c1461032a5780632639f4601461033d5780632a55205a146103505780632b85ed9c146103825780632d345670146103975780632eb2c2d6146103aa5780633197cbb6146103bd57806331ae450b146103c657806340d1d255146103db5780634e1273f4146103e457806351b42b00146103f757806355461d6d146103ff5780636c2f5acd146104125780636d73e66914610425575b600080fd5b61024c6102473660046121a7565b610604565b6040519081526020015b60405180910390f35b61027261026d3660046121e9565b6106a0565b6040519015158152602001610256565b6002546102729060ff1681565b6102a261029d366004612206565b6106c9565b604051610256919061226c565b6102c26102bd366004612206565b61075d565b60405161025691906122ba565b6102d76107b9565b005b60155461027290600160a01b900460ff1681565b60125461030290600160281b900461ffff1681565b60405161ffff9091168152602001610256565b600e5461030290600160301b900461ffff1681565b6102726103383660046122cd565b610803565b6102d761034b3660046122ea565b610832565b61036361035e36600461235b565b6108b5565b604080516001600160a01b039093168352602083019190915201610256565b601254610302906301000000900461ffff1681565b6102d76103a53660046122cd565b6108ef565b6102d76103b83660046124d0565b610972565b61024c60045481565b6103ce610a09565b604051610256919061257d565b61024c60075481565b6102c26103f23660046125ca565b610ab7565b6102d7610be0565b6012546102729062010000900460ff1681565b6102d76104203660046121a7565b610c28565b6102d76104333660046122cd565b610c8c565b61024c6104463660046122cd565b610d0b565b6102d7610d20565b61024c60035481565b61024c60115481565b61046d610d59565b6040516001600160a01b039091168152602001610256565b610272610493366004612696565b610d68565b6102d76104a63660046126e6565b610d8d565b61024c60065481565b6104c76104c2366004612206565b610d98565b604051610256919061275d565b6104e76104e2366004612206565b610e11565b604051610256929190612770565b6104fd610ec5565b604051610256919061279e565b600e5461030290600160201b900461ffff1681565b6102d761052d366004612885565b61101c565b6012546103029061ffff1681565b61024c600f5481565b61024c60055481565b6102726105603660046128ba565b6001600160a01b039182166000908152600a6020908152604080832093909416825291909152205460ff1690565b6102d761059c3660046128e8565b6110ff565b600e546103029062010000900461ffff1681565b6102d76105c336600461290c565b6111f7565b6102d76105d63660046122cd565b61127e565b6102d76105e93660046121a7565b61131b565b6010546103029061ffff1681565b610302611365565b60006001600160a01b0383166106755760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b5060008181526009602090815260408083206001600160a01b03861684529091529020545b92915050565b60006106ab82611393565b806106ba57506106ba826113ff565b8061069a575061069a8261144f565b6060600b80546106d890612974565b80601f016020809104026020016040519081016040528092919081815260200182805461070490612974565b80156107515780601f1061072657610100808354040283529160200191610751565b820191906000526020600020905b81548152906001019060200180831161073457829003601f168201915b50505050509050919050565b6015546060906001600160a01b0316156107b4576040805160018082528183019092529060208083019080368337019050509050601454816000815181106107a7576107a76129af565b6020026020010181815250505b919050565b336107c2610d59565b6001600160a01b031614806107dd57506107dd600c33611474565b6107f95760405162461bcd60e51b815260040161066c906129c5565b610801611499565b565b6000816001600160a01b0316610817610d59565b6001600160a01b0316148061069a575061069a600c83611474565b3361083b610d59565b6001600160a01b031614806108565750610856600c33611474565b6108725760405162461bcd60e51b815260040161066c906129c5565b6108b182828080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506114ec92505050565b5050565b60155460145460009182916001600160a01b0390911690612710906108da9086612a1f565b6108e49190612a3e565b915091509250929050565b336108f8610d59565b6001600160a01b03161461091e5760405162461bcd60e51b815260040161066c90612a60565b610929600c82611474565b1561096f5760405133906001600160a01b038316907f7c0c3c84c67c85fcac635147348bfe374c24a1a93d0366d1cfe9d8853cbf89d590600090a36108b1600c826114ff565b50565b6001600160a01b03851633148061098e575061098e8533610560565b6109f55760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b606482015260840161066c565b610a028585858585611514565b5050505050565b6060610a15600c611702565b6001600160401b03811115610a2c57610a2c61237d565b604051908082528060200260200182016040528015610a55578160200160208202803683370190505b50905060005b610a65600c611702565b811015610ab357610a77600c8261170c565b828281518110610a8957610a896129af565b6001600160a01b039092166020928302919091019091015280610aab81612a95565b915050610a5b565b5090565b60608151835114610b1c5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b606482015260840161066c565b600083516001600160401b03811115610b3757610b3761237d565b604051908082528060200260200182016040528015610b60578160200160208202803683370190505b50905060005b8451811015610bd857610bab858281518110610b8457610b846129af565b6020026020010151858381518110610b9e57610b9e6129af565b6020026020010151610604565b828281518110610bbd57610bbd6129af565b6020908102919091010152610bd181612a95565b9050610b66565b509392505050565b33610be9610d59565b6001600160a01b03161480610c045750610c04600c33611474565b610c205760405162461bcd60e51b815260040161066c906129c5565b610801611718565b33610c31610d59565b6001600160a01b03161480610c4c5750610c4c600c33611474565b610c685760405162461bcd60e51b815260040161066c906129c5565b601580546001600160a01b0319166001600160a01b03841617905560148190555050565b33610c95610d59565b6001600160a01b031614610cbb5760405162461bcd60e51b815260040161066c90612a60565b610cc6600c82611474565b61096f5760405133906001600160a01b038316907f7e1a1a08d52e4ba0e21554733d66165fd5151f99460116223d9e3a608eec5cb190600090a36108b1600c82611761565b600e5460009061069a90839061ffff16610604565b33610d29610d59565b6001600160a01b031614610d4f5760405162461bcd60e51b815260040161066c90612a60565b6108016000611776565b6008546001600160a01b031690565b600080610d74836117c8565b60009081526001602052604090205460ff169392505050565b6108b1338383611819565b6015546060906001600160a01b0316156107b4576040805160018082528183019092529060208083019080368337505060155482519293506001600160a01b031691839150600090610dec57610dec6129af565b60200260200101906001600160a01b031690816001600160a01b031681525050919050565b60155460609081906001600160a01b031615610ec0576040805160018082528183019092529060208083019080368337505060155482519294506001600160a01b031691849150600090610e6757610e676129af565b6001600160a01b039290921660209283029190910182015260408051600180825281830190925291828101908036833701905050905060145481600081518110610eb357610eb36129af565b6020026020010181815250505b915091565b604080516101e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101829052610160810182905261018081018290526101a081018290526101c08101829052903315610f5157610f4c6118fa565b610f54565b60005b604080516101e081018252600e5461ffff62010000820481168352600160201b9091041660208201529192508101610f8a611365565b61ffff9081168252600f546020830152600e54600160301b9004811660408301526011546060830152601054811660808301529290921660a083015260025460ff908116151560c084015260035460e084015260045461010084015260055461012084015260065461014084015260075461016084015260125462010000900416151561018090920191909152919050565b6001600160a01b0383166110425760405162461bcd60e51b815260040161066c90612ab0565b6000828152600960209081526040808320338085529252909120548281101561107d5760405162461bcd60e51b815260040161066c90612af5565b600084815260096020908152604080832033845290915280822085840390556001600160a01b0387168252812080548592906110ba908490612b3f565b909155505060408051858152602081018590526001600160a01b0380881692339291861691600080516020612db0833981519152910160405180910390a45050505050565b33611108610d59565b6001600160a01b031614806111235750611123600c33611474565b61113f5760405162461bcd60e51b815260040161066c906129c5565b61114761192c565b61115081611969565b6111586119c7565b1561119b57336000908152601360205260408120805483929061118090849061ffff16612b57565b92506101000a81548161ffff021916908361ffff1602179055505b60005b8161ffff168110156108b1576111b5336001611a02565b600e805461ffff169060006111c983612b7d565b91906101000a81548161ffff021916908361ffff1602179055505080806111ef90612a95565b91505061119e565b6001600160a01b03851633148061121357506112138533610560565b6112715760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b606482015260840161066c565b610a028585858585611a45565b33611287610d59565b6001600160a01b0316146112ad5760405162461bcd60e51b815260040161066c90612a60565b6001600160a01b0381166113125760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161066c565b61096f81611776565b33611324610d59565b6001600160a01b0316148061133f575061133f600c33611474565b61135b5760405162461bcd60e51b815260040161066c906129c5565b6108b18282611b63565b601254600e5460009161138e9161ffff6301000000909204821691600160201b90910416612b9f565b905090565b60006001600160e01b031982166315ca424760e11b14806113c457506001600160e01b03198216635d9dd7eb60e11b145b806113df57506001600160e01b0319821663152a902d60e11b145b8061069a57506001600160e01b03198216632dde656160e21b1492915050565b60006001600160e01b03198216636cdb3d1360e11b148061143057506001600160e01b031982166303a24d0760e21b145b8061069a57506301ffc9a760e01b6001600160e01b031983161461069a565b60006001600160e01b03198216632a9f3abf60e11b148061069a575061069a826113ff565b6001600160a01b038116600090815260018301602052604081205415155b9392505050565b60025460ff16156114dd5760405162461bcd60e51b815260206004820152600e60248201526d416c72656164792061637469766560901b604482015260640161066c565b6002805460ff19166001179055565b80516108b190600b906020840190612102565b6000611492836001600160a01b038416611bc8565b81518351146115765760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b606482015260840161066c565b6001600160a01b03841661159c5760405162461bcd60e51b815260040161066c90612ab0565b336115ab818787878787611cbb565b60005b84518110156116945760008582815181106115cb576115cb6129af565b6020026020010151905060008583815181106115e9576115e96129af565b60209081029190910181015160008481526009835260408082206001600160a01b038e16835290935291909120549091508181101561163a5760405162461bcd60e51b815260040161066c90612af5565b60008381526009602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290611679908490612b3f565b925050819055505050508061168d90612a95565b90506115ae565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516116e4929190612bc2565b60405180910390a46116fa818787878787611cc3565b505050505050565b600061069a825490565b60006114928383611e1f565b6000600381905560048190556002805460ff19169055600681905560078190556040517fb02389feab3af620e2374d4d559b436ea226b1e6c9c31fe77dfbff3d40cbe9ba9190a1565b6000611492836001600160a01b038416611e49565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000808290506020815111156118105760405162461bcd60e51b815260206004820152600d60248201526c496e76616c6964206e6f6e636560981b604482015260640161066c565b50506020015190565b816001600160a01b0316836001600160a01b0316141561188d5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b606482015260840161066c565b6001600160a01b038381166000818152600a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6000806119056119c7565b156119235750503360009081526013602052604090205461ffff1690565b61069a33610d0b565b60025460ff166108015760405162461bcd60e51b8152602060048201526008602482015267496e61637469766560c01b604482015260640161066c565b600f5461197a9061ffff8316612a1f565b341461096f5760405162461bcd60e51b815260206004820152601c60248201527b125b9d985b1a59081c1d5c98da185cd948185b5bdd5b9d081cd95b9d60221b604482015260640161066c565b601554600090600160a01b900460ff1615801561138e5750600e54600160301b900461ffff1615158061138e57505060105461ffff16151590565b80601260038282829054906101000a900461ffff16611a219190612b57565b92506101000a81548161ffff021916908361ffff1602179055506108b18282611e98565b6001600160a01b038416611a6b5760405162461bcd60e51b815260040161066c90612ab0565b33611a8a818787611a7b88611ebf565b611a8488611ebf565b87611cbb565b60008481526009602090815260408083206001600160a01b038a16845290915290205483811015611acd5760405162461bcd60e51b815260040161066c90612af5565b60008581526009602090815260408083206001600160a01b038b8116855292528083208785039055908816825281208054869290611b0c908490612b3f565b909155505060408051868152602081018690526001600160a01b03808916928a82169291861691600080516020612db0833981519152910160405180910390a4611b5a828888888888611f0a565b50505050505050565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611bb0576040519150601f19603f3d011682016040523d82523d6000602084013e611bb5565b606091505b5050905080611bc357600080fd5b505050565b60008181526001830160205260408120548015611cb1576000611bec600183612bd5565b8554909150600090611c0090600190612bd5565b9050818114611c65576000866000018281548110611c2057611c206129af565b9060005260206000200154905080876000018481548110611c4357611c436129af565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611c7657611c76612bec565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061069a565b600091505061069a565b6116fa611fc5565b6001600160a01b0384163b156116fa5760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190611d079089908990889088908890600401612c02565b6020604051808303816000875af1925050508015611d42575060408051601f3d908101601f19168201909252611d3f91810190612c60565b60015b611def57611d4e612c7d565b806308c379a01415611d885750611d63612c99565b80611d6e5750611d8a565b8060405162461bcd60e51b815260040161066c919061226c565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b606482015260840161066c565b6001600160e01b0319811663bc197c8160e01b14611b5a5760405162461bcd60e51b815260040161066c90612d22565b6000826000018281548110611e3657611e366129af565b9060005260206000200154905092915050565b6000818152600183016020526040812054611e905750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561069a565b50600061069a565b600e546040805160208101909152600081526108b191849161ffff91821691851690612011565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110611ef957611ef96129af565b602090810291909101015292915050565b6001600160a01b0384163b156116fa5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190611f4e9089908990889088908890600401612d6a565b6020604051808303816000875af1925050508015611f89575060408051601f3d908101601f19168201909252611f8691810190612c60565b60015b611f9557611d4e612c7d565b6001600160e01b0319811663f23a6e6160e01b14611b5a5760405162461bcd60e51b815260040161066c90612d22565b601554600160a01b900460ff16156108015760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c881b1bd8dad959608a1b604482015260640161066c565b6001600160a01b0384166120715760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b606482015260840161066c565b3361208281600087611a7b88611ebf565b60008481526009602090815260408083206001600160a01b0389168452909152812080548592906120b4908490612b3f565b909155505060408051858152602081018590526001600160a01b038088169260009291851691600080516020612db0833981519152910160405180910390a4610a0281600087878787611f0a565b82805461210e90612974565b90600052602060002090601f0160209004810192826121305760008555612176565b82601f1061214957805160ff1916838001178555612176565b82800160010185558215612176579182015b8281111561217657825182559160200191906001019061215b565b50610ab39291505b80821115610ab3576000815560010161217e565b6001600160a01b038116811461096f57600080fd5b600080604083850312156121ba57600080fd5b82356121c581612192565b946020939093013593505050565b6001600160e01b03198116811461096f57600080fd5b6000602082840312156121fb57600080fd5b8135611492816121d3565b60006020828403121561221857600080fd5b5035919050565b6000815180845260005b8181101561224557602081850181015186830182015201612229565b81811115612257576000602083870101525b50601f01601f19169290920160200192915050565b602081526000611492602083018461221f565b600081518084526020808501945080840160005b838110156122af57815187529582019590820190600101612293565b509495945050505050565b602081526000611492602083018461227f565b6000602082840312156122df57600080fd5b813561149281612192565b600080602083850312156122fd57600080fd5b82356001600160401b038082111561231457600080fd5b818501915085601f83011261232857600080fd5b81358181111561233757600080fd5b86602082850101111561234957600080fd5b60209290920196919550909350505050565b6000806040838503121561236e57600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b03811182821017156123b8576123b861237d565b6040525050565b60006001600160401b038211156123d8576123d861237d565b5060051b60200190565b600082601f8301126123f357600080fd5b81356020612400826123bf565b60405161240d8282612393565b83815260059390931b850182019282810191508684111561242d57600080fd5b8286015b848110156124485780358352918301918301612431565b509695505050505050565b60006001600160401b0383111561246c5761246c61237d565b604051612483601f8501601f191660200182612393565b80915083815284848401111561249857600080fd5b83836020830137600060208583010152509392505050565b600082601f8301126124c157600080fd5b61149283833560208501612453565b600080600080600060a086880312156124e857600080fd5b85356124f381612192565b9450602086013561250381612192565b935060408601356001600160401b038082111561251f57600080fd5b61252b89838a016123e2565b9450606088013591508082111561254157600080fd5b61254d89838a016123e2565b9350608088013591508082111561256357600080fd5b50612570888289016124b0565b9150509295509295909350565b6020808252825182820181905260009190848201906040850190845b818110156125be5783516001600160a01b031683529284019291840191600101612599565b50909695505050505050565b600080604083850312156125dd57600080fd5b82356001600160401b03808211156125f457600080fd5b818501915085601f83011261260857600080fd5b81356020612615826123bf565b6040516126228282612393565b83815260059390931b850182019282810191508984111561264257600080fd5b948201945b8386101561266957853561265a81612192565b82529482019490820190612647565b9650508601359250508082111561267f57600080fd5b5061268c858286016123e2565b9150509250929050565b6000602082840312156126a857600080fd5b81356001600160401b038111156126be57600080fd5b8201601f810184136126cf57600080fd5b6126de84823560208401612453565b949350505050565b600080604083850312156126f957600080fd5b823561270481612192565b91506020830135801515811461271957600080fd5b809150509250929050565b600081518084526020808501945080840160005b838110156122af5781516001600160a01b031687529582019590820190600101612738565b6020815260006114926020830184612724565b6040815260006127836040830185612724565b8281036020840152612795818561227f565b95945050505050565b815161ffff1681526101e0810160208301516127c0602084018261ffff169052565b5060408301516127d6604084018261ffff169052565b506060830151606083015260808301516127f6608084018261ffff169052565b5060a083015160a083015260c083015161281660c084018261ffff169052565b5060e083015161282c60e084018261ffff169052565b506101008381015115159083015261012080840151908301526101408084015190830152610160808401519083015261018080840151908301526101a080840151908301526101c0928301511515929091019190915290565b60008060006060848603121561289a57600080fd5b83356128a581612192565b95602085013595506040909401359392505050565b600080604083850312156128cd57600080fd5b82356128d881612192565b9150602083013561271981612192565b6000602082840312156128fa57600080fd5b813561ffff8116811461149257600080fd5b600080600080600060a0868803121561292457600080fd5b853561292f81612192565b9450602086013561293f81612192565b9350604086013592506060860135915060808601356001600160401b0381111561296857600080fd5b612570888289016124b0565b600181811c9082168061298857607f821691505b602082108114156129a957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b60208082526024908201527f41646d696e436f6e74726f6c3a204d757374206265206f776e6572206f7220616040820152633236b4b760e11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615612a3957612a39612a09565b500290565b600082612a5b57634e487b7160e01b600052601260045260246000fd5b500490565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000600019821415612aa957612aa9612a09565b5060010190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60008219821115612b5257612b52612a09565b500190565b600061ffff808316818516808303821115612b7457612b74612a09565b01949350505050565b600061ffff80831681811415612b9557612b95612a09565b6001019392505050565b600061ffff83811690831681811015612bba57612bba612a09565b039392505050565b604081526000612783604083018561227f565b600082821015612be757612be7612a09565b500390565b634e487b7160e01b600052603160045260246000fd5b6001600160a01b0386811682528516602082015260a060408201819052600090612c2e9083018661227f565b8281036060840152612c40818661227f565b90508281036080840152612c54818561221f565b98975050505050505050565b600060208284031215612c7257600080fd5b8151611492816121d3565b600060033d1115612c965760046000803e5060005160e01c5b90565b600060443d1015612ca75790565b6040516003193d81016004833e81513d6001600160401b038160248401118184111715612cd657505050505090565b8285019150815181811115612cee5750505050505090565b843d8701016020828501011115612d085750505050505090565b612d1760208286010187612393565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090612da49083018461221f565b97965050505050505056fec3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62a26469706673582212208bb68a5c11b7d9ecfdbf533fa09e82cb0c9c66272ef7ddafecb4eb71368a983764736f6c634300080b0033000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102345760003560e01c806370a082311161013757806370a0823114610438578063715018a61461044b57806378e979251461045357806381960b5c1461045c5780638da5cb5b14610465578063923c235b14610485578063a22cb46514610498578063a6a11bb1146104ab578063b9c4d9fb146104b4578063bb3bafd6146104d4578063c19d93fb146104f5578063c8a84a821461050a578063d053b3e21461051f578063d5abeb0114610532578063defd6c5f14610540578063e3b9398b14610549578063e985e9c514610552578063efbce0301461058e578063f19605d6146105a1578063f242432a146105b5578063f2fde38b146105c8578063f3fef3a3146105db578063f4743070146105ee578063fe73ad77146105fc57600080fd5b8062fdd58e1461023957806301ffc9a71461025f57806302fb0c5e146102825780630e89341c1461028f5780630ebd4c7f146102af5780630f15f4c0146102cf57806312686aae146102d957806316317c21146102ed578063188866571461031557806324d7806c1461032a5780632639f4601461033d5780632a55205a146103505780632b85ed9c146103825780632d345670146103975780632eb2c2d6146103aa5780633197cbb6146103bd57806331ae450b146103c657806340d1d255146103db5780634e1273f4146103e457806351b42b00146103f757806355461d6d146103ff5780636c2f5acd146104125780636d73e66914610425575b600080fd5b61024c6102473660046121a7565b610604565b6040519081526020015b60405180910390f35b61027261026d3660046121e9565b6106a0565b6040519015158152602001610256565b6002546102729060ff1681565b6102a261029d366004612206565b6106c9565b604051610256919061226c565b6102c26102bd366004612206565b61075d565b60405161025691906122ba565b6102d76107b9565b005b60155461027290600160a01b900460ff1681565b60125461030290600160281b900461ffff1681565b60405161ffff9091168152602001610256565b600e5461030290600160301b900461ffff1681565b6102726103383660046122cd565b610803565b6102d761034b3660046122ea565b610832565b61036361035e36600461235b565b6108b5565b604080516001600160a01b039093168352602083019190915201610256565b601254610302906301000000900461ffff1681565b6102d76103a53660046122cd565b6108ef565b6102d76103b83660046124d0565b610972565b61024c60045481565b6103ce610a09565b604051610256919061257d565b61024c60075481565b6102c26103f23660046125ca565b610ab7565b6102d7610be0565b6012546102729062010000900460ff1681565b6102d76104203660046121a7565b610c28565b6102d76104333660046122cd565b610c8c565b61024c6104463660046122cd565b610d0b565b6102d7610d20565b61024c60035481565b61024c60115481565b61046d610d59565b6040516001600160a01b039091168152602001610256565b610272610493366004612696565b610d68565b6102d76104a63660046126e6565b610d8d565b61024c60065481565b6104c76104c2366004612206565b610d98565b604051610256919061275d565b6104e76104e2366004612206565b610e11565b604051610256929190612770565b6104fd610ec5565b604051610256919061279e565b600e5461030290600160201b900461ffff1681565b6102d761052d366004612885565b61101c565b6012546103029061ffff1681565b61024c600f5481565b61024c60055481565b6102726105603660046128ba565b6001600160a01b039182166000908152600a6020908152604080832093909416825291909152205460ff1690565b6102d761059c3660046128e8565b6110ff565b600e546103029062010000900461ffff1681565b6102d76105c336600461290c565b6111f7565b6102d76105d63660046122cd565b61127e565b6102d76105e93660046121a7565b61131b565b6010546103029061ffff1681565b610302611365565b60006001600160a01b0383166106755760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b5060008181526009602090815260408083206001600160a01b03861684529091529020545b92915050565b60006106ab82611393565b806106ba57506106ba826113ff565b8061069a575061069a8261144f565b6060600b80546106d890612974565b80601f016020809104026020016040519081016040528092919081815260200182805461070490612974565b80156107515780601f1061072657610100808354040283529160200191610751565b820191906000526020600020905b81548152906001019060200180831161073457829003601f168201915b50505050509050919050565b6015546060906001600160a01b0316156107b4576040805160018082528183019092529060208083019080368337019050509050601454816000815181106107a7576107a76129af565b6020026020010181815250505b919050565b336107c2610d59565b6001600160a01b031614806107dd57506107dd600c33611474565b6107f95760405162461bcd60e51b815260040161066c906129c5565b610801611499565b565b6000816001600160a01b0316610817610d59565b6001600160a01b0316148061069a575061069a600c83611474565b3361083b610d59565b6001600160a01b031614806108565750610856600c33611474565b6108725760405162461bcd60e51b815260040161066c906129c5565b6108b182828080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506114ec92505050565b5050565b60155460145460009182916001600160a01b0390911690612710906108da9086612a1f565b6108e49190612a3e565b915091509250929050565b336108f8610d59565b6001600160a01b03161461091e5760405162461bcd60e51b815260040161066c90612a60565b610929600c82611474565b1561096f5760405133906001600160a01b038316907f7c0c3c84c67c85fcac635147348bfe374c24a1a93d0366d1cfe9d8853cbf89d590600090a36108b1600c826114ff565b50565b6001600160a01b03851633148061098e575061098e8533610560565b6109f55760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b606482015260840161066c565b610a028585858585611514565b5050505050565b6060610a15600c611702565b6001600160401b03811115610a2c57610a2c61237d565b604051908082528060200260200182016040528015610a55578160200160208202803683370190505b50905060005b610a65600c611702565b811015610ab357610a77600c8261170c565b828281518110610a8957610a896129af565b6001600160a01b039092166020928302919091019091015280610aab81612a95565b915050610a5b565b5090565b60608151835114610b1c5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b606482015260840161066c565b600083516001600160401b03811115610b3757610b3761237d565b604051908082528060200260200182016040528015610b60578160200160208202803683370190505b50905060005b8451811015610bd857610bab858281518110610b8457610b846129af565b6020026020010151858381518110610b9e57610b9e6129af565b6020026020010151610604565b828281518110610bbd57610bbd6129af565b6020908102919091010152610bd181612a95565b9050610b66565b509392505050565b33610be9610d59565b6001600160a01b03161480610c045750610c04600c33611474565b610c205760405162461bcd60e51b815260040161066c906129c5565b610801611718565b33610c31610d59565b6001600160a01b03161480610c4c5750610c4c600c33611474565b610c685760405162461bcd60e51b815260040161066c906129c5565b601580546001600160a01b0319166001600160a01b03841617905560148190555050565b33610c95610d59565b6001600160a01b031614610cbb5760405162461bcd60e51b815260040161066c90612a60565b610cc6600c82611474565b61096f5760405133906001600160a01b038316907f7e1a1a08d52e4ba0e21554733d66165fd5151f99460116223d9e3a608eec5cb190600090a36108b1600c82611761565b600e5460009061069a90839061ffff16610604565b33610d29610d59565b6001600160a01b031614610d4f5760405162461bcd60e51b815260040161066c90612a60565b6108016000611776565b6008546001600160a01b031690565b600080610d74836117c8565b60009081526001602052604090205460ff169392505050565b6108b1338383611819565b6015546060906001600160a01b0316156107b4576040805160018082528183019092529060208083019080368337505060155482519293506001600160a01b031691839150600090610dec57610dec6129af565b60200260200101906001600160a01b031690816001600160a01b031681525050919050565b60155460609081906001600160a01b031615610ec0576040805160018082528183019092529060208083019080368337505060155482519294506001600160a01b031691849150600090610e6757610e676129af565b6001600160a01b039290921660209283029190910182015260408051600180825281830190925291828101908036833701905050905060145481600081518110610eb357610eb36129af565b6020026020010181815250505b915091565b604080516101e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101829052610160810182905261018081018290526101a081018290526101c08101829052903315610f5157610f4c6118fa565b610f54565b60005b604080516101e081018252600e5461ffff62010000820481168352600160201b9091041660208201529192508101610f8a611365565b61ffff9081168252600f546020830152600e54600160301b9004811660408301526011546060830152601054811660808301529290921660a083015260025460ff908116151560c084015260035460e084015260045461010084015260055461012084015260065461014084015260075461016084015260125462010000900416151561018090920191909152919050565b6001600160a01b0383166110425760405162461bcd60e51b815260040161066c90612ab0565b6000828152600960209081526040808320338085529252909120548281101561107d5760405162461bcd60e51b815260040161066c90612af5565b600084815260096020908152604080832033845290915280822085840390556001600160a01b0387168252812080548592906110ba908490612b3f565b909155505060408051858152602081018590526001600160a01b0380881692339291861691600080516020612db0833981519152910160405180910390a45050505050565b33611108610d59565b6001600160a01b031614806111235750611123600c33611474565b61113f5760405162461bcd60e51b815260040161066c906129c5565b61114761192c565b61115081611969565b6111586119c7565b1561119b57336000908152601360205260408120805483929061118090849061ffff16612b57565b92506101000a81548161ffff021916908361ffff1602179055505b60005b8161ffff168110156108b1576111b5336001611a02565b600e805461ffff169060006111c983612b7d565b91906101000a81548161ffff021916908361ffff1602179055505080806111ef90612a95565b91505061119e565b6001600160a01b03851633148061121357506112138533610560565b6112715760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b606482015260840161066c565b610a028585858585611a45565b33611287610d59565b6001600160a01b0316146112ad5760405162461bcd60e51b815260040161066c90612a60565b6001600160a01b0381166113125760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161066c565b61096f81611776565b33611324610d59565b6001600160a01b0316148061133f575061133f600c33611474565b61135b5760405162461bcd60e51b815260040161066c906129c5565b6108b18282611b63565b601254600e5460009161138e9161ffff6301000000909204821691600160201b90910416612b9f565b905090565b60006001600160e01b031982166315ca424760e11b14806113c457506001600160e01b03198216635d9dd7eb60e11b145b806113df57506001600160e01b0319821663152a902d60e11b145b8061069a57506001600160e01b03198216632dde656160e21b1492915050565b60006001600160e01b03198216636cdb3d1360e11b148061143057506001600160e01b031982166303a24d0760e21b145b8061069a57506301ffc9a760e01b6001600160e01b031983161461069a565b60006001600160e01b03198216632a9f3abf60e11b148061069a575061069a826113ff565b6001600160a01b038116600090815260018301602052604081205415155b9392505050565b60025460ff16156114dd5760405162461bcd60e51b815260206004820152600e60248201526d416c72656164792061637469766560901b604482015260640161066c565b6002805460ff19166001179055565b80516108b190600b906020840190612102565b6000611492836001600160a01b038416611bc8565b81518351146115765760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b606482015260840161066c565b6001600160a01b03841661159c5760405162461bcd60e51b815260040161066c90612ab0565b336115ab818787878787611cbb565b60005b84518110156116945760008582815181106115cb576115cb6129af565b6020026020010151905060008583815181106115e9576115e96129af565b60209081029190910181015160008481526009835260408082206001600160a01b038e16835290935291909120549091508181101561163a5760405162461bcd60e51b815260040161066c90612af5565b60008381526009602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290611679908490612b3f565b925050819055505050508061168d90612a95565b90506115ae565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516116e4929190612bc2565b60405180910390a46116fa818787878787611cc3565b505050505050565b600061069a825490565b60006114928383611e1f565b6000600381905560048190556002805460ff19169055600681905560078190556040517fb02389feab3af620e2374d4d559b436ea226b1e6c9c31fe77dfbff3d40cbe9ba9190a1565b6000611492836001600160a01b038416611e49565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000808290506020815111156118105760405162461bcd60e51b815260206004820152600d60248201526c496e76616c6964206e6f6e636560981b604482015260640161066c565b50506020015190565b816001600160a01b0316836001600160a01b0316141561188d5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b606482015260840161066c565b6001600160a01b038381166000818152600a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6000806119056119c7565b156119235750503360009081526013602052604090205461ffff1690565b61069a33610d0b565b60025460ff166108015760405162461bcd60e51b8152602060048201526008602482015267496e61637469766560c01b604482015260640161066c565b600f5461197a9061ffff8316612a1f565b341461096f5760405162461bcd60e51b815260206004820152601c60248201527b125b9d985b1a59081c1d5c98da185cd948185b5bdd5b9d081cd95b9d60221b604482015260640161066c565b601554600090600160a01b900460ff1615801561138e5750600e54600160301b900461ffff1615158061138e57505060105461ffff16151590565b80601260038282829054906101000a900461ffff16611a219190612b57565b92506101000a81548161ffff021916908361ffff1602179055506108b18282611e98565b6001600160a01b038416611a6b5760405162461bcd60e51b815260040161066c90612ab0565b33611a8a818787611a7b88611ebf565b611a8488611ebf565b87611cbb565b60008481526009602090815260408083206001600160a01b038a16845290915290205483811015611acd5760405162461bcd60e51b815260040161066c90612af5565b60008581526009602090815260408083206001600160a01b038b8116855292528083208785039055908816825281208054869290611b0c908490612b3f565b909155505060408051868152602081018690526001600160a01b03808916928a82169291861691600080516020612db0833981519152910160405180910390a4611b5a828888888888611f0a565b50505050505050565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611bb0576040519150601f19603f3d011682016040523d82523d6000602084013e611bb5565b606091505b5050905080611bc357600080fd5b505050565b60008181526001830160205260408120548015611cb1576000611bec600183612bd5565b8554909150600090611c0090600190612bd5565b9050818114611c65576000866000018281548110611c2057611c206129af565b9060005260206000200154905080876000018481548110611c4357611c436129af565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611c7657611c76612bec565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061069a565b600091505061069a565b6116fa611fc5565b6001600160a01b0384163b156116fa5760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190611d079089908990889088908890600401612c02565b6020604051808303816000875af1925050508015611d42575060408051601f3d908101601f19168201909252611d3f91810190612c60565b60015b611def57611d4e612c7d565b806308c379a01415611d885750611d63612c99565b80611d6e5750611d8a565b8060405162461bcd60e51b815260040161066c919061226c565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b606482015260840161066c565b6001600160e01b0319811663bc197c8160e01b14611b5a5760405162461bcd60e51b815260040161066c90612d22565b6000826000018281548110611e3657611e366129af565b9060005260206000200154905092915050565b6000818152600183016020526040812054611e905750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561069a565b50600061069a565b600e546040805160208101909152600081526108b191849161ffff91821691851690612011565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110611ef957611ef96129af565b602090810291909101015292915050565b6001600160a01b0384163b156116fa5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190611f4e9089908990889088908890600401612d6a565b6020604051808303816000875af1925050508015611f89575060408051601f3d908101601f19168201909252611f8691810190612c60565b60015b611f9557611d4e612c7d565b6001600160e01b0319811663f23a6e6160e01b14611b5a5760405162461bcd60e51b815260040161066c90612d22565b601554600160a01b900460ff16156108015760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c881b1bd8dad959608a1b604482015260640161066c565b6001600160a01b0384166120715760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b606482015260840161066c565b3361208281600087611a7b88611ebf565b60008481526009602090815260408083206001600160a01b0389168452909152812080548592906120b4908490612b3f565b909155505060408051858152602081018590526001600160a01b038088169260009291851691600080516020612db0833981519152910160405180910390a4610a0281600087878787611f0a565b82805461210e90612974565b90600052602060002090601f0160209004810192826121305760008555612176565b82601f1061214957805160ff1916838001178555612176565b82800160010185558215612176579182015b8281111561217657825182559160200191906001019061215b565b50610ab39291505b80821115610ab3576000815560010161217e565b6001600160a01b038116811461096f57600080fd5b600080604083850312156121ba57600080fd5b82356121c581612192565b946020939093013593505050565b6001600160e01b03198116811461096f57600080fd5b6000602082840312156121fb57600080fd5b8135611492816121d3565b60006020828403121561221857600080fd5b5035919050565b6000815180845260005b8181101561224557602081850181015186830182015201612229565b81811115612257576000602083870101525b50601f01601f19169290920160200192915050565b602081526000611492602083018461221f565b600081518084526020808501945080840160005b838110156122af57815187529582019590820190600101612293565b509495945050505050565b602081526000611492602083018461227f565b6000602082840312156122df57600080fd5b813561149281612192565b600080602083850312156122fd57600080fd5b82356001600160401b038082111561231457600080fd5b818501915085601f83011261232857600080fd5b81358181111561233757600080fd5b86602082850101111561234957600080fd5b60209290920196919550909350505050565b6000806040838503121561236e57600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b03811182821017156123b8576123b861237d565b6040525050565b60006001600160401b038211156123d8576123d861237d565b5060051b60200190565b600082601f8301126123f357600080fd5b81356020612400826123bf565b60405161240d8282612393565b83815260059390931b850182019282810191508684111561242d57600080fd5b8286015b848110156124485780358352918301918301612431565b509695505050505050565b60006001600160401b0383111561246c5761246c61237d565b604051612483601f8501601f191660200182612393565b80915083815284848401111561249857600080fd5b83836020830137600060208583010152509392505050565b600082601f8301126124c157600080fd5b61149283833560208501612453565b600080600080600060a086880312156124e857600080fd5b85356124f381612192565b9450602086013561250381612192565b935060408601356001600160401b038082111561251f57600080fd5b61252b89838a016123e2565b9450606088013591508082111561254157600080fd5b61254d89838a016123e2565b9350608088013591508082111561256357600080fd5b50612570888289016124b0565b9150509295509295909350565b6020808252825182820181905260009190848201906040850190845b818110156125be5783516001600160a01b031683529284019291840191600101612599565b50909695505050505050565b600080604083850312156125dd57600080fd5b82356001600160401b03808211156125f457600080fd5b818501915085601f83011261260857600080fd5b81356020612615826123bf565b6040516126228282612393565b83815260059390931b850182019282810191508984111561264257600080fd5b948201945b8386101561266957853561265a81612192565b82529482019490820190612647565b9650508601359250508082111561267f57600080fd5b5061268c858286016123e2565b9150509250929050565b6000602082840312156126a857600080fd5b81356001600160401b038111156126be57600080fd5b8201601f810184136126cf57600080fd5b6126de84823560208401612453565b949350505050565b600080604083850312156126f957600080fd5b823561270481612192565b91506020830135801515811461271957600080fd5b809150509250929050565b600081518084526020808501945080840160005b838110156122af5781516001600160a01b031687529582019590820190600101612738565b6020815260006114926020830184612724565b6040815260006127836040830185612724565b8281036020840152612795818561227f565b95945050505050565b815161ffff1681526101e0810160208301516127c0602084018261ffff169052565b5060408301516127d6604084018261ffff169052565b506060830151606083015260808301516127f6608084018261ffff169052565b5060a083015160a083015260c083015161281660c084018261ffff169052565b5060e083015161282c60e084018261ffff169052565b506101008381015115159083015261012080840151908301526101408084015190830152610160808401519083015261018080840151908301526101a080840151908301526101c0928301511515929091019190915290565b60008060006060848603121561289a57600080fd5b83356128a581612192565b95602085013595506040909401359392505050565b600080604083850312156128cd57600080fd5b82356128d881612192565b9150602083013561271981612192565b6000602082840312156128fa57600080fd5b813561ffff8116811461149257600080fd5b600080600080600060a0868803121561292457600080fd5b853561292f81612192565b9450602086013561293f81612192565b9350604086013592506060860135915060808601356001600160401b0381111561296857600080fd5b612570888289016124b0565b600181811c9082168061298857607f821691505b602082108114156129a957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b60208082526024908201527f41646d696e436f6e74726f6c3a204d757374206265206f776e6572206f7220616040820152633236b4b760e11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615612a3957612a39612a09565b500290565b600082612a5b57634e487b7160e01b600052601260045260246000fd5b500490565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000600019821415612aa957612aa9612a09565b5060010190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60008219821115612b5257612b52612a09565b500190565b600061ffff808316818516808303821115612b7457612b74612a09565b01949350505050565b600061ffff80831681811415612b9557612b95612a09565b6001019392505050565b600061ffff83811690831681811015612bba57612bba612a09565b039392505050565b604081526000612783604083018561227f565b600082821015612be757612be7612a09565b500390565b634e487b7160e01b600052603160045260246000fd5b6001600160a01b0386811682528516602082015260a060408201819052600090612c2e9083018661227f565b8281036060840152612c40818661227f565b90508281036080840152612c54818561221f565b98975050505050505050565b600060208284031215612c7257600080fd5b8151611492816121d3565b600060033d1115612c965760046000803e5060005160e01c5b90565b600060443d1015612ca75790565b6040516003193d81016004833e81513d6001600160401b038160248401118184111715612cd657505050505090565b8285019150815181811115612cee5750505050505090565b843d8701016020828501011115612d085750505050505090565b612d1760208286010187612393565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090612da49083018461221f565b97965050505050505056fec3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62a26469706673582212208bb68a5c11b7d9ecfdbf533fa09e82cb0c9c66272ef7ddafecb4eb71368a983764736f6c634300080b0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1
-----Decoded View---------------
Arg [0] : signingAddress_ (address): 0xa5409ec958C83C3f309868babACA7c86DCB077c1
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1
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.