@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
@@ -1,79 +0,0 @@
1
- // SPDX-License-Identifier: MPL-2.0
2
- pragma solidity 0.8.33;
3
-
4
- import "../core/lib/EngineBlox.sol";
5
-
6
- /**
7
- * @title IOnActionHook
8
- * @dev Minimal interface for external hook contracts attached to state machine actions
9
- *
10
- * @notice This interface is intentionally small to keep overall contract size low.
11
- * @notice Implementations can choose which functions to support; unneeded ones can revert.
12
- */
13
- interface IOnActionHook {
14
- /**
15
- * @dev Called after a transaction request is created
16
- * @param txRecord The created transaction record
17
- * @param caller The address that initiated the request
18
- */
19
- function onRequest(
20
- EngineBlox.TxRecord memory txRecord,
21
- address caller
22
- ) external;
23
-
24
- /**
25
- * @dev Called after a pending transaction is approved (time-lock flow)
26
- * @param txRecord The updated transaction record
27
- * @param caller The address that approved the transaction
28
- */
29
- function onApprove(
30
- EngineBlox.TxRecord memory txRecord,
31
- address caller
32
- ) external;
33
-
34
- /**
35
- * @dev Called after a pending transaction is cancelled
36
- * @param txRecord The updated transaction record
37
- * @param caller The address that cancelled the transaction
38
- */
39
- function onCancel(
40
- EngineBlox.TxRecord memory txRecord,
41
- address caller
42
- ) external;
43
-
44
- /**
45
- * @dev Called after a transaction is approved via meta-transaction
46
- * @param txRecord The updated transaction record
47
- * @param metaTx The meta-transaction used for approval
48
- * @param caller The address executing the meta-transaction
49
- */
50
- function onMetaApprove(
51
- EngineBlox.TxRecord memory txRecord,
52
- EngineBlox.MetaTransaction memory metaTx,
53
- address caller
54
- ) external;
55
-
56
- /**
57
- * @dev Called after a transaction is cancelled via meta-transaction
58
- * @param txRecord The updated transaction record
59
- * @param metaTx The meta-transaction used for cancellation
60
- * @param caller The address executing the meta-transaction
61
- */
62
- function onMetaCancel(
63
- EngineBlox.TxRecord memory txRecord,
64
- EngineBlox.MetaTransaction memory metaTx,
65
- address caller
66
- ) external;
67
-
68
- /**
69
- * @dev Called after a transaction is requested and approved in one step via meta-transaction
70
- * @param txRecord The created + approved transaction record
71
- * @param metaTx The meta-transaction used for the operation
72
- * @param caller The address executing the meta-transaction
73
- */
74
- function onRequestAndApprove(
75
- EngineBlox.TxRecord memory txRecord,
76
- EngineBlox.MetaTransaction memory metaTx,
77
- address caller
78
- ) external;
79
- }