-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathIRobe.sol
More file actions
71 lines (55 loc) · 2.15 KB
/
IRobe.sol
File metadata and controls
71 lines (55 loc) · 2.15 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
pragma solidity ^0.5.0;
import "./IERC721.sol";
/**
* @title Robe
* @dev An open standard based on Ethereum ERC 721 to build unique NFT with XML information
*
* @dev This is the main Inteface that identifies a Robe NFT
*
* @author Marco Vasapollo <ceo@metaring.com>
* @author Alessandro Mario Lagana Toschi <alet@risepic.com>
*/
contract IRobe is IERC721 {
/**
* Creates a new ERC 721 NFT
* @return a unique tokenId
*/
function mint(bytes calldata payload) external returns(uint256);
function mintAndFinalize(bytes calldata payload) external returns(uint256);
/**
* Attaches a new ERC 721 NFT to an already-existing Token
* to create a composed NFT
* @return a unique tokenId
*/
function mint(uint256 rootTokenId, bytes calldata payload) external returns(uint256);
function mintAndFinalize(uint256 rootTokenId, bytes calldata payload) external returns(uint256);
function finalize(uint256 rootTokenId) external;
function isFinalized(uint256 tokenId) external view returns(bool);
/**
* @return all the tokenIds that composes the givend NFT
*/
function getChain(uint256 tokenId) external view returns(uint256[] memory);
/**
* @return the root NFT of this tokenId
*/
function getRoot(uint256 tokenId) external view returns(uint256);
/**
* @return the content of a NFT
*/
function getContent(uint256 tokenId) external view returns(bytes memory);
/**
* @return the position in the chain of this NFT
*/
function getPositionOf(uint256 tokenId) external view returns(uint256);
/**
* @return the tokenId of the passed NFT at the given position
*/
function getTokenIdAt(uint256 tokenId, uint256 position) external view returns(uint256);
/**
* Syntactic sugar
* @return the position in the chain, the owner's address and content of the given NFT
*/
function getCompleteInfo(uint256 tokenId) external view returns(uint256, address, bytes memory);
event Mint(uint256 indexed rootTokenId, uint256 indexed newTokenId, address indexed sender);
event Finalize(uint256 indexed rootTokenId);
}