// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.10;
import "./IMechanicData.sol";
/**
* @notice Capabilities on MintManager pertaining to mechanics
*/
interface IMechanicMintManager is IMechanicData {
/**
* @notice Register a new mechanic vector
* @param _mechanicVectorMetadata Mechanic vector metadata
* @param seed Used to seed uniqueness into mechanic vector ID generation
* @param vectorData Vector data to store on mechanic (optional)
*/
function registerMechanicVector(
MechanicVectorMetadata calldata _mechanicVectorMetadata,
uint96 seed,
bytes calldata vectorData
) external;
/**
* @notice Pause or unpause a mechanic vector
* @param mechanicVectorId Global mechanic ID
* @param pause If true, pause the mechanic mint vector. If false, unpause
*/
function setPauseOnMechanicMintVector(bytes32 mechanicVectorId, bool pause) external;
/**
* @notice Mint a number of tokens sequentially via a mechanic vector
* @param mechanicVectorId Global mechanic ID
* @param recipient Mint recipient
* @param numToMint Number of tokens to mint
* @param data Custom data to be processed by mechanic
*/
function mechanicMintNum(
bytes32 mechanicVectorId,
address recipient,
uint32 numToMint,
bytes calldata data
) external payable;
/**
* @notice Mint a specific set of token ids via a mechanic vector
* @param mechanicVectorId Global mechanic ID
* @param recipient Mint recipient
* @param tokenIds IDs of tokens to mint
* @param data Custom data to be processed by mechanic
*/
function mechanicMintChoose(
bytes32 mechanicVectorId,
address recipient,
uint256[] calldata tokenIds,
bytes calldata data
) external payable;
}
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol)
// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.
pragma solidity ^0.8.0;
/**
* @dev Library for reading and writing primitive types to specific storage slots.
*
* Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
* This library helps with reading and writing to such slots without the need for inline assembly.
*
* The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
*
* Example usage to set ERC1967 implementation slot:
* ```solidity
* contract ERC1967 {
* bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
*
* function _getImplementation() internal view returns (address) {
* return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
* }
*
* function _setImplementation(address newImplementation) internal {
* require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");
* StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
* }
* }
* ```
*
* _Available since v4.1 for `address`, `bool`, `bytes32`, `uint256`._
* _Available since v4.9 for `string`, `bytes`._
*/
library StorageSlot {
struct AddressSlot {
address value;
}
struct BooleanSlot {
bool value;
}
struct Bytes32Slot {
bytes32 value;
}
struct Uint256Slot {
uint256 value;
}
struct StringSlot {
string value;
}
struct BytesSlot {
bytes value;
}
/**
* @dev Returns an `AddressSlot` with member `value` located at `slot`.
*/
function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `BooleanSlot` with member `value` located at `slot`.
*/
function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `Bytes32Slot` with member `value` located at `slot`.
*/
function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `Uint256Slot` with member `value` located at `slot`.
*/
function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `StringSlot` with member `value` located at `slot`.
*/
function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `StringSlot` representation of the string storage pointer `store`.
*/
function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := store.slot
}
}
/**
* @dev Returns an `BytesSlot` with member `value` located at `slot`.
*/
function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.
*/
function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := store.slot
}
}
}