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

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 (43) hide show
  1. package/README.md +7 -7
  2. package/abi/BaseStateMachine.abi.json +798 -753
  3. package/abi/EngineBlox.abi.json +566 -576
  4. package/abi/GuardController.abi.json +1546 -2095
  5. package/abi/GuardControllerDefinitions.abi.json +416 -0
  6. package/abi/IDefinition.abi.json +57 -47
  7. package/abi/RuntimeRBAC.abi.json +901 -959
  8. package/abi/RuntimeRBACDefinitions.abi.json +265 -81
  9. package/abi/SecureOwnable.abi.json +1522 -2581
  10. package/abi/SecureOwnableDefinitions.abi.json +174 -164
  11. package/components/README.md +8 -0
  12. package/core/access/RuntimeRBAC.sol +253 -270
  13. package/core/access/interface/IRuntimeRBAC.sol +55 -84
  14. package/core/access/lib/definitions/RuntimeRBACDefinitions.sol +97 -4
  15. package/core/base/BaseStateMachine.sol +198 -108
  16. package/core/base/interface/IBaseStateMachine.sol +153 -153
  17. package/core/execution/GuardController.sol +156 -131
  18. package/core/execution/interface/IGuardController.sol +146 -120
  19. package/core/execution/lib/definitions/GuardControllerDefinitions.sol +207 -45
  20. package/core/lib/EngineBlox.sol +2636 -2322
  21. package/{interfaces → core/lib/interfaces}/IDefinition.sol +49 -49
  22. package/{interfaces → core/lib/interfaces}/IEventForwarder.sol +5 -3
  23. package/{utils → core/lib/utils}/SharedValidation.sol +69 -22
  24. package/core/pattern/Account.sol +84 -0
  25. package/core/security/SecureOwnable.sol +180 -146
  26. package/core/security/interface/ISecureOwnable.sol +105 -104
  27. package/core/security/lib/definitions/SecureOwnableDefinitions.sol +818 -786
  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/abi/SimpleVaultDefinitions.abi.json +0 -269
  40. package/core/research/BloxchainWallet.sol +0 -306
  41. package/core/research/erc20-blox/ERC20Blox.sol +0 -140
  42. package/core/research/erc20-blox/lib/definitions/ERC20BloxDefinitions.sol +0 -185
  43. package/interfaces/IOnActionHook.sol +0 -79
