This repository has been archived by the owner on Sep 15, 2022. It is now read-only.
/
Factory.sol
49 lines (42 loc) · 1.62 KB
/
Factory.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
pragma solidity ^0.4.24;
/**
* This is a generic factory contract that can be used to mint tokens. The configuration
* for minting is specified by an _optionId, which can be used to delineate various
* ways of minting.
*/
interface Factory {
/**
* Returns the name of this factory.
*/
function name() external view returns (string);
/**
* Returns the symbol for this factory.
*/
function symbol() external view returns (string);
/**
* Number of options the factory supports.
*/
function numOptions() public view returns (uint256);
/**
* @dev Returns whether the option ID can be minted. Can return false if the developer wishes to
* restrict a total supply per option ID (or overall).
*/
function canMint(uint256 _optionId) public view returns (bool);
/**
* @dev Returns a URL specifying some metadata about the option. This metadata can be of the
* same structure as the ERC721 metadata.
*/
function tokenURI(uint256 _optionId) public view returns (string);
/**
* Indicates that this is a factory contract. Ideally would use EIP 165 supportsInterface()
*/
function supportsFactoryInterface() public view returns (bool);
/**
* @dev Mints asset(s) in accordance to a specific address with a particular "option".
* To work properly with the Wyvern proxy contracts (later universal login), this method .
* Options should also be delineated 0 - (numOptions() - 1) for convenient indexing.
* @param _optionId the option id
* @param _toAddress address of the future owner of the asset(s)
*/
function mint(uint256 _optionId, address _toAddress) external;
}