@bloxchain/contracts 1.0.0-alpha → 1.0.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +55 -18
- package/abi/{ControlBlox.abi.json → AccountBlox.abi.json} +699 -2974
- package/abi/BareBlox.abi.json +127 -90
- package/abi/BaseStateMachine.abi.json +127 -90
- package/abi/EngineBlox.abi.json +11 -31
- package/abi/GuardController.abi.json +217 -895
- package/abi/GuardControllerDefinitions.abi.json +380 -0
- package/abi/IDefinition.abi.json +19 -0
- package/abi/RoleBlox.abi.json +818 -2404
- package/abi/RuntimeRBAC.abi.json +122 -328
- package/abi/RuntimeRBACDefinitions.abi.json +243 -0
- package/abi/SecureBlox.abi.json +620 -1952
- package/abi/SecureOwnable.abi.json +469 -1801
- package/abi/SecureOwnableDefinitions.abi.json +57 -0
- package/abi/SimpleRWA20.abi.json +486 -1999
- package/abi/SimpleRWA20Definitions.abi.json +19 -0
- package/abi/SimpleVault.abi.json +884 -2685
- package/abi/SimpleVaultDefinitions.abi.json +19 -0
- package/components/README.md +8 -0
- package/core/access/RuntimeRBAC.sol +184 -0
- package/core/access/interface/IRuntimeRBAC.sol +55 -0
- package/{contracts/core → core}/access/lib/definitions/RuntimeRBACDefinitions.sol +121 -1
- package/{contracts/core → core}/base/BaseStateMachine.sol +187 -54
- package/{contracts/core → core}/base/interface/IBaseStateMachine.sol +7 -0
- package/{contracts/core → core}/execution/GuardController.sol +89 -155
- package/{contracts/core → core}/execution/interface/IGuardController.sol +52 -12
- package/{contracts/core → core}/execution/lib/definitions/GuardControllerDefinitions.sol +91 -2
- package/{contracts/core → core}/lib/EngineBlox.sol +167 -64
- package/{contracts → core/lib}/interfaces/IDefinition.sol +15 -6
- package/{contracts → core/lib}/interfaces/IEventForwarder.sol +1 -1
- package/{contracts → core/lib}/utils/SharedValidation.sol +490 -486
- package/core/pattern/Account.sol +75 -0
- package/core/research/BloxchainWallet.sol +133 -0
- package/core/research/FactoryBlox/FactoryBlox.sol +344 -0
- package/core/research/FactoryBlox/FactoryBloxDefinitions.sol +144 -0
- package/core/research/erc1155-blox/ERC1155Blox.sol +170 -0
- package/core/research/erc1155-blox/lib/definitions/ERC1155BloxDefinitions.sol +203 -0
- package/core/research/erc20-blox/ERC20Blox.sol +135 -0
- package/core/research/erc20-blox/lib/definitions/ERC20BloxDefinitions.sol +185 -0
- package/core/research/erc721-blox/ERC721Blox.sol +131 -0
- package/core/research/erc721-blox/lib/definitions/ERC721BloxDefinitions.sol +172 -0
- package/core/research/lending-blox/.gitkeep +1 -0
- package/core/research/p2p-blox/P2PBlox.sol +266 -0
- package/core/research/p2p-blox/README.md +85 -0
- package/core/research/p2p-blox/lib/definitions/P2PBloxDefinitions.sol +19 -0
- package/{contracts/core → core}/security/SecureOwnable.sol +390 -419
- package/{contracts/core → core}/security/interface/ISecureOwnable.sol +27 -40
- package/{contracts/core → core}/security/lib/definitions/SecureOwnableDefinitions.sol +786 -757
- package/package.json +49 -47
- package/standards/README.md +12 -0
- package/standards/behavior/ICopyable.sol +36 -0
- package/standards/hooks/IOnActionHook.sol +21 -0
- package/contracts/core/access/RuntimeRBAC.sol +0 -344
- package/contracts/core/access/interface/IRuntimeRBAC.sol +0 -108
- package/contracts/interfaces/IOnActionHook.sol +0 -79
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"inputs": [],
|
|
4
|
+
"name": "APPROVE_TIMELOCK_EXECUTION_META_SELECTOR",
|
|
5
|
+
"outputs": [
|
|
6
|
+
{
|
|
7
|
+
"internalType": "bytes4",
|
|
8
|
+
"name": "",
|
|
9
|
+
"type": "bytes4"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"stateMutability": "view",
|
|
13
|
+
"type": "function"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"inputs": [],
|
|
17
|
+
"name": "APPROVE_TIMELOCK_EXECUTION_SELECTOR",
|
|
18
|
+
"outputs": [
|
|
19
|
+
{
|
|
20
|
+
"internalType": "bytes4",
|
|
21
|
+
"name": "",
|
|
22
|
+
"type": "bytes4"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"stateMutability": "view",
|
|
26
|
+
"type": "function"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"inputs": [],
|
|
30
|
+
"name": "CANCEL_TIMELOCK_EXECUTION_META_SELECTOR",
|
|
31
|
+
"outputs": [
|
|
32
|
+
{
|
|
33
|
+
"internalType": "bytes4",
|
|
34
|
+
"name": "",
|
|
35
|
+
"type": "bytes4"
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"stateMutability": "view",
|
|
39
|
+
"type": "function"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"inputs": [],
|
|
43
|
+
"name": "CANCEL_TIMELOCK_EXECUTION_SELECTOR",
|
|
44
|
+
"outputs": [
|
|
45
|
+
{
|
|
46
|
+
"internalType": "bytes4",
|
|
47
|
+
"name": "",
|
|
48
|
+
"type": "bytes4"
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
"stateMutability": "view",
|
|
52
|
+
"type": "function"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"inputs": [],
|
|
56
|
+
"name": "CONTROLLER_OPERATION",
|
|
57
|
+
"outputs": [
|
|
58
|
+
{
|
|
59
|
+
"internalType": "bytes32",
|
|
60
|
+
"name": "",
|
|
61
|
+
"type": "bytes32"
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
"stateMutability": "view",
|
|
65
|
+
"type": "function"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"inputs": [],
|
|
69
|
+
"name": "EXECUTE_WITH_TIMELOCK_SELECTOR",
|
|
70
|
+
"outputs": [
|
|
71
|
+
{
|
|
72
|
+
"internalType": "bytes4",
|
|
73
|
+
"name": "",
|
|
74
|
+
"type": "bytes4"
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
"stateMutability": "view",
|
|
78
|
+
"type": "function"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"inputs": [],
|
|
82
|
+
"name": "GUARD_CONFIG_BATCH_EXECUTE_SELECTOR",
|
|
83
|
+
"outputs": [
|
|
84
|
+
{
|
|
85
|
+
"internalType": "bytes4",
|
|
86
|
+
"name": "",
|
|
87
|
+
"type": "bytes4"
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
"stateMutability": "view",
|
|
91
|
+
"type": "function"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"inputs": [],
|
|
95
|
+
"name": "GUARD_CONFIG_BATCH_META_SELECTOR",
|
|
96
|
+
"outputs": [
|
|
97
|
+
{
|
|
98
|
+
"internalType": "bytes4",
|
|
99
|
+
"name": "",
|
|
100
|
+
"type": "bytes4"
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
"stateMutability": "view",
|
|
104
|
+
"type": "function"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"inputs": [],
|
|
108
|
+
"name": "REQUEST_AND_APPROVE_EXECUTION_SELECTOR",
|
|
109
|
+
"outputs": [
|
|
110
|
+
{
|
|
111
|
+
"internalType": "bytes4",
|
|
112
|
+
"name": "",
|
|
113
|
+
"type": "bytes4"
|
|
114
|
+
}
|
|
115
|
+
],
|
|
116
|
+
"stateMutability": "view",
|
|
117
|
+
"type": "function"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"inputs": [],
|
|
121
|
+
"name": "getFunctionSchemas",
|
|
122
|
+
"outputs": [
|
|
123
|
+
{
|
|
124
|
+
"components": [
|
|
125
|
+
{
|
|
126
|
+
"internalType": "string",
|
|
127
|
+
"name": "functionSignature",
|
|
128
|
+
"type": "string"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"internalType": "bytes4",
|
|
132
|
+
"name": "functionSelector",
|
|
133
|
+
"type": "bytes4"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"internalType": "bytes32",
|
|
137
|
+
"name": "operationType",
|
|
138
|
+
"type": "bytes32"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"internalType": "string",
|
|
142
|
+
"name": "operationName",
|
|
143
|
+
"type": "string"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"internalType": "uint16",
|
|
147
|
+
"name": "supportedActionsBitmap",
|
|
148
|
+
"type": "uint16"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"internalType": "bool",
|
|
152
|
+
"name": "isProtected",
|
|
153
|
+
"type": "bool"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"internalType": "bytes4[]",
|
|
157
|
+
"name": "handlerForSelectors",
|
|
158
|
+
"type": "bytes4[]"
|
|
159
|
+
}
|
|
160
|
+
],
|
|
161
|
+
"internalType": "struct EngineBlox.FunctionSchema[]",
|
|
162
|
+
"name": "",
|
|
163
|
+
"type": "tuple[]"
|
|
164
|
+
}
|
|
165
|
+
],
|
|
166
|
+
"stateMutability": "pure",
|
|
167
|
+
"type": "function"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"inputs": [],
|
|
171
|
+
"name": "getRolePermissions",
|
|
172
|
+
"outputs": [
|
|
173
|
+
{
|
|
174
|
+
"components": [
|
|
175
|
+
{
|
|
176
|
+
"internalType": "bytes32[]",
|
|
177
|
+
"name": "roleHashes",
|
|
178
|
+
"type": "bytes32[]"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"components": [
|
|
182
|
+
{
|
|
183
|
+
"internalType": "bytes4",
|
|
184
|
+
"name": "functionSelector",
|
|
185
|
+
"type": "bytes4"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"internalType": "uint16",
|
|
189
|
+
"name": "grantedActionsBitmap",
|
|
190
|
+
"type": "uint16"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"internalType": "bytes4[]",
|
|
194
|
+
"name": "handlerForSelectors",
|
|
195
|
+
"type": "bytes4[]"
|
|
196
|
+
}
|
|
197
|
+
],
|
|
198
|
+
"internalType": "struct EngineBlox.FunctionPermission[]",
|
|
199
|
+
"name": "functionPermissions",
|
|
200
|
+
"type": "tuple[]"
|
|
201
|
+
}
|
|
202
|
+
],
|
|
203
|
+
"internalType": "struct IDefinition.RolePermission",
|
|
204
|
+
"name": "",
|
|
205
|
+
"type": "tuple"
|
|
206
|
+
}
|
|
207
|
+
],
|
|
208
|
+
"stateMutability": "pure",
|
|
209
|
+
"type": "function"
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"inputs": [],
|
|
213
|
+
"name": "getGuardConfigActionSpecs",
|
|
214
|
+
"outputs": [
|
|
215
|
+
{
|
|
216
|
+
"internalType": "string[]",
|
|
217
|
+
"name": "actionNames",
|
|
218
|
+
"type": "string[]"
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"internalType": "string[]",
|
|
222
|
+
"name": "formats",
|
|
223
|
+
"type": "string[]"
|
|
224
|
+
}
|
|
225
|
+
],
|
|
226
|
+
"stateMutability": "pure",
|
|
227
|
+
"type": "function"
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"inputs": [
|
|
231
|
+
{
|
|
232
|
+
"internalType": "bytes4",
|
|
233
|
+
"name": "functionSelector",
|
|
234
|
+
"type": "bytes4"
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"internalType": "address",
|
|
238
|
+
"name": "target",
|
|
239
|
+
"type": "address"
|
|
240
|
+
}
|
|
241
|
+
],
|
|
242
|
+
"name": "encodeAddTargetToWhitelist",
|
|
243
|
+
"outputs": [
|
|
244
|
+
{
|
|
245
|
+
"internalType": "bytes",
|
|
246
|
+
"name": "",
|
|
247
|
+
"type": "bytes"
|
|
248
|
+
}
|
|
249
|
+
],
|
|
250
|
+
"stateMutability": "pure",
|
|
251
|
+
"type": "function"
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"inputs": [
|
|
255
|
+
{
|
|
256
|
+
"internalType": "bytes4",
|
|
257
|
+
"name": "functionSelector",
|
|
258
|
+
"type": "bytes4"
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"internalType": "address",
|
|
262
|
+
"name": "target",
|
|
263
|
+
"type": "address"
|
|
264
|
+
}
|
|
265
|
+
],
|
|
266
|
+
"name": "encodeRemoveTargetFromWhitelist",
|
|
267
|
+
"outputs": [
|
|
268
|
+
{
|
|
269
|
+
"internalType": "bytes",
|
|
270
|
+
"name": "",
|
|
271
|
+
"type": "bytes"
|
|
272
|
+
}
|
|
273
|
+
],
|
|
274
|
+
"stateMutability": "pure",
|
|
275
|
+
"type": "function"
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"inputs": [
|
|
279
|
+
{
|
|
280
|
+
"internalType": "string",
|
|
281
|
+
"name": "functionSignature",
|
|
282
|
+
"type": "string"
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"internalType": "string",
|
|
286
|
+
"name": "operationName",
|
|
287
|
+
"type": "string"
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
"internalType": "enum EngineBlox.TxAction[]",
|
|
291
|
+
"name": "supportedActions",
|
|
292
|
+
"type": "EngineBlox.TxAction[]"
|
|
293
|
+
}
|
|
294
|
+
],
|
|
295
|
+
"name": "encodeRegisterFunction",
|
|
296
|
+
"outputs": [
|
|
297
|
+
{
|
|
298
|
+
"internalType": "bytes",
|
|
299
|
+
"name": "",
|
|
300
|
+
"type": "bytes"
|
|
301
|
+
}
|
|
302
|
+
],
|
|
303
|
+
"stateMutability": "pure",
|
|
304
|
+
"type": "function"
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"inputs": [
|
|
308
|
+
{
|
|
309
|
+
"internalType": "bytes4",
|
|
310
|
+
"name": "functionSelector",
|
|
311
|
+
"type": "bytes4"
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
"internalType": "bool",
|
|
315
|
+
"name": "safeRemoval",
|
|
316
|
+
"type": "bool"
|
|
317
|
+
}
|
|
318
|
+
],
|
|
319
|
+
"name": "encodeUnregisterFunction",
|
|
320
|
+
"outputs": [
|
|
321
|
+
{
|
|
322
|
+
"internalType": "bytes",
|
|
323
|
+
"name": "",
|
|
324
|
+
"type": "bytes"
|
|
325
|
+
}
|
|
326
|
+
],
|
|
327
|
+
"stateMutability": "pure",
|
|
328
|
+
"type": "function"
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
"inputs": [
|
|
332
|
+
{
|
|
333
|
+
"components": [
|
|
334
|
+
{
|
|
335
|
+
"internalType": "enum IGuardController.GuardConfigActionType",
|
|
336
|
+
"name": "actionType",
|
|
337
|
+
"type": "IGuardController.GuardConfigActionType"
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
"internalType": "bytes",
|
|
341
|
+
"name": "data",
|
|
342
|
+
"type": "bytes"
|
|
343
|
+
}
|
|
344
|
+
],
|
|
345
|
+
"internalType": "struct IGuardController.GuardConfigAction[]",
|
|
346
|
+
"name": "actions",
|
|
347
|
+
"type": "tuple[]"
|
|
348
|
+
}
|
|
349
|
+
],
|
|
350
|
+
"name": "guardConfigBatchExecutionParams",
|
|
351
|
+
"outputs": [
|
|
352
|
+
{
|
|
353
|
+
"internalType": "bytes",
|
|
354
|
+
"name": "",
|
|
355
|
+
"type": "bytes"
|
|
356
|
+
}
|
|
357
|
+
],
|
|
358
|
+
"stateMutability": "pure",
|
|
359
|
+
"type": "function"
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
"inputs": [
|
|
363
|
+
{
|
|
364
|
+
"internalType": "bytes4",
|
|
365
|
+
"name": "interfaceId",
|
|
366
|
+
"type": "bytes4"
|
|
367
|
+
}
|
|
368
|
+
],
|
|
369
|
+
"name": "supportsInterface",
|
|
370
|
+
"outputs": [
|
|
371
|
+
{
|
|
372
|
+
"internalType": "bool",
|
|
373
|
+
"name": "",
|
|
374
|
+
"type": "bool"
|
|
375
|
+
}
|
|
376
|
+
],
|
|
377
|
+
"stateMutability": "pure",
|
|
378
|
+
"type": "function"
|
|
379
|
+
}
|
|
380
|
+
]
|
package/abi/IDefinition.abi.json
CHANGED
|
@@ -90,5 +90,24 @@
|
|
|
90
90
|
],
|
|
91
91
|
"stateMutability": "pure",
|
|
92
92
|
"type": "function"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"inputs": [
|
|
96
|
+
{
|
|
97
|
+
"internalType": "bytes4",
|
|
98
|
+
"name": "interfaceId",
|
|
99
|
+
"type": "bytes4"
|
|
100
|
+
}
|
|
101
|
+
],
|
|
102
|
+
"name": "supportsInterface",
|
|
103
|
+
"outputs": [
|
|
104
|
+
{
|
|
105
|
+
"internalType": "bool",
|
|
106
|
+
"name": "",
|
|
107
|
+
"type": "bool"
|
|
108
|
+
}
|
|
109
|
+
],
|
|
110
|
+
"stateMutability": "view",
|
|
111
|
+
"type": "function"
|
|
93
112
|
}
|
|
94
113
|
]
|