@bloxchain/contracts 1.0.0-alpha.2 → 1.0.0-alpha.20

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 (42) hide show
  1. package/README.md +7 -7
  2. package/abi/BaseStateMachine.abi.json +85 -45
  3. package/abi/EngineBlox.abi.json +73 -90
  4. package/abi/GuardController.abi.json +252 -806
  5. package/abi/{SimpleVaultDefinitions.abi.json → GuardControllerDefinitions.abi.json} +170 -28
  6. package/abi/IDefinition.abi.json +5 -0
  7. package/abi/RuntimeRBAC.abi.json +155 -218
  8. package/abi/RuntimeRBACDefinitions.abi.json +179 -0
  9. package/abi/SecureOwnable.abi.json +524 -1621
  10. package/abi/SecureOwnableDefinitions.abi.json +5 -0
  11. package/components/README.md +8 -0
  12. package/core/access/RuntimeRBAC.sol +255 -270
  13. package/core/access/interface/IRuntimeRBAC.sol +55 -84
  14. package/core/access/lib/definitions/RuntimeRBACDefinitions.sol +93 -2
  15. package/core/base/BaseStateMachine.sol +193 -107
  16. package/core/base/interface/IBaseStateMachine.sol +153 -153
  17. package/core/execution/GuardController.sol +155 -131
  18. package/core/execution/interface/IGuardController.sol +146 -120
  19. package/core/execution/lib/definitions/GuardControllerDefinitions.sol +193 -43
  20. package/core/lib/EngineBlox.sol +2683 -2322
  21. package/{interfaces → core/lib/interfaces}/IDefinition.sol +49 -49
  22. package/{interfaces → core/lib/interfaces}/IEventForwarder.sol +33 -33
  23. package/{utils → core/lib/utils}/SharedValidation.sol +61 -8
  24. package/core/pattern/Account.sol +84 -0
  25. package/core/security/SecureOwnable.sol +456 -412
  26. package/core/security/interface/ISecureOwnable.sol +105 -104
  27. package/core/security/lib/definitions/SecureOwnableDefinitions.sol +22 -6
  28. package/package.json +5 -5
  29. package/standards/README.md +12 -0
  30. package/standards/behavior/ICopyable.sol +34 -0
  31. package/standards/hooks/IOnActionHook.sol +21 -0
  32. package/abi/AccountBlox.abi.json +0 -5799
  33. package/abi/BareBlox.abi.json +0 -1284
  34. package/abi/RoleBlox.abi.json +0 -4209
  35. package/abi/SecureBlox.abi.json +0 -3828
  36. package/abi/SimpleRWA20.abi.json +0 -5288
  37. package/abi/SimpleRWA20Definitions.abi.json +0 -191
  38. package/abi/SimpleVault.abi.json +0 -4951
  39. package/core/research/BloxchainWallet.sol +0 -306
  40. package/core/research/erc20-blox/ERC20Blox.sol +0 -140
  41. package/core/research/erc20-blox/lib/definitions/ERC20BloxDefinitions.sol +0 -185
  42. package/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
- }