@@ -1,104 +1,105 @@
1
- // SPDX-License-Identifier: MPL-2.0
2
- pragma solidity 0.8.33;
3
-
4
- // Contracts imports
5
- import "../../lib/EngineBlox.sol";
6
-
7
- /**
8
- * @title ISecureOwnable
9
- * @dev Interface for SecureOwnable functionality
10
- * @notice This interface defines SecureOwnable-specific operations
11
- * @notice Note: owner(), getBroadcasters(), and getRecovery() are available through BaseStateMachine
12
- */
13
- interface ISecureOwnable {
14
- // ============ OWNERSHIP MANAGEMENT ============
15
-
16
- /**
17
- * @dev Requests a transfer of ownership
18
- * @return The transaction record
19
- */
20
- function transferOwnershipRequest() external returns (EngineBlox.TxRecord memory);
21
-
22
- /**
23
- * @dev Approves a pending ownership transfer transaction after the release time
24
- * @param txId The transaction ID
25
- * @return The updated transaction record
26
- */
27
- function transferOwnershipDelayedApproval(uint256 txId) external returns (EngineBlox.TxRecord memory);
28
-
29
- /**
30
- * @dev Approves a pending ownership transfer transaction using a meta-transaction
31
- * @param metaTx The meta-transaction
32
- * @return The updated transaction record
33
- */
34
- function transferOwnershipApprovalWithMetaTx(EngineBlox.MetaTransaction memory metaTx) external returns (EngineBlox.TxRecord memory);
35
-
36
- /**
37
- * @dev Cancels a pending ownership transfer transaction
38
- * @param txId The transaction ID
39
- * @return The updated transaction record
40
- */
41
- function transferOwnershipCancellation(uint256 txId) external returns (EngineBlox.TxRecord memory);
42
-
43
- /**
44
- * @dev Cancels a pending ownership transfer transaction using a meta-transaction
45
- * @param metaTx The meta-transaction
46
- * @return The updated transaction record
47
- */
48
- function transferOwnershipCancellationWithMetaTx(EngineBlox.MetaTransaction memory metaTx) external returns (EngineBlox.TxRecord memory);
49
-
50
- // ============ BROADCASTER MANAGEMENT ============
51
-
52
- /**
53
- * @dev Updates the broadcaster address
54
- * @param newBroadcaster The new broadcaster address
55
- * @return The transaction record
56
- */
57
- function updateBroadcasterRequest(address newBroadcaster) external returns (EngineBlox.TxRecord memory);
58
-
59
- /**
60
- * @dev Approves a pending broadcaster update transaction after the release time
61
- * @param txId The transaction ID
62
- * @return The updated transaction record
63
- */
64
- function updateBroadcasterDelayedApproval(uint256 txId) external returns (EngineBlox.TxRecord memory);
65
-
66
- /**
67
- * @dev Approves a pending broadcaster update transaction using a meta-transaction
68
- * @param metaTx The meta-transaction
69
- * @return The updated transaction record
70
- */
71
- function updateBroadcasterApprovalWithMetaTx(EngineBlox.MetaTransaction memory metaTx) external returns (EngineBlox.TxRecord memory);
72
-
73
- /**
74
- * @dev Cancels a pending broadcaster update transaction
75
- * @param txId The transaction ID
76
- * @return The updated transaction record
77
- */
78
- function updateBroadcasterCancellation(uint256 txId) external returns (EngineBlox.TxRecord memory);
79
-
80
- /**
81
- * @dev Cancels a pending broadcaster update transaction using a meta-transaction
82
- * @param metaTx The meta-transaction
83
- * @return The updated transaction record
84
- */
85
- function updateBroadcasterCancellationWithMetaTx(EngineBlox.MetaTransaction memory metaTx) external returns (EngineBlox.TxRecord memory);
86
-
87
- // ============ RECOVERY MANAGEMENT ============
88
-
89
- /**
90
- * @dev Requests and approves a recovery address update using a meta-transaction
91
- * @param metaTx The meta-transaction
92
- * @return The transaction record
93
- */
94
- function updateRecoveryRequestAndApprove(EngineBlox.MetaTransaction memory metaTx) external returns (EngineBlox.TxRecord memory);
95
-
96
- // ============ TIMELOCK MANAGEMENT ============
97
-
98
- /**
99
- * @dev Requests and approves a time lock period update using a meta-transaction
100
- * @param metaTx The meta-transaction
101
- * @return The transaction record
102
- */
103
- function updateTimeLockRequestAndApprove(EngineBlox.MetaTransaction memory metaTx) external returns (EngineBlox.TxRecord memory);
104
- }
1
+ // SPDX-License-Identifier: MPL-2.0
2
+ pragma solidity 0.8.35;
3
+
4
+ // Contracts imports
5
+ import "../../lib/EngineBlox.sol";
6
+
7
+ /**
8
+ * @title ISecureOwnable
9
+ * @dev Interface for SecureOwnable functionality
10
+ * @notice This interface defines SecureOwnable-specific operations
11
+ * @notice Note: owner(), getBroadcasters(), and getRecovery() are available through BaseStateMachine
12
+ */
13
+ interface ISecureOwnable {
14
+ // ============ OWNERSHIP MANAGEMENT ============
15
+
16
+ /**
17
+ * @dev Requests a transfer of ownership
18
+ * @return txId The transaction ID (use getTransaction(txId) for full record)
19
+ */
20
+ function transferOwnershipRequest() external returns (uint256 txId);
21
+
22
+ /**
23
+ * @dev Approves a pending ownership transfer transaction after the release time
24
+ * @param txId The transaction ID
25
+ * @return The transaction ID (use getTransaction(txId) for full record)
26
+ */
27
+ function transferOwnershipDelayedApproval(uint256 txId) external returns (uint256);
28
+
29
+ /**
30
+ * @dev Approves a pending ownership transfer transaction using a meta-transaction
31
+ * @param metaTx The meta-transaction
32
+ * @return The transaction ID (use getTransaction(txId) for full record)
33
+ */
34
+ function transferOwnershipApprovalWithMetaTx(EngineBlox.MetaTransaction memory metaTx) external returns (uint256);
35
+
36
+ /**
37
+ * @dev Cancels a pending ownership transfer transaction
38
+ * @param txId The transaction ID
39
+ * @return The transaction ID (use getTransaction(txId) for full record)
40
+ */
41
+ function transferOwnershipCancellation(uint256 txId) external returns (uint256);
42
+
43
+ /**
44
+ * @dev Cancels a pending ownership transfer transaction using a meta-transaction
45
+ * @param metaTx The meta-transaction
46
+ * @return The transaction ID (use getTransaction(txId) for full record)
47
+ */
48
+ function transferOwnershipCancellationWithMetaTx(EngineBlox.MetaTransaction memory metaTx) external returns (uint256);
49
+
50
+ // ============ BROADCASTER MANAGEMENT ============
51
+
52
+ /**
53
+ * @dev Requests a broadcaster role change identified by addresses.
54
+ * @param newBroadcaster New broadcaster (zero address to revoke `currentBroadcaster`)
55
+ * @param currentBroadcaster Existing broadcaster to replace or revoke; zero address to add `newBroadcaster`
56
+ * @return txId The transaction ID (use getTransaction(txId) for full record)
57
+ */
58
+ function updateBroadcasterRequest(address newBroadcaster, address currentBroadcaster) external returns (uint256 txId);
59
+
60
+ /**
61
+ * @dev Approves a pending broadcaster update transaction after the release time
62
+ * @param txId The transaction ID
63
+ * @return The transaction ID (use getTransaction(txId) for full record)
64
+ */
65
+ function updateBroadcasterDelayedApproval(uint256 txId) external returns (uint256);
66
+
67
+ /**
68
+ * @dev Approves a pending broadcaster update transaction using a meta-transaction
69
+ * @param metaTx The meta-transaction
70
+ * @return The transaction ID (use getTransaction(txId) for full record)
71
+ */
72
+ function updateBroadcasterApprovalWithMetaTx(EngineBlox.MetaTransaction memory metaTx) external returns (uint256);
73
+
74
+ /**
75
+ * @dev Cancels a pending broadcaster update transaction
76
+ * @param txId The transaction ID
77
+ * @return The transaction ID (use getTransaction(txId) for full record)
78
+ */
79
+ function updateBroadcasterCancellation(uint256 txId) external returns (uint256);
80
+
81
+ /**
82
+ * @dev Cancels a pending broadcaster update transaction using a meta-transaction
83
+ * @param metaTx The meta-transaction
84
+ * @return The transaction ID (use getTransaction(txId) for full record)
85
+ */
86
+ function updateBroadcasterCancellationWithMetaTx(EngineBlox.MetaTransaction memory metaTx) external returns (uint256);
87
+
88
+ // ============ RECOVERY MANAGEMENT ============
89
+
90
+ /**
91
+ * @dev Requests and approves a recovery address update using a meta-transaction
92
+ * @param metaTx The meta-transaction
93
+ * @return The transaction ID (use getTransaction(txId) for full record)
94
+ */
95
+ function updateRecoveryRequestAndApprove(EngineBlox.MetaTransaction memory metaTx) external returns (uint256);
96
+
97
+ // ============ TIMELOCK MANAGEMENT ============
98
+
99
+ /**
100
+ * @dev Requests and approves a time lock period update using a meta-transaction
101
+ * @param metaTx The meta-transaction
102
+ * @return The transaction ID (use getTransaction(txId) for full record)
103
+ */
104
+ function updateTimeLockRequestAndApprove(EngineBlox.MetaTransaction memory metaTx) external returns (uint256);
105
+ }