@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.
Files changed (55) hide show
  1. package/README.md +55 -18
  2. package/abi/{ControlBlox.abi.json → AccountBlox.abi.json} +699 -2974
  3. package/abi/BareBlox.abi.json +127 -90
  4. package/abi/BaseStateMachine.abi.json +127 -90
  5. package/abi/EngineBlox.abi.json +11 -31
  6. package/abi/GuardController.abi.json +217 -895
  7. package/abi/GuardControllerDefinitions.abi.json +380 -0
  8. package/abi/IDefinition.abi.json +19 -0
  9. package/abi/RoleBlox.abi.json +818 -2404
  10. package/abi/RuntimeRBAC.abi.json +122 -328
  11. package/abi/RuntimeRBACDefinitions.abi.json +243 -0
  12. package/abi/SecureBlox.abi.json +620 -1952
  13. package/abi/SecureOwnable.abi.json +469 -1801
  14. package/abi/SecureOwnableDefinitions.abi.json +57 -0
  15. package/abi/SimpleRWA20.abi.json +486 -1999
  16. package/abi/SimpleRWA20Definitions.abi.json +19 -0
  17. package/abi/SimpleVault.abi.json +884 -2685
  18. package/abi/SimpleVaultDefinitions.abi.json +19 -0
  19. package/components/README.md +8 -0
  20. package/core/access/RuntimeRBAC.sol +184 -0
  21. package/core/access/interface/IRuntimeRBAC.sol +55 -0
  22. package/{contracts/core → core}/access/lib/definitions/RuntimeRBACDefinitions.sol +121 -1
  23. package/{contracts/core → core}/base/BaseStateMachine.sol +187 -54
  24. package/{contracts/core → core}/base/interface/IBaseStateMachine.sol +7 -0
  25. package/{contracts/core → core}/execution/GuardController.sol +89 -155
  26. package/{contracts/core → core}/execution/interface/IGuardController.sol +52 -12
  27. package/{contracts/core → core}/execution/lib/definitions/GuardControllerDefinitions.sol +91 -2
  28. package/{contracts/core → core}/lib/EngineBlox.sol +167 -64
  29. package/{contracts → core/lib}/interfaces/IDefinition.sol +15 -6
  30. package/{contracts → core/lib}/interfaces/IEventForwarder.sol +1 -1
  31. package/{contracts → core/lib}/utils/SharedValidation.sol +490 -486
  32. package/core/pattern/Account.sol +75 -0
  33. package/core/research/BloxchainWallet.sol +133 -0
  34. package/core/research/FactoryBlox/FactoryBlox.sol +344 -0
  35. package/core/research/FactoryBlox/FactoryBloxDefinitions.sol +144 -0
  36. package/core/research/erc1155-blox/ERC1155Blox.sol +170 -0
  37. package/core/research/erc1155-blox/lib/definitions/ERC1155BloxDefinitions.sol +203 -0
  38. package/core/research/erc20-blox/ERC20Blox.sol +135 -0
  39. package/core/research/erc20-blox/lib/definitions/ERC20BloxDefinitions.sol +185 -0
  40. package/core/research/erc721-blox/ERC721Blox.sol +131 -0
  41. package/core/research/erc721-blox/lib/definitions/ERC721BloxDefinitions.sol +172 -0
  42. package/core/research/lending-blox/.gitkeep +1 -0
  43. package/core/research/p2p-blox/P2PBlox.sol +266 -0
  44. package/core/research/p2p-blox/README.md +85 -0
  45. package/core/research/p2p-blox/lib/definitions/P2PBloxDefinitions.sol +19 -0
  46. package/{contracts/core → core}/security/SecureOwnable.sol +390 -419
  47. package/{contracts/core → core}/security/interface/ISecureOwnable.sol +27 -40
  48. package/{contracts/core → core}/security/lib/definitions/SecureOwnableDefinitions.sol +786 -757
  49. package/package.json +49 -47
  50. package/standards/README.md +12 -0
  51. package/standards/behavior/ICopyable.sol +36 -0
  52. package/standards/hooks/IOnActionHook.sol +21 -0
  53. package/contracts/core/access/RuntimeRBAC.sol +0 -344
  54. package/contracts/core/access/interface/IRuntimeRBAC.sol +0 -108
  55. package/contracts/interfaces/IOnActionHook.sol +0 -79
@@ -129,5 +129,248 @@
129
129
  ],
130
130
  "stateMutability": "pure",
131
131
  "type": "function"
132
+ },
133
+ {
134
+ "inputs": [],
135
+ "name": "getRoleConfigActionSpecs",
136
+ "outputs": [
137
+ {
138
+ "internalType": "string[]",
139
+ "name": "actionNames",
140
+ "type": "string[]"
141
+ },
142
+ {
143
+ "internalType": "string[]",
144
+ "name": "formats",
145
+ "type": "string[]"
146
+ }
147
+ ],
148
+ "stateMutability": "pure",
149
+ "type": "function"
150
+ },
151
+ {
152
+ "inputs": [
153
+ {
154
+ "internalType": "string",
155
+ "name": "roleName",
156
+ "type": "string"
157
+ },
158
+ {
159
+ "internalType": "uint256",
160
+ "name": "maxWallets",
161
+ "type": "uint256"
162
+ }
163
+ ],
164
+ "name": "encodeCreateRole",
165
+ "outputs": [
166
+ {
167
+ "internalType": "bytes",
168
+ "name": "",
169
+ "type": "bytes"
170
+ }
171
+ ],
172
+ "stateMutability": "pure",
173
+ "type": "function"
174
+ },
175
+ {
176
+ "inputs": [
177
+ {
178
+ "internalType": "bytes32",
179
+ "name": "roleHash",
180
+ "type": "bytes32"
181
+ }
182
+ ],
183
+ "name": "encodeRemoveRole",
184
+ "outputs": [
185
+ {
186
+ "internalType": "bytes",
187
+ "name": "",
188
+ "type": "bytes"
189
+ }
190
+ ],
191
+ "stateMutability": "pure",
192
+ "type": "function"
193
+ },
194
+ {
195
+ "inputs": [
196
+ {
197
+ "internalType": "bytes32",
198
+ "name": "roleHash",
199
+ "type": "bytes32"
200
+ },
201
+ {
202
+ "internalType": "address",
203
+ "name": "wallet",
204
+ "type": "address"
205
+ }
206
+ ],
207
+ "name": "encodeAddWallet",
208
+ "outputs": [
209
+ {
210
+ "internalType": "bytes",
211
+ "name": "",
212
+ "type": "bytes"
213
+ }
214
+ ],
215
+ "stateMutability": "pure",
216
+ "type": "function"
217
+ },
218
+ {
219
+ "inputs": [
220
+ {
221
+ "internalType": "bytes32",
222
+ "name": "roleHash",
223
+ "type": "bytes32"
224
+ },
225
+ {
226
+ "internalType": "address",
227
+ "name": "wallet",
228
+ "type": "address"
229
+ }
230
+ ],
231
+ "name": "encodeRevokeWallet",
232
+ "outputs": [
233
+ {
234
+ "internalType": "bytes",
235
+ "name": "",
236
+ "type": "bytes"
237
+ }
238
+ ],
239
+ "stateMutability": "pure",
240
+ "type": "function"
241
+ },
242
+ {
243
+ "inputs": [
244
+ {
245
+ "internalType": "bytes32",
246
+ "name": "roleHash",
247
+ "type": "bytes32"
248
+ },
249
+ {
250
+ "components": [
251
+ {
252
+ "internalType": "bytes4",
253
+ "name": "functionSelector",
254
+ "type": "bytes4"
255
+ },
256
+ {
257
+ "internalType": "uint16",
258
+ "name": "grantedActionsBitmap",
259
+ "type": "uint16"
260
+ },
261
+ {
262
+ "internalType": "bytes4[]",
263
+ "name": "handlerForSelectors",
264
+ "type": "bytes4[]"
265
+ }
266
+ ],
267
+ "internalType": "struct EngineBlox.FunctionPermission",
268
+ "name": "functionPermission",
269
+ "type": "tuple"
270
+ }
271
+ ],
272
+ "name": "encodeAddFunctionToRole",
273
+ "outputs": [
274
+ {
275
+ "internalType": "bytes",
276
+ "name": "",
277
+ "type": "bytes"
278
+ }
279
+ ],
280
+ "stateMutability": "pure",
281
+ "type": "function"
282
+ },
283
+ {
284
+ "inputs": [
285
+ {
286
+ "internalType": "bytes32",
287
+ "name": "roleHash",
288
+ "type": "bytes32"
289
+ },
290
+ {
291
+ "internalType": "bytes4",
292
+ "name": "functionSelector",
293
+ "type": "bytes4"
294
+ }
295
+ ],
296
+ "name": "encodeRemoveFunctionFromRole",
297
+ "outputs": [
298
+ {
299
+ "internalType": "bytes",
300
+ "name": "",
301
+ "type": "bytes"
302
+ }
303
+ ],
304
+ "stateMutability": "pure",
305
+ "type": "function"
306
+ },
307
+ {
308
+ "inputs": [
309
+ {
310
+ "components": [
311
+ {
312
+ "internalType": "enum IRuntimeRBAC.RoleConfigActionType",
313
+ "name": "actionType",
314
+ "type": "IRuntimeRBAC.RoleConfigActionType"
315
+ },
316
+ {
317
+ "internalType": "bytes",
318
+ "name": "data",
319
+ "type": "bytes"
320
+ }
321
+ ],
322
+ "internalType": "struct IRuntimeRBAC.RoleConfigAction[]",
323
+ "name": "actions",
324
+ "type": "tuple[]"
325
+ }
326
+ ],
327
+ "name": "roleConfigBatchExecutionParams",
328
+ "outputs": [
329
+ {
330
+ "internalType": "bytes",
331
+ "name": "",
332
+ "type": "bytes"
333
+ }
334
+ ],
335
+ "stateMutability": "pure",
336
+ "type": "function"
337
+ },
338
+ {
339
+ "inputs": [
340
+ {
341
+ "internalType": "bytes",
342
+ "name": "preEncoded",
343
+ "type": "bytes"
344
+ }
345
+ ],
346
+ "name": "roleConfigBatchExecutionParams",
347
+ "outputs": [
348
+ {
349
+ "internalType": "bytes",
350
+ "name": "",
351
+ "type": "bytes"
352
+ }
353
+ ],
354
+ "stateMutability": "pure",
355
+ "type": "function"
356
+ },
357
+ {
358
+ "inputs": [
359
+ {
360
+ "internalType": "bytes4",
361
+ "name": "interfaceId",
362
+ "type": "bytes4"
363
+ }
364
+ ],
365
+ "name": "supportsInterface",
366
+ "outputs": [
367
+ {
368
+ "internalType": "bool",
369
+ "name": "",
370
+ "type": "bool"
371
+ }
372
+ ],
373
+ "stateMutability": "pure",
374
+ "type": "function"
132
375
  }
133
376
  ]