-
Notifications
You must be signed in to change notification settings - Fork 10
/
ICrafting.sol
161 lines (148 loc) · 3.83 KB
/
ICrafting.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.9;
// Interface generated by solface: https://github.com/moonstream-to/solface
// solface version: 0.1.0
// Interface ID: f472ee2f
interface ICrafting {
// structs
struct Compound0 {
uint256 tokenType;
address tokenAddress;
uint256 tokenId;
uint256 amount;
uint256 tokenAction;
}
struct Compound1 {
uint256 tokenType;
address tokenAddress;
uint256 tokenId;
uint256 amount;
uint256 tokenAction;
}
struct Compound2 {
Compound0[] inputs;
Compound1[] outputs;
bool isActive;
}
struct Compound3 {
uint256 tokenType;
address tokenAddress;
uint256 tokenId;
uint256 amount;
uint256 tokenAction;
}
struct Compound4 {
uint256 tokenType;
address tokenAddress;
uint256 tokenId;
uint256 amount;
uint256 tokenAction;
}
struct Compound5 {
Compound3[] inputs;
Compound4[] outputs;
bool isActive;
}
struct Compound6 {
uint256 tokenType;
address tokenAddress;
uint256 tokenId;
uint256 amount;
uint256 tokenAction;
}
struct Compound7 {
uint256 tokenType;
address tokenAddress;
uint256 tokenId;
uint256 amount;
uint256 tokenAction;
}
struct Compound8 {
Compound6[] inputs;
Compound7[] outputs;
bool isActive;
}
struct Compound9 {
uint256 tokenType;
address tokenAddress;
uint256 tokenId;
uint256 amount;
uint256 tokenAction;
}
struct Compound10 {
uint256 tokenType;
address tokenAddress;
uint256 tokenId;
uint256 amount;
uint256 tokenAction;
}
struct Compound11 {
Compound9[] inputs;
Compound10[] outputs;
bool isActive;
}
struct Compound12 {
uint256 tokenType;
address tokenAddress;
uint256 tokenId;
uint256 amount;
uint256 tokenAction;
}
struct Compound13 {
uint256 tokenType;
address tokenAddress;
uint256 tokenId;
uint256 amount;
uint256 tokenAction;
}
struct Compound14 {
Compound12[] inputs;
Compound13[] outputs;
bool isActive;
}
// events
event Craft(uint256 recipeId, address player);
event RecipeCreated(uint256 recipeId, Compound2 recipe, address operator);
event RecipeUpdated(uint256 recipeId, Compound5 recipe, address operator);
// functions
// Selector: a1141e04
function addRecipe(Compound8 memory recipe) external;
// Selector: f3917bd2
function craft(uint256 recipeId) external;
// Selector: f8d12a41
function getRecipe(
uint256 recipeId
) external view returns (Compound11 memory);
// Selector: 953633b9
function numRecipes() external view returns (uint256);
// Selector: bc197c81
function onERC1155BatchReceived(
address,
address,
uint256[] memory,
uint256[] memory,
bytes memory
) external returns (bytes4);
// Selector: f23a6e61
function onERC1155Received(
address,
address,
uint256,
uint256,
bytes memory
) external returns (bytes4);
// Selector: 150b7a02
function onERC721Received(
address,
address,
uint256,
bytes memory
) external returns (bytes4);
// Selector: e74738d9
function setTerminusAuth(address terminusAddress, uint256 tokenId) external;
// Selector: 01ffc9a7
function supportsInterface(bytes4 interfaceId) external view returns (bool);
// Selector: 76800b9d
function updateRecipe(uint256 recipeId, Compound14 memory recipe) external;
// errors
